Skip to content

Commit

Permalink
Support catchup-id for live URLs where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
phunkyfish committed Feb 1, 2024
1 parent 8f7a609 commit 8e09ad7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/iptvsimple/CatchupController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ void CatchupController::ProcessChannelForPlayback(const Channel& channel, std::m
// Anything from here is live!
m_playbackIsVideo = false; // TODO: possible time jitter on UI as this will effect get stream times

//Always get the live EPG entry
EpgEntry* liveEpgEntry = GetLiveEPGEntry(channel);

if (!m_fromEpgTag || m_controlsLiveStream)
{
EpgEntry* liveEpgEntry = GetLiveEPGEntry(channel);
if (m_controlsLiveStream && liveEpgEntry && !m_settings->CatchupOnlyOnFinishedProgrammes())
{
// Live timeshifting support with EPG entry
Expand All @@ -52,6 +54,7 @@ void CatchupController::ProcessChannelForPlayback(const Channel& channel, std::m
m_catchupStartTime = 0;
m_catchupEndTime = 0;
}

m_fromEpgTag = false;
}

Expand All @@ -61,6 +64,11 @@ void CatchupController::ProcessChannelForPlayback(const Channel& channel, std::m
{
m_resetCatchupState = false;
m_programmeCatchupId.clear();

// Not from timeshifted EPG so safe to set the catchup ID here
if (liveEpgEntry)
m_programmeCatchupId = liveEpgEntry->GetCatchupId();

if (channel.IsCatchupSupported())
{
m_timeshiftBufferOffset = channel.GetCatchupDaysInSeconds(); //offset from now to start of catchup window
Expand Down

0 comments on commit 8e09ad7

Please sign in to comment.