Permalink
Browse files

add Player.Property() to infomanager to handle fanart_image

  • Loading branch information...
1 parent 35c9f14 commit 95819b6ce457f55a846dd2c2d652b595e764ec5b Jonathan Marshall committed Jul 7, 2012
Showing with 15 additions and 0 deletions.
  1. +14 −0 xbmc/GUIInfoManager.cpp
  2. +1 −0 xbmc/GUIInfoManager.h
View
@@ -189,6 +189,8 @@ const infomap player_labels[] = {{ "hasmedia", PLAYER_HAS_MEDIA },
{ "folderpath", PLAYER_PATH },
{ "filenameandpath", PLAYER_FILEPATH }};
+const infomap player_param[] = {{ "property", PLAYER_ITEM_PROPERTY }};
+
const infomap player_times[] = {{ "seektime", PLAYER_SEEKTIME },
{ "seekoffset", PLAYER_SEEKOFFSET },
{ "timeremaining", PLAYER_TIME_REMAINING },
@@ -683,6 +685,14 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
if (prop.name == player_times[i].str)
return AddMultiInfo(GUIInfo(player_times[i].val, TranslateTimeFormat(prop.param())));
}
+ if (prop.num_params() == 1)
+ {
+ for (size_t i = 0; i < sizeof(player_param) / sizeof(infomap); i++)
+ {
+ if (prop.name == player_param[i].str)
+ return AddMultiInfo(GUIInfo(player_param[i].val, ConditionalStringParameter(prop.param())));
+ }
+ }
}
else if (cat.name == "weather")
{
@@ -2741,6 +2751,10 @@ CStdString CGUIInfoManager::GetMultiInfoLabel(const GUIInfo &info, int contextWi
if (m_seekOffset > 0)
return "+" + seekOffset;
}
+ else if (info.m_info == PLAYER_ITEM_PROPERTY)
+ {
+ return m_currentFile->GetProperty(m_stringParameters[info.GetData1()]).asString();
+ }
else if (info.m_info == SYSTEM_TIME)
{
return GetTime((TIME_FORMAT)info.GetData1());
View
@@ -103,6 +103,7 @@ namespace INFO
#define PLAYER_FILEPATH 46
#define PLAYER_SEEKOFFSET 47
#define PLAYER_PROGRESS_CACHE 48
+#define PLAYER_ITEM_PROPERTY 49
#define WEATHER_CONDITIONS 100
#define WEATHER_TEMPERATURE 101

0 comments on commit 95819b6

Please sign in to comment.