Kodi Community Forum
MythTV PVR client Addon Developers Wanted - Developers Only! - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: MythTV PVR client Addon Developers Wanted - Developers Only! (/showthread.php?tid=82015)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35


- divingmule - 2010-10-02

Don't know if this will help anyone but, here is a copy of the xml listings I give to mythtv. It's from microsoft, formerly known as zap-it is what I read somewhere? xmltv.xml

Thanks for everyone's work on this.


- dteirney - 2010-10-02

hads Wrote:Check this changeset for some info on the programid;

http://svn.mythtv.org/trac/changeset/24724

The data from nzepg.org includes season and episode data for some programs.

So, for a Myth 0.23 install using XMLTV the program ID looks like:

[EP|MV|SH|SP][seriesid][episode][season]([partnumber][parttotal])

and for a Myth 0.24 install using XMLTV the program ID looks like:

[EP|MV|SH|SP][seriesid][episode][season(in base36)]([partnumber][parttotal])

I'm sure I can figure out some way to parse that. Will assume that part number and part total are < 10 as that makes things way easier. Don't know what sort of Episodes would fail that assumption...


- hads - 2010-10-02

This is an example showing in mythweb on my system;

EP123422661202

"Lie To Me - 02x20 - Exposed" on TV 3 Wednesday 06 October 2010 20:30.

The series id that myth has chosen in this instance is 123422661


- dteirney - 2010-10-02

There's a patch available now that should parse out the Season and Episode number and put that into the VideoInfoTag for the myth:// data source.

http://trac.xbmc.org/attachment/ticket/7197/mythtv-tvshow-library-r34361.patch

The patch also allows you to scan the myth:// "TV Shows" directory into the XBMC TV Shows Library. Note that this may only work if you are using an XMLTV source and your EPG provides season and episode numbers or an original air date. See the trac ticket for details. http://trac.xbmc.org/ticket/7197

Someone else is looking at how to smash together the myth:// "TV Shows" folder with the existing XBMC TV Shows Library. Hopefully this is a start to getting the season and episode information displayed and grouped correctly.


- PhracturedBlue - 2010-10-02

I've done some investigating of the Schedules-Direct episodeid stuff. The episode data seems to come directly from TMS, who provide the raw data to SD. As far as I can tell, there is no easy way to map the episodeid directly to the season/episode number, however, TMS does seem to provide an accurate 'air date' which should be sufficient. So, the patch dteirney linked to should work fine. I haven't tried it yet myself, but will likely give it a shot this weekend. I am (one of the folks?) working on integrating Mythtv into the Library better. I'll make sure to post back here when I have more interesting results than my proof-of-concept.


- PhracturedBlue - 2010-10-02

FYI, here is a set of recordings I've made recently (Dirty Jobs in this case) with data from SchedulesDirect:
Code:
+----------------+------------+-----------------+
| programid      | seriesid   | originalairdate |
+----------------+------------+-----------------+
| EP006114420007 | EP00611442 | 2005-08-23      | -> S01E05
| EP006114420021 | EP00611442 | 2005-12-20      | -> S01 special
| EP006114420049 | EP00611442 | 2006-08-15      | -> S02E14
| EP006114420077 | EP00611442 | 2007-08-21      | -> S03E14
| EP006114420088 | EP00611442 | 2007-11-13      | -> S03E17
| EP006114420107 | EP00611442 | 2008-01-29      | -> S04E04
| EP006114420128 | EP00611442 | 2008-11-11      | -> S04E21
| EP006114420133 | EP00611442 | 2008-12-09      | -> S04E25
| EP006114420136 | EP00611442 | 2009-01-06      | -> S05E01
| EP006114420137 | EP00611442 | 2009-01-13      | -> S05E02
| EP006114420160 | EP00611442 | 2009-12-29      | -> S05E23
+----------------+------------+-----------------+
What I see here is that the programid is related to the raw episode number, but is in no way related to seasons. Even then, the episode numbers don't line up with TheTVDB. For instance S01E05 should either be episode number '5' or '8' depending on how you count, but SD gives us '7'. S04E25 has a value of '133' and S05E01 has a value of '136', but the only thing between them is a single special.

The SD episode numbers may be related to the order the episodes were filmed, but thevtdb claims that S04E25 is #98 and S-5E01 is #100 so even that doesn't seem to hold.

Anyhow, the 'originalairdate' field from schedules direct does seem to be accurate.


- dteirney - 2010-10-02

More logic now added for the season and episode number parsing. Should deal with SchedulesDirect data as well, e.g. by not setting season and episode, but rather original air date only.

Latest patch attached to http://trac.xbmc.org/ticket/7197

I think the patch is close now. Will look at breaking the commits up and putting in during the week.

@PhracturedBlue: would you be able to test? And yes, you were the person I was referring to regarding the XBMC Video Library and Myth TV Shows folder mashup stuff.

That's all I have time for this weekend. If anyone else working on Myth related stuff can post where they have got to at the end of the weekend that would be great. If someone has stubbed out the Myth PVR Addon classes that would be fantastic.


- dteirney - 2010-10-02

Is anyone interested it putting together a MythTV Source screen that can be used through the "Add Source" GUI? At the moment the only way to add a MythTV source is to know it's possible and type in the URL. Would be great to have a dedicated MythTV source screen where you can type in the IP address / Hostname, MySQL username and MySQL password.

I'm not sure where to start, but perhaps looking at how the other Add Source screens are done would shed some light.


- dteirney - 2010-10-02

dteirney Wrote:Is anyone interested it putting together a MythTV Source screen that can be used through the "Add Source" GUI? At the moment the only way to add a MythTV source is to know it's possible and type in the URL. Would be great to have a dedicated MythTV source screen where you can type in the IP address / Hostname, MySQL username and MySQL password.

