Skip to content

Commit

Permalink
Allow playing current program from start without recall
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuehlma committed Nov 7, 2017
1 parent 3e40f5b commit 138d35a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pvr.zattoo/addon.xml.in
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="pvr.zattoo"
version="18.0.25"
version="18.0.26"
name="Zattoo PVR Client"
provider-name="trummerjo,rbuehlma">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
2 changes: 2 additions & 0 deletions pvr.zattoo/changelog.txt
@@ -1,3 +1,5 @@
v18.0.26
- Allow playing current program from start without recall
v18.0.25
- Add some session information to log output
v18.0.24
Expand Down
12 changes: 8 additions & 4 deletions src/ZatData.cpp
Expand Up @@ -1181,23 +1181,27 @@ bool ZatData::DeleteRecording(string recordingId)

bool ZatData::IsPlayable(const EPG_TAG *tag)
{
time_t current_time;
time(&current_time);
if (!recallEnabled)
{
return false;
return current_time < tag->endTime;
}
time_t current_time;
time(&current_time);
return ((current_time - tag->endTime) < maxRecallSeconds)
&& (tag->startTime < current_time);
}

bool ZatData::IsRecordable(const EPG_TAG *tag)
{
if (!recordingEnabled)
{
return false;
}
time_t current_time;
time(&current_time);
if (!recallEnabled)
{
return current_time < tag->startTime;
return current_time < tag->endTime;
}
return ((current_time - tag->endTime) < maxRecallSeconds);
}
Expand Down

0 comments on commit 138d35a

Please sign in to comment.