2015-05-27, 12:40
After discovering that myth 0.27.4 doesn't support the necessary API features to allow pvr.mythv to use the backend's watched status flag fully (my initial hopes, the reality and other examples) I decided to do something about it.
I don't want to run myth 0.28 development as I've finally found a version of mythbackend that runs without crashing (mythtv-0.27.4_p20141018), recovers reasonably gracefully after power cuts (although I occasionally have to run db repair) and generally continues to record things reliably. Also, I want to use pvr.mythv on Helix as lots of other things now just work 'better' than they used to on Gotham with the cmyth client (not perfect yet, but we're working on that ;-).
Turns out it is relatively easy to patch 0.27.4 (or any 0.27 version) to add the missing 'UpdateRecordedWatchedStatus' provided you settle for the Dvr API version 4.5 flavour and are running a source based distribution on your mythtv server like I am (gentoo).
A nasty hack to janbar's pvr.mythtv (the helix branch in my case) to enable this is also relatively easy to accomplish. I've now got this up and running on OE 5.0.8 on three RPi B/B+s, but I can see obvious problems:
My conclusion is I should post the patches I used to get my setup working (see post below). Any like minded (and skilled?) individuals can then apply them to their set-up if they so choose. That's the power of open source
!
PS: Janbar, if you think backports of individual services APIs would be practical and could be supported by your official add-on in future, I'd be willing to try and produce a patch to bring myth 0.27 up to full DVR Service version 4.5 standard where UpdateRecordedWatchedStatus was introduced (I can't give any guarantees I will be successful of course
).
I don't want to run myth 0.28 development as I've finally found a version of mythbackend that runs without crashing (mythtv-0.27.4_p20141018), recovers reasonably gracefully after power cuts (although I occasionally have to run db repair) and generally continues to record things reliably. Also, I want to use pvr.mythv on Helix as lots of other things now just work 'better' than they used to on Gotham with the cmyth client (not perfect yet, but we're working on that ;-).
Turns out it is relatively easy to patch 0.27.4 (or any 0.27 version) to add the missing 'UpdateRecordedWatchedStatus' provided you settle for the Dvr API version 4.5 flavour and are running a source based distribution on your mythtv server like I am (gentoo).
A nasty hack to janbar's pvr.mythtv (the helix branch in my case) to enable this is also relatively easy to accomplish. I've now got this up and running on OE 5.0.8 on three RPi B/B+s, but I can see obvious problems:
- the myth services API is in active development with several obvious features missing (e.g. the ability to set resume points). When these are incorporated and Janbar enables them in his addon, I can tell I will want to back-port them as well, assuming 0.28 still hasn't gone 'stable' by then. Maybe even if it has given my experiences with 0.25....
- the services API is being revised regularly to add new parameters to existing functions / alternative ways of calling them (that's what development means after all). This is good as the new methods seem easier to use, but it means API users need to keep track of them all or miscellaneous breakage will result. Hats off to Janbar for attempting (and I believe succeeding) at this.
- the services API identifies versions per group (e.g. Dvr/Capture/Channel etc...) rather than per function. This makes cherry picking individual functions in a particular API group to back-port (as I did for my nasty hack) problematic if it is to be catered for in an 'official' or distributed add-on. Sure you can roll the API version to identify your new hybrid, but who defines what that version is called?
- I doubt that the mythv devs will want to maintain a 0.27 backports branch with selected 'features' like this implemented, effectively to support one particular user of the API (especially a replacement for mythfrontend). They seem to be focusing on the future and 0.28 (which looks encouraging from what I can see). Obviously, if there are any myth devs reading this who disagree, I would happily stand corrected...
- I can see tweaks to pvr.mythv which would make selective backports of services API functions to a particular 0.28 development version easier to accommodate (i.e. making pCapabilities->bSupportsRecordingPlayCount depend on the Dvr services API version rather than the myth protocol version), but unless janbar thinks this has merit I'd be reluctant to give it a try (he's obviously been pushing development of the services API, so should have a feel if this would be practical or not).
My conclusion is I should post the patches I used to get my setup working (see post below). Any like minded (and skilled?) individuals can then apply them to their set-up if they so choose. That's the power of open source
![Smile Smile](https://forum.kodi.tv/images/smilies/smile.png)
PS: Janbar, if you think backports of individual services APIs would be practical and could be supported by your official add-on in future, I'd be willing to try and produce a patch to bring myth 0.27 up to full DVR Service version 4.5 standard where UpdateRecordedWatchedStatus was introduced (I can't give any guarantees I will be successful of course
![Blush Blush](https://forum.kodi.tv/images/smilies/blush.png)