Kodi Community Forum

Full Version: pvr.mythtv add-on
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2015-02-19, 00:23)allan87 Wrote: [ -> ]
(2015-02-19, 00:17)JasonPell Wrote: [ -> ]The janbar plugin works best with 0.28 so I don't see how janbar can stop keeping it up to date.
What do you base that on? The pvr.mythtv addon is compatible with 0.27 and, in my experience, works perfectly well with it. What do you find wrong with it?

Nobody has to run mythbackend 0.28. If they do, they don't need to slavishly update it without regard for breaking the Kodi addon.

The watched status not working for one. I want to use kodi and mythtv. My 4yo son relies on the watched status. Thus 0.28 is best choice. And most of the time its completely stable. I have a few issues now and then but no biggie.

Agree avoiding updating 0.28 keeps it working but I like to keep it up to date and I have mythweb as fallback for the few times where it does not. My son can click the speaker icon and will immediately play the video in gnome videos
(2015-02-19, 01:05)allan87 Wrote: [ -> ]
(2015-02-19, 00:50)angeloaz Wrote: [ -> ]What people are discussing is that the pvr.mythtv addon for Helix doesn't fully support a Myth 0.27 backend. It works for most stuff, but not everything (e.g. doesn't update the watched status). So your assertion stating that configuration has "worked fine throughout" may not be true.
If that feature is genuinely important to someone, a further option is to use XBMC Gotham, which still included the cmyth addon. In fact, IIRC, cmyth was even included in Helix until the late beta stages.

It seems to me that there are many options available to have a good working frontend.

I think everyone agrees there are "options" (although, having to rollback to Gotham just to get a watched flag set seems like a rather drastic solution -- as does having to migrate to Myth 0.28).

The point of my post was to point out that pvr.mythtv for Helix is not "working fine" in all cases -- which is a completely different topic than what options are available to mitigate the problem.

Are we only allowed to discuss problems in here that have zero resolution options?
(2015-02-19, 01:45)angeloaz Wrote: [ -> ]
(2015-02-19, 01:05)allan87 Wrote: [ -> ]
(2015-02-19, 00:50)angeloaz Wrote: [ -> ]What people are discussing is that the pvr.mythtv addon for Helix doesn't fully support a Myth 0.27 backend. It works for most stuff, but not everything (e.g. doesn't update the watched status). So your assertion stating that configuration has "worked fine throughout" may not be true.
If that feature is genuinely important to someone, a further option is to use XBMC Gotham, which still included the cmyth addon. In fact, IIRC, cmyth was even included in Helix until the late beta stages.

It seems to me that there are many options available to have a good working frontend.

I think everyone agrees there are "options" (although, having to rollback to Gotham just to get a watched flag set seems like a rather drastic solution -- as does having to migrate to Myth 0.28).

The point of my post was to point out that pvr.mythtv for Helix is not "working fine" in all cases -- which is a completely different topic than what options are available to mitigate the problem.

Are we only allowed to discuss problems in here that have zero resolution options?

Agreed. Watched status is a very important feature. Administering a mythtv backend is enough of a nightmare as it is without having to run an unstable version, so I would not regard 'use 0.28' as a solution to that problem. And I've just updated to Helix; rolling back to Gotham is not an easy or practical thing to do when everything is installed from packages. So while there might be options to get this working correctly, none of them are reasonable for someone who just wants a stable system that works.

Would it be very hard to make the watched status work in the new mythtv addon with mythtv 0.27?
(2015-02-19, 12:53)FatGerman Wrote: [ -> ]
(2015-02-19, 01:45)angeloaz Wrote: [ -> ]
(2015-02-19, 01:05)allan87 Wrote: [ -> ]If that feature is genuinely important to someone, a further option is to use XBMC Gotham, which still included the cmyth addon. In fact, IIRC, cmyth was even included in Helix until the late beta stages.

It seems to me that there are many options available to have a good working frontend.

I think everyone agrees there are "options" (although, having to rollback to Gotham just to get a watched flag set seems like a rather drastic solution -- as does having to migrate to Myth 0.28).

The point of my post was to point out that pvr.mythtv for Helix is not "working fine" in all cases -- which is a completely different topic than what options are available to mitigate the problem.

Are we only allowed to discuss problems in here that have zero resolution options?

Agreed. Watched status is a very important feature. Administering a mythtv backend is enough of a nightmare as it is without having to run an unstable version, so I would not regard 'use 0.28' as a solution to that problem. And I've just updated to Helix; rolling back to Gotham is not an easy or practical thing to do when everything is installed from packages. So while there might be options to get this working correctly, none of them are reasonable for someone who just wants a stable system that works.

Would it be very hard to make the watched status work in the new mythtv addon with mythtv 0.27?

Unfortunately I fear that making the watched status work in the new mythtv addon with mythtv 0.27 wouldn't be easy (given the lack of responses for a plugin that 'works' with 0.27 on helix). The underlying cause is that the development of the mythpvr addon changed between gotham and helix in two ways:
1) The new way that kodi/xbmc communicates with the addon itself (which means you can't use old gotham pvr addons in helix)
2) The way that the mythpvr addon communicates with the myth backend itself.

