Skip to content

Commit

Permalink
Merge pull request #11041 from phil65/playlist_position
Browse files Browse the repository at this point in the history
[gui] return "" instead of "0" for playlist.position in case nothing is playing
  • Loading branch information
Philipp Temminghoff committed Dec 10, 2016
2 parents 4d09cd1 + 13fd504 commit c23f7d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xbmc/GUIInfoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8427,7 +8427,9 @@ std::string CGUIInfoManager::GetPlaylistLabel(int item, int playlistid /* = PLAY
}
case PLAYLIST_POSITION:
{
return StringUtils::Format("%i", g_playlistPlayer.GetCurrentSong() + 1);
int currentSong = g_playlistPlayer.GetCurrentSong();
if (currentSong > -1)
return StringUtils::Format("%i", currentSong + 1);
}
case PLAYLIST_RANDOM:
{
Expand Down

0 comments on commit c23f7d8

Please sign in to comment.