Comments (21)
According to the htsp spec "channel" is required for dvrEntryAdd. So I treat this as a bug in tvheadend.
from pvr.hts.
@adamsutton I have a feeling it was you who added this code, do you know why?
from pvr.hts.
Which code? The one rejecting the malformed dvrEntryAdd? This was me.
from pvr.hts.
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.
from pvr.hts.
Yeah the crash the guy was having is unrelated to this, I just wanted to know if this is a potential bug somewhere.
from pvr.hts.
Sweeping this one under the rug, haven't seen it reported anywhere else so I doubt it's actually an issue.
from pvr.hts.
@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.
from pvr.hts.
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 / ... */
from pvr.hts.
@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.
from pvr.hts.
I don't believe channel should ever have been listed as "required", it's fundamentally wrong. It's a mistake in the HTSP spec
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.
from pvr.hts.
So the spec is wrong and channel
is indeed not required? Sounds like an easy fix.
from pvr.hts.
@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?
from pvr.hts.
Autorec entries that match title only?
from pvr.hts.
@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.
from pvr.hts.
@Jalle19 nope. Autorecs are announced via "autorecEntryAdd", where 'channel" is already optional.
@adamsutton makes sense. Does tvh actually behave like this?
from pvr.hts.
Sounds reasonable, we should drop the requirement then.
from pvr.hts.
@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
As long as a channel instance OR name is present, we accept the entry and will store. Even if we can't link the entry to a channel.
https://github.com/tvheadend/tvheadend/blob/master/src/dvr/dvr_db.c#L2306
If a channel is removed, remove all DVR links and set the channel name param in the DVR entry to the name of the channel.
https://github.com/tvheadend/tvheadend/blob/master/src/htsp_server.c#L709
If no channel is associated with the entry, don't add "channel" param, but still output.
I know it worked in the past, as I had recordings associated with deleted channels.
from pvr.hts.
@adamsutton thanks for looking into this. Let's go and fix pvr.hts and the htsp spec, then. :-)
from pvr.hts.
I have a fix ready, just haven't pushed it yet.
from pvr.hts.
@ksooo feel free to update the wiki
from pvr.hts.
feel free to update the wiki
done. https://tvheadend.org/projects/tvheadend/wiki/Htsp/155
from pvr.hts.
Related Issues (20)
- pvr.hts segfaults - kodi 20.0-ALPHA1 (19.90.701) Git:20220701-30fb576edd HOT 8
- Too many status messages after long inactivity time HOT 3
- Kodi 19.4 (Nvidia Shield Pro) Audio Stutter and Buffering with TVHeadend Addon HOT 4
- Selecting a different video decoder HOT 2
- Kodi 20 Beta 1 & Nightlies - EPG Flush/Crash HOT 2
- Channel switch times HOT 3
- Feature request: Force software decoding for hts streams HOT 2
- Season 0 shows up as season 2 HOT 3
- Choppy audio only on bluetooth
- [issue] GUI is blocked when starting any live channel in Kodi Nexus HOT 8
- Live TV Subtitles broken on Kodi 20 HOT 1
- Cannot save settings on appletv HOT 3
- Live TV HEVC streams not playing-Ubuntu 22.04 lts Kodi Nexus HOT 22
- listitem.size doesn't update in real time HOT 1
- Channel Groups/Tags not syncing between tvheadend and Kodi HOT 1
- Feature Request: Warn when creating an overlapping recording HOT 3
- Disconnect from TVHeadend server while playing piped mpd-stream with "demux read no data for at least 10 secs" HOT 6
- [tvOS] Addon settings not saved
- Live TV HEVC streams not playing-Libreelec Intel generic HOT 6
- cstdint needs to be included in HTSPVFS.h HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pvr.hts.