fix MPD::Song::GetTrackNumber()
This commit is contained in:
@@ -201,12 +201,8 @@ std::string MPD::Song::GetTrackNumber(unsigned pos) const
|
|||||||
std::string track = GetTag(MPD_TAG_TRACK, pos);
|
std::string track = GetTag(MPD_TAG_TRACK, pos);
|
||||||
size_t slash = track.find('/');
|
size_t slash = track.find('/');
|
||||||
if (slash != std::string::npos)
|
if (slash != std::string::npos)
|
||||||
{
|
track.resize(slash);
|
||||||
track = track.substr(slash+1);
|
return track.length() == 1 && track[0] != '0' ? "0"+track : track;
|
||||||
return track.length() == 1 && track[0] != '0' ? "0"+track : track;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return track;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string MPD::Song::GetDate(unsigned pos) const
|
std::string MPD::Song::GetDate(unsigned pos) const
|
||||||
|
|||||||
Reference in New Issue
Block a user