I'm not sure where to start, but perhaps looking at how the other Add Source screens are done would shed some light.

If anyone is interested, put up any work at http://trac.xbmc.org/ticket/10405


- markhoney - 2010-10-03

David, I've just been looking at the XBMC Roadmap and spotted that one of the milestones for 11.0 is:

Move the MythTV client code out of XBMC and into a PVR back-end client addon

Given that this is planned for the near future, is it worth writing more code for MythTV in core XBMC, or would we be better off making sure everything's done in a PVR plugin?


- dteirney - 2010-10-03

markhoney Wrote:David, I've just been looking at the XBMC Roadmap and spotted that one of the milestones for 11.0 is:

Move the MythTV client code out of XBMC and into a PVR back-end client addon

Given that this is planned for the near future, is it worth writing more code for MythTV in core XBMC, or would we be better off making sure everything's done in a PVR plugin?

Who do you think will be doing that work though Smile It will be the people following this thread that contribute whatever parts they can.

Some of the parts I am working on right now will still be necessary in some form as part of a PVR Addon, e.g. some level of integration with the XBMC Movie Library and TV Show Library. For me that is the biggest annoyance at the moment. I won't be moving to use the PVR Addon until at least the same level of integration is possible as for the existing myth:// support, e.g. commercial breaks and cut lists loaded for EDL, integration with Movie Library. Some of these areas are a bit blurry as to how they can be integrated via the PVR Addon Extension Point - mainly because I haven't spent enough time looking at how the Extension Point hooks in everywhere.

Any additional changes that are needed to libcmyth for new PVR functionality should probably just be done in the branch. I'm not sure how a library is referenced in an Addon yet. Would be good if someone could perhaps look at that - added to first post.

I can port across any libcmyth changes that makes sense for the existing myth:// functionality as I'd like to make use of any good stuff now rather than waiting for the MythTV PVR Addon to be complete and make it's way into trunk.

The PVR Branch will only be used on a development box for me. Trunk is normally quite stable and that is what our HTPC runs off.


- markhoney - 2010-10-03

David, I totally agree with you that there's a lot of work outside of XBMC that will help with XBMC/MythTV integration (libcmyth sounds like it needs a lot of work, and MythXML doesn't do everything that's needed), and also a lot of work within XBMC that will still be usable once the MythTV code's moved to an addon.

Still, as the PVR-Testing2 branch seems, although not totally stable, at least usable, I figured that creating an addon for MythTV, alongside the existing addons for VDR, TVHeadEnd and MediaPortal, would be a (relatively) easy thing to accomplish - and nice to have done sooner rather than later. Maybe that's the bit I can try and jump in and get done - a quick plugin that can use libcmyth and/or MythXML to provide some basic TV watching and guide importing. Once something's there and working, more of the advanced parts of MythTV can be exposed to XBMC - but for now it'd be great to just have a plugin for the PVR branch that allows watching of TV and viewing of the TV guide.


- dteirney - 2010-10-03

markhoney Wrote:David, I totally agree with you that there's a lot of work outside of XBMC that will help with XBMC/MythTV integration (libcmyth sounds like it needs a lot of work, and MythXML doesn't do everything that's needed), and also a lot of work within XBMC that will still be usable once the MythTV code's moved to an addon.

Still, as the PVR-Testing2 branch seems, although not totally stable, at least usable, I figured that creating an addon for MythTV, alongside the existing addons for VDR, TVHeadEnd and MediaPortal, would be a (relatively) easy thing to accomplish - and nice to have done sooner rather than later. Maybe that's the bit I can try and jump in and get done - a quick plugin that can use libcmyth and/or MythXML to provide some basic TV watching and guide importing. Once something's there and working, more of the advanced parts of MythTV can be exposed to XBMC - but for now it'd be great to just have a plugin for the PVR branch that allows watching of TV and viewing of the TV guide.

Anyone can start the MythTV PVR Addon class structure. tafypz was looking at some of the program guide stuff this weekend so probably had to do a bunch of that to get everything to compile. I'm happy to be the SVN patch bunny to get code into the branch so others can see and use it.

I've moved the ad hoc list-o-work to the wiki. It's hopefully easier for people to put a watch on that page as I don't think people get notified if I keep updating that first post.

http://wiki.xbmc.org/index.php?title=MythTV_PVR_Addon

I guess we can keep using this forum thread to let others know what is being worked on.


- tafypz - 2010-10-03

dteirney Wrote:Anyone can start the MythTV PVR Addon class structure. tafypz was looking at some of the program guide stuff this weekend so probably had to do a bunch of that to get everything to compile. I'm happy to be the SVN patch bunny to get code into the branch so others can see and use it.

I've moved the ad hoc list-o-work to the wiki. It's hopefully easier for people to put a watch on that page as I don't think people get notified if I keep updating that first post.

http://wiki.xbmc.org/index.php?title=MythTV_PVR_Addon

I guess we can keep using this forum thread to let others know what is being worked on.

Sorry for the radio silence guys, I started a class struture from the vdr plugin. I am painfully slow right now (I just had elbow surgery and therefore I am drugged up and typing with my left hand only). I am on the ball, I will provide a first epg via mythXML. Depending on the performance (and dataset limitations) I might investigate a solution using SQL.


- PhracturedBlue - 2010-10-03

dteirney Wrote:@PhracturedBlue: would you be able to test?

The patch in #7197 works very well for me with my SchedulesDirect programs. I added an additional patch to that ticket to do episode-title matching for programs I have that don't have SD info. The title match with TheTVDB works quite well, except that punctuation is sometimes different, and for multi-part episodes, thetvdb often gives the same airdate as well as adding a '(#)' at the end of the title meaning that neither method works properly for these cases.