In the old cmyth addon (gotham), the addon communicated directly with the myth database (SQL) and updated it directly as necessary (to mark things as watched).
The new myth addon (helix) does not communicate directly with the database, but instead uses the new Services API in myth. As of 0.27.4, there is no API (commuincation mechanism) to update the watched status of a recorded show. This has only been implemented in 0.28 (hence the need to update your backend).
The 'old' code that communicated directly with the SQL database has been removed from the (helix) myth addon code, so in order to make the addon 'work' with a 0.27 backend and mark shows as watched, janbar would need to re-add all the code that communicates directly with the database just to implement this one feature - then when 0.28 is released, remove this database code again as it would be unnecessary. Asking Janbar to do this as well as all the good work he/she (?) is doing would be unfair given the excellent work already done on the addon.

It's a shame but I don't see a particularly simple solution (and I'm a bit puzzled as to why this API wasn't implemented as part of the 0.27 branches as it's a fairly obvious and important API from my point of view).


Technical: I had thought about running a small python shim that acts as the 0.28 services API for marking the show as watched that communicates directly with the SQL database to mark a show as watched, then having apache act as a reverse proxy to split 'true' calls to the services API from this one call to the UpdateRecordedWatchedStatus, but that may be a bit more work than I'd care to undertake, and just updating to 0.28 may be easier :-(
(2015-02-19, 16:00)agentgonzo Wrote: [ -> ]Technical: I had thought about running a small python shim that acts as the 0.28 services API for marking the show as watched that communicates directly with the SQL database to mark a show as watched, then having apache act as a reverse proxy to split 'true' calls to the services API from this one call to the UpdateRecordedWatchedStatus, but that may be a bit more work than I'd care to undertake, and just updating to 0.28 may be easier :-(

I'm considering the same thing (mentioned it here a few days ago: http://forum.kodi.tv/showthread.php?tid=...pid1931283). Of course the devil is in the details, but it seems simple enough and would eliminate the problem without having to touch either Kodi or MythTV.
Of course you can always go with 0.28 and once you have a stable version, stick with that version until release. Just because you update to 0.28 it doesn't mean you need to update it every day and catch every development bug.

There are many reports on mythtv-users of 0.28 working just fine at the current stage of development.
(2015-02-19, 21:16)nickr Wrote: [ -> ]Of course you can always go with 0.28 and once you have a stable version, stick with that version until release. Just because you update to 0.28 it doesn't mean you need to update it every day and catch every development bug.

There are many reports on mythtv-users of 0.28 working just fine at the current stage of development.

I can vouch for that. We have used 0.28 for months and only had a few issues. I can't even think of one that was an actual bug with 0.28. It was always an API change that affected kodi, and janbar soon fixed it.
(2015-02-19, 22:15)JasonPell Wrote: [ -> ]
(2015-02-19, 21:16)nickr Wrote: [ -> ]Of course you can always go with 0.28 and once you have a stable version, stick with that version until release. Just because you update to 0.28 it doesn't mean you need to update it every day and catch every development bug.

There are many reports on mythtv-users of 0.28 working just fine at the current stage of development.

I can vouch for that. We have used 0.28 for months and only had a few issues. I can't even think of one that was an actual bug with 0.28. It was always an API change that affected kodi, and janbar soon fixed it.

My experience with 0.28 is a little different - not all bugs affect all users. In general it does work very well.

For instance in the last couple of weeks there was a change which broke DVB-S2 tuning, so no live tv or recordings. In this case I rolled back to a previous version in my apt cache.

It is possible to "hold" at a specific version using apt, aptitude, synaptic etc but just make sure you only use one method if you do regular updates (apt and synaptic use different methods to hold at a particular version).

Mike
(2015-02-20, 09:16)MikeB2013 Wrote: [ -> ]
(2015-02-19, 22:15)JasonPell Wrote: [ -> ]
(2015-02-19, 21:16)nickr Wrote: [ -> ]Of course you can always go with 0.28 and once you have a stable version, stick with that version until release. Just because you update to 0.28 it doesn't mean you need to update it every day and catch every development bug.

There are many reports on mythtv-users of 0.28 working just fine at the current stage of development.

I can vouch for that. We have used 0.28 for months and only had a few issues. I can't even think of one that was an actual bug with 0.28. It was always an API change that affected kodi, and janbar soon fixed it.

My experience with 0.28 is a little different - not all bugs affect all users. In general it does work very well.

For instance in the last couple of weeks there was a change which broke DVB-S2 tuning, so no live tv or recordings. In this case I rolled back to a previous version in my apt cache.

It is possible to "hold" at a specific version using apt, aptitude, synaptic etc but just make sure you only use one method if you do regular updates (apt and synaptic use different methods to hold at a particular version).

Mike

And this is the problem - I've run unstable mythtv before and not all bugs affect all users - it almost made me give up completely and it's not something I'm prepared to ever do again. It's an extremely complex thing, mythbackend, and getting it stable and running reliably is a long drawn out process that, in my experience, has to be gone through every time you upgrade. If API changes in 0.28 are going to make the kodi mythtv client stop working, even briefly, that's a big problem. An HTPC isn't a 'toy' you fiddle with, it's a home appliance. It's like the washing machine or the toaster. You set it up and then you need it just to work when you need it, to record TV, play TV, watch movies, etc. Now, I could update to 0.28 and if by some miracle it just worked today then I could stop at that. But what if it didn't just work today, what if I had to wait 2 weeks for it to work? The WAF would have Kodi thrown in the bin and the guy from Sky would be round tomorrow.. Smile

So as I understand it there's no way to make the new mythtv addon work with 0.27, and no way to make the old cmyth addon work with Helix?

Does anybody know the format of the SQL command you need to use to mark a recording as watched in the myth database? I feel a dirty hack coming on Smile
@janbar
Thanks for the update to 2.0.4

I have it running on Ubuntu (X64), Raspberry RPi2 (Milhouse build #0219), Windows 7 and 8.1 (both 64bit). All built from source master from your repo.

Mythtv backend v0.28-pre-2682-gf51a20b

Mike
FatGerman, I don't know off the top of my head, but I think that a quick-and-dirty hack is what's required. I'll take a quick poke around in my database and see if I can figure out how to mark something as watched and get back to you.
OK, just had a quick play - it's quite easy

The syntax is:
update <TABLE> set <key>=<value> WHERE ...;

So to mark the following episode of scopion as watched:
use mythconverg;
update recorded set watched=1 where title='Scorpion' and subtitle='Dominoes';

To mark it as unwatched:
update recorded set watched=0 where title='Scorpion' and subtitle='Dominoes';

I don't know how the services API takes its input data (it's probably not title and subtitle, but a show ID or something) but it should be fairly easy to figure it out.
(2015-02-20, 13:44)FatGerman Wrote: [ -> ]So as I understand it there's no way to make the new mythtv addon work with 0.27, and no way to make the old cmyth addon work with Helix?
cmyth was removed after helix beta 2. I believe the last nightly that still included it was 11/11. So there's another option: find a good build 11/11 or earlier and enjoy that until myth 0.28 is ready for prime time.

I reiterate that, although your comment indicates otherwise, the the new plugin does work very well with 0.27. The concern some have raised, evidently important to you and others, is that the new plugin can't mark watched shows under 0.27.
(2015-02-20, 14:27)agentgonzo Wrote: [ -> ]OK, just had a quick play - it's quite easy

The syntax is:
update <TABLE> set <key>=<value> WHERE ...;

So to mark the following episode of scopion as watched:
use mythconverg;
update recorded set watched=1 where title='Scorpion' and subtitle='Dominoes';

To mark it as unwatched:
update recorded set watched=0 where title='Scorpion' and subtitle='Dominoes';

I don't know how the services API takes its input data (it's probably not title and subtitle, but a show ID or something) but it should be fairly easy to figure it out.
Not every show even has a subtitle, it is epg dependent. It is also not necessarily unique. Think of a nightly news show. The more correct approach would be to use something unique to the show like chanid and start time.

