Skip to content
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

Merged
merged 3 commits into from Jan 4, 2016

Conversation

Glenn-1990
Copy link
Contributor

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"

@@ -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)
Copy link
Contributor

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.

@ksooo ksooo changed the title Support for htsp v25 Support for autorec/timerec update (new htsp v25 methods) Dec 20, 2015
@Glenn-1990
Copy link
Contributor Author

updated

@Glenn-1990
Copy link
Contributor Author

diff looks quite big but that's because of the retention -> lifetime renaming

@Glenn-1990
Copy link
Contributor Author

@ksooo @Jalle19 updated, tvh master will now use s64 channel id's for timerec/autorec

@ksooo
Copy link
Member

ksooo commented Jan 4, 2016

@Glenn-1990 Please add a changelog entry and thos one is ready for merging. Thanks for this contribution.

@Glenn-1990
Copy link
Contributor Author

@ksooo done ;-)

@Jalle19
Copy link
Contributor

Jalle19 commented Jan 4, 2016

@ksooo your button

ksooo added a commit that referenced this pull request Jan 4, 2016
Support for autorec/timerec update (new htsp v25 methods)
@ksooo ksooo merged commit c4d79d8 into kodi-pvr:master Jan 4, 2016
@Glenn-1990 Glenn-1990 deleted the htspv25 branch January 22, 2017 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants