NowPlayingPlugin: Added SHUFFLE and REPEAT types and accompanying SetShuffle and SetRepeat bangs

This commit is contained in:
Birunthan Mohanathas
2011-09-11 08:22:07 +00:00
parent 6cce1c2233
commit 6b5ca293e8
13 changed files with 271 additions and 65 deletions

View File

@ -579,31 +579,31 @@ void CPlayerWMP::SetRating(int rating)
if (spMedia)
{
CComBSTR val;
if (rating <= 0)
switch (rating)
{
rating = 0;
case 0:
val = L"0";
}
else if (rating == 1)
{
break;
case 1:
val = L"1";
}
else if (rating == 2)
{
break;
case 2:
val = L"25";
}
else if (rating == 3)
{
break;
case 3:
val = L"50";
}
else if (rating == 4)
{
break;
case 4:
val = L"75";
}
else if (rating >= 5)
{
rating = 5;
break;
case 5:
val = L"99";
break;
}
spMedia->setItemInfo(CComBSTR("UserRating"), val);