The patch that introduced the watched/unwatched for the services API is here https://code.mythtv.org/trac/changeset/5...083/mythtv

Dunno if that helps. You will see it uses chanid and starttime. This is the standard way of referring to a recording in mythtv.
Anyone know how to build OE versions of the addon for x86_64 by chance? I tried the guide from http://kodi.wiki/view/MythTV_PVR/BuildFr...o_OpenELEC and received the following errors:

Code:
UNPACK   kodi-pvr-addons
          APPLY PATCH (common)   /home/openelec/OpenELEC.tv/packages/mediacenter/kodi-pvr-addons/patches/kodi-pvr-addons-buildfix.patch
patching file addons/Makefile.include.am
patching file addons/pvr.argustv/Makefile.am
patching file addons/pvr.demo/Makefile.am
patching file addons/pvr.dvblink/Makefile.am
patching file addons/pvr.dvbviewer/Makefile.am
patching file addons/pvr.filmon/Makefile.am
patching file addons/pvr.filmon/src/FilmonAPI.cpp
patching file addons/pvr.hts/Makefile.am
patching file addons/pvr.mediaportal.tvserver/Makefile.am
patching file addons/pvr.mythtv/Makefile.am
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file addons/pvr.mythtv/Makefile.am.rej
patching file addons/pvr.nextpvr/Makefile.am
patching file addons/pvr.njoy/Makefile.am
patching file addons/pvr.vuplus/Makefile.am
patching file addons/pvr.wmc/Makefile.am
patching file lib/cppmyth/cppmyth/Makefile.am
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED -- saving rejects to file lib/cppmyth/cppmyth/Makefile.am.rej
patching file lib/jsoncpp/Makefile.am
patching file lib/libdvblinkremote/Makefile.am
make: *** [release] Error 1
openelec@beast:~/OpenELEC.tv$