Skip to content

Commit

Permalink
Merge pull request #104 from Jalle19/fix-malformed-adddvrentry
Browse files Browse the repository at this point in the history
don't treat "channel" as required in dvrEntryAdd messages, fixes #74
  • Loading branch information
Jalle19 committed Sep 21, 2015
2 parents 21f76fb + 48526e2 commit cce55eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions pvr.hts/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
2.2.8
- Updated to PVR API v4.1.0
- simplified recording playback handling, fixes random skipping to the beginning of recordings
- fixed: recordings from channels that have been deleted since were not available in Kodi

2.2.7
- Updated to PVR API v4.0.0
Expand Down
13 changes: 6 additions & 7 deletions src/Tvheadend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1699,12 +1699,6 @@ void CTvheadend::ParseRecordingAddOrUpdate ( htsmsg_t *msg, bool bAdd )
return;
}

if (htsmsg_get_u32(msg, "channel", &channel) && bAdd)
{
tvherror("malformed dvrEntryAdd: 'channel' missing");
return;
}

if (htsmsg_get_s64(msg, "start", &start) && bAdd)
{
tvherror("malformed dvrEntryAdd: 'start' missing");
Expand All @@ -1727,10 +1721,15 @@ void CTvheadend::ParseRecordingAddOrUpdate ( htsmsg_t *msg, bool bAdd )
SRecording &rec = m_recordings[id];
rec.id = id;
rec.del = false;
UPDATE(rec.channel, channel);
UPDATE(rec.start, start);
UPDATE(rec.stop, stop);

/* Channel is optional, it may not exist anymore */
if (!htsmsg_get_u32(msg, "channel", &channel))
{
UPDATE(rec.channel, channel);
}

if (!htsmsg_get_s64(msg, "startExtra", &startExtra))
{
UPDATE(rec.startExtra, startExtra);
Expand Down

0 comments on commit cce55eb

Please sign in to comment.