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
Support for autorec/timerec update (new htsp v25 methods) #145
Conversation
@@ -248,8 +253,104 @@ PVR_ERROR AutoRecordings::SendAutorecAdd(const PVR_TIMER &timer) | |||
|
|||
PVR_ERROR AutoRecordings::SendAutorecUpdate(const PVR_TIMER &timer) | |||
{ | |||
/* Note: there is no "updateAutorec" htsp method, thus delete + add. */ | |||
if (m_conn.GetProtocol() >= 25) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the implementation is so differing between these different HTSP versions, maybe it would be clearer to delegate the actual logic to separate functions, i.e. something like this (pseudo):
AutoRecordings::SendAutoRecUpdate(timer) {
if (htsp < 25) {
SendAutoRecUpdateLegacy();
} else {
SendAutorecUpdateActual();
}
}
Naming scheme is obviously up for debate.
updated |
diff looks quite big but that's because of the retention -> lifetime renaming |
@Glenn-1990 Please add a changelog entry and thos one is ready for merging. Thanks for this contribution. |
@ksooo done ;-) |
@ksooo your button |
Support for autorec/timerec update (new htsp v25 methods)
Since htsp v25 it's possible to do proper autorec/timerc update, so let's use it.
Unfortunately, the retention field was also changed.
https://github.com/tvheadend/tvheadend/blob/master/src/htsp_server.c#L981
So I think the best thing we can do is using "retention" for htsp < 25 en "removal" for newer versions.
Removal is the main lifetime setting in recent tvh master builds, "retention" is set on "remove when file removed"