aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2012-11-12 20:50:44 +0100
committerJoakim Plate <elupus@ecce.se>2012-11-12 20:50:44 +0100
commit2bb3252b70f1982e12e3ceba5fbec4216ff87e16 (patch)
tree8a4b5b06e18eb1b96973c653067fa7bb6dff9c64
parentc313df313a843a554669d2a23a1f259eba067d3a (diff)
gui: add generic Player.Title info label
This is prepatory to allow display of metadata for non av players in the future and allowing skins to maintain compatibility with frodo.
-rw-r--r--xbmc/GUIInfoManager.cpp9
-rw-r--r--xbmc/GUIInfoManager.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp
index 7d26cb94d8..54e56d5110 100644
--- a/xbmc/GUIInfoManager.cpp
+++ b/xbmc/GUIInfoManager.cpp
@@ -182,6 +182,7 @@ const infomap player_labels[] = {{ "hasmedia", PLAYER_HAS_MEDIA },
{ "showtime", PLAYER_SHOWTIME },
{ "showcodec", PLAYER_SHOWCODEC },
{ "showinfo", PLAYER_SHOWINFO },
+ { "title", PLAYER_TITLE },
{ "muted", PLAYER_MUTED },
{ "hasduration", PLAYER_HASDURATION },
{ "passthrough", PLAYER_PASSTHROUGH },
@@ -1377,6 +1378,14 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, CStdString *fa
strLabel = URIUtils::GetParentPath(strLabel);
}
break;
+ case PLAYER_TITLE:
+ {
+ if (g_application.IsPlayingVideo())
+ strLabel = GetLabel(VIDEOPLAYER_TITLE);
+ else
+ strLabel = GetLabel(MUSICPLAYER_TITLE);
+ }
+ break;
case MUSICPLAYER_TITLE:
case MUSICPLAYER_ALBUM:
case MUSICPLAYER_ARTIST:
diff --git a/xbmc/GUIInfoManager.h b/xbmc/GUIInfoManager.h
index 63f906095c..f551029595 100644
--- a/xbmc/GUIInfoManager.h
+++ b/xbmc/GUIInfoManager.h
@@ -107,6 +107,7 @@ namespace INFO
#define PLAYER_CAN_PAUSE 50
#define PLAYER_CAN_SEEK 51
#define PLAYER_START_TIME 52
+#define PLAYER_TITLE 53
#define WEATHER_CONDITIONS 100
#define WEATHER_TEMPERATURE 101