Skip to content

Commit

Permalink
[pvr] added player start time
Browse files Browse the repository at this point in the history
  • Loading branch information
opdenkamp committed Nov 8, 2012
1 parent 40492ce commit b4c86d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion xbmc/GUIInfoManager.cpp
Expand Up @@ -209,7 +209,8 @@ const infomap player_times[] = {{ "seektime", PLAYER_SEEKTIME },
{ "timespeed", PLAYER_TIME_SPEED },
{ "time", PLAYER_TIME },
{ "duration", PLAYER_DURATION },
{ "finishtime", PLAYER_FINISH_TIME }};
{ "finishtime", PLAYER_FINISH_TIME },
{ "starttime", PLAYER_START_TIME}};

const infomap weather[] = {{ "isfetched", WEATHER_IS_FETCHED },
{ "conditions", WEATHER_CONDITIONS }, // labels from here
Expand Down Expand Up @@ -2957,6 +2958,17 @@ CStdString CGUIInfoManager::GetMultiInfoLabel(const GUIInfo &info, int contextWi
}
return LocalizeTime(time, (TIME_FORMAT)info.GetData1());
}
else if (info.m_info == PLAYER_START_TIME)
{
CDateTime time;
if (m_currentFile->HasEPGInfoTag())
time = m_currentFile->GetEPGInfoTag()->StartAsLocalTime();
else
{
time = CDateTime::GetCurrentDateTime();
time -= CDateTimeSpan(0, 0, 0, GetPlayTime());
}
}
else if (info.m_info == PLAYER_TIME_SPEED)
{
CStdString strTime;
Expand Down
1 change: 1 addition & 0 deletions xbmc/GUIInfoManager.h
Expand Up @@ -106,6 +106,7 @@ namespace INFO
#define PLAYER_ITEM_ART 49
#define PLAYER_CAN_PAUSE 50
#define PLAYER_CAN_SEEK 51
#define PLAYER_START_TIME 52

#define WEATHER_CONDITIONS 100
#define WEATHER_TEMPERATURE 101
Expand Down

1 comment on commit b4c86d9

@xhaggi
Copy link
Member

@xhaggi xhaggi commented on b4c86d9 Nov 10, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@opdenkamp The start time is constantly changed, if you use "continue last channel on startup" option

Please sign in to comment.