Skip to content

Commit

Permalink
don't treat "channel" as required in dvrEntryAdd messages, fixes #74
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Stenvall committed Sep 21, 2015
1 parent 21f76fb commit 0942ac8
Showing 1 changed file with 6 additions and 7 deletions.
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 0942ac8

Please sign in to comment.