-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
malformed dvrEntryAdd: 'channel' missing #74
Comments
According to the htsp spec "channel" is required for dvrEntryAdd. So I treat this as a bug in tvheadend. |
@adamsutton I have a feeling it was you who added this code, do you know why? |
Which code? The one rejecting the malformed dvrEntryAdd? This was me. |
BTW: Rejecting should have no side effects, it just does not add/update the "bad" timer/recording to the addons recordings container. => https://github.com/kodi-pvr/pvr.hts/blob/master/src/Tvheadend.cpp#L1754 This should not be the cause for any crash or other bad behavior the user described in the forum. The bad timer/recording will just not be available in Kodi, nothing else. |
Yeah the crash the guy was having is unrelated to this, I just wanted to know if this is a potential bug somewhere. |
Sweeping this one under the rug, haven't seen it reported anywhere else so I doubt it's actually an issue. |
@Jalle19 I must have missed this report, I had the same problem myself and was VERY annoyed by it, I actually fixed it myself. It's caused because of a mistake / change in the HTSP protocol that caused @ksooo to update the addon code to reject messages from older generations of TVH (such as mine!). However I've now upgraded TVH, because I was interested in seeing what had changed. However I would still fix this if you can. Lots of people will still be using 3.4. If you re-open I'll take a look. |
Well, again a spec vs. reality problem, sigh... So, we need to add another runtime htsp protocol check for Isengard only (as we dropped support for tvh < 4.0 in master). - if (htsmsg_get_u32(msg, "channel", &channel) && bAdd) + if (htsmsg_get_u32(msg, "channel", &channel) && bAdd && (m_conn.GetProtocol() > 10)) /* old tvh's violate spec / spec changed / ... */ |
@ksooo No, I think I've been through this somewhere else already. I don't believe channel should ever have been listed as "required", it's fundamentally wrong. It's a mistake in the HTSP spec. Re-open the issue and I'll take a look, be something to do to help get me back into things. |
Ah okay. Then we would need to fix the code both in master and Isengard, I guess. Shall I fix the spec? I have write access to tvh wiki. |
So the spec is wrong and |
@adamsutton out of curiosity: why is it fundamentally wrong to have 'channel' required for dvrEntryAdd? What's the use case for a dvrEntry without a channel? |
Autorec entries that match title only? |
@ksooo because the "channel" field is an identifier for the associated channel object (mapped into Kodi) that a recording was produced on, it's not say a string giving the channel name. This is as it should be, no issue there. Now imagine I record a whole bunch of shows on a channel I like, let's say "BBC Three", and then the BBC decide to streamline their broadcasting and decide to axe the channel (this is a realistic example), after some time I decide to delete the channel from my TVH instance as it no longer exists. What happens now? I now have a bunch of perfectly valid recordings, but since the channel they were recorded on no longer exists, dvrEntryAdd no longer set's the channel field (quite right) and kodi then ignores them completely, ouch! Now I have to remember that this issue exists and that removing a channel would mean I'd have to go "under the hood" and access the PVR files directly, really not nice. |
@Jalle19 nope. Autorecs are announced via "autorecEntryAdd", where 'channel" is already optional. @adamsutton makes sense. Does tvh actually behave like this? |
Sounds reasonable, we should drop the requirement then. |
@ksooo it certainly used to! And if it doesn't I'll be fixing that as well! The relevant lines of code should be: https://github.com/tvheadend/tvheadend/blob/master/src/dvr/dvr_db.c#L485 https://github.com/tvheadend/tvheadend/blob/master/src/dvr/dvr_db.c#L2306 https://github.com/tvheadend/tvheadend/blob/master/src/htsp_server.c#L709 I know it worked in the past, as I had recordings associated with deleted channels. |
@adamsutton thanks for looking into this. Let's go and fix pvr.hts and the htsp spec, then. :-) |
I have a fix ready, just haven't pushed it yet. |
@ksooo feel free to update the wiki |
done. https://tvheadend.org/projects/tvheadend/wiki/Htsp/155 |
don't treat "channel" as required in dvrEntryAdd messages, fixes #74
Reference: http://forum.kodi.tv/showthread.php?tid=232835&pid=2060735
@perexg are there any valid situations when a DVR entry would be missing the channel?
The text was updated successfully, but these errors were encountered: