aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2016-12-10 14:22:30 +0100
committerGitHub <noreply@github.com>2016-12-10 14:22:30 +0100
commit45458d8e8d10066764953e3c7553683fb3e390a7 (patch)
tree875c36032f69972180a8a1a364815de90adba0b4
parenta9dfaad2860bfb3ea9a60899773c137934f66e37 (diff)
parenteb5400f98000a70379918c15b163a04d67749244 (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.cpp4
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:
{