Skip to content
Permalink
Browse files

[PVR] guiinfo times: reset timeshift offset and timeshift play time a…

…fter channel change.
  • Loading branch information...
ksooo committed Jan 5, 2019
1 parent 2c44a6a commit ac834b6b684c96d0bd036108de25da669961aaf3
Showing with 12 additions and 1 deletion.
  1. +11 −1 xbmc/pvr/PVRGUITimesInfo.cpp
  2. +1 −0 xbmc/pvr/PVRGUITimesInfo.h
@@ -43,6 +43,7 @@ void CPVRGUITimesInfo::Reset()
m_iTimeshiftProgressDuration = 0;

m_playingEpgTag.reset();
m_playingChannel.reset();
}

void CPVRGUITimesInfo::UpdatePlayingTag()
@@ -52,7 +53,7 @@ void CPVRGUITimesInfo::UpdatePlayingTag()

if (currentChannel || currentTag)
{
if (!currentTag)
if (currentChannel && !currentTag)
currentTag = currentChannel->GetEPGNow();

CSingleLock lock(m_critSection);
@@ -104,9 +105,18 @@ void CPVRGUITimesInfo::UpdateTimeshiftData()
int64_t iPlayTime, iMinTime, iMaxTime;
CServiceBroker::GetDataCacheCore().GetPlayTimes(iStartTime, iPlayTime, iMinTime, iMaxTime);
bool bPlaying = CServiceBroker::GetDataCacheCore().GetSpeed() == 1.0;
const CPVRChannelPtr playingChannel = CServiceBroker::GetPVRManager().GetPlayingChannel();

CSingleLock lock(m_critSection);

if (playingChannel != m_playingChannel)
{
// playing channel changed. we need to reset offset and playtime.
m_iTimeshiftOffset = 0;
m_iTimeshiftPlayTime = 0;
m_playingChannel = playingChannel;
}

if (!iStartTime)
{
if (m_iStartTime == 0)
@@ -67,6 +67,7 @@ namespace PVR
mutable CCriticalSection m_critSection;

CPVREpgInfoTagPtr m_playingEpgTag;
CPVRChannelPtr m_playingChannel;

time_t m_iStartTime;
unsigned int m_iDuration;

0 comments on commit ac834b6

Please sign in to comment.
You can’t perform that action at this time.