diff options
author | Martijn Kaijser <martijn@xbmc.org> | 2016-12-10 14:22:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-10 14:22:30 +0100 |
commit | 45458d8e8d10066764953e3c7553683fb3e390a7 (patch) | |
tree | 875c36032f69972180a8a1a364815de90adba0b4 | |
parent | a9dfaad2860bfb3ea9a60899773c137934f66e37 (diff) | |
parent | eb5400f98000a70379918c15b163a04d67749244 (diff) |
Merge pull request #11108 from phil65/playlist_position_krypton
[gui] return "" instead of "0" for playlist.position in case nothing …
-rw-r--r-- | xbmc/GUIInfoManager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index 99c425135c..4f60cb89e6 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -8412,7 +8412,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: { |