Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

[REL] MythTV plug-in

schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass
edited September 2016 in Plex Channels

Update: version 0.5beta has been released for beta-testing - see https://forums.plex.tv/topic/86644-mythtv-plug-in/page-13#entry852522 for features and other details.

 

Note: This is a beta-release, and will contain (even) more errors than a regular release. If you're not prepared to put up with this, wait for the regular 0.5 release which is expected in a couple of weeks (quicker if enough of you volunteer for beta-testing)

 

 

 

Update: version 0.4 fixes bug causing snippets of live TV (watched using the MythTV frontend) to appear as recordings

 

Note: PlexSync - which stopped working for recordings a while back - now works again after I upgraded my Ubuntu to Plex Media Server 0.9.11.4. I'm crossing my fingers that it doesn't break again - but so far it's good (on iOS clients)

 

 

 

Update: version 0.3 fixes bug causing deleted recordings to remain visible.

 

 

Update: version 0.2 now supports PlexSync!

If you have a PlexPass account (required for the PlexSync feature, I believe), you can now sync MythTV recordings to you Plex client (e.g. iPad) for offline viewing. See http://mymediacenter.me/2012/11/26/new-plex-feature-plexsync/

Note: 2 lines of code on my part - all credit goes to the Plex team for the awesome PlexSync feature!


Guys,

I've had MythTV installed and working on my servers for ages (3-4 years) - primarily for recording TV - but is has always been a bit of a pain to actually play back the recordings on the TV in the family room.

So having enjoyed the ease-of-use of Plex with a Roku3 client for a while, I thought I'd try to make a plugin allowing me to watch MythTV recordings through Plex.

The result has passed the family test (ḱids & wife have used it for a couple of weeks now), so I thought I'd share the results, in case anyone else out there could use it:

The plug-in can be found at https://github.com/tschaumburg/MythRecordings.bundle, along with a wiki at https://github.com/tschaumburg/MythRecordings.bundle/wiki, including installation instructions and a load of screenshots.

Note that this plugin requires that you have a Linux server with a working MythTV backend (I can recommend the MythBuntu distribution, which wraps everything in one install - but expect the tuning of channels and setup of program guide data to be a bit cumbersome...:-).

Let me know if you find this useful - and contributions through github are most welcome!

Here's a screenshot (the gobbledegook in the programme descriptions is Danish - hopefully your EPG provider will have descriptions in your language!):

iPad3.png

Tagged:
«13456720

Comments

  • cvance090685cvance090685 Posts: 1Members, Plex Pass Plex Pass

    Hi,

    I just installed you plugin onto my plex box and it works great. I can help you test if you need a volunteer. Thanks for tying two great projects together.

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    Hi cvance (and other interested plex'ers),

    You're most welcome as a tester - I suspect the best way to report bugs will be the github site (feature suggestions too).

    It'll also be useful for me to know how must you're using the plugin - just so I can get a feeling for the test coverage (and interest) before eventually deciding if I should submit it to the supported channels.

  • bryanp22bryanp22 Posts: 26Members, Plex Pass Plex Pass
    Does this support live tv and scheduling recordings?
  • alexvdalexvd Posts: 82Members, Plex Pass Plex Pass

    This is fantastic. I have been asking for this forever.   I am happy to get Mythtv into Plex.    Would it be possible to have an additional way to view the recordings show up Plex style.   Grid with TV show artwork poster.   Than maybe have little icons for episode.   

    Ideally this would be able to support watching live tv so that I could watch a recording in progress.  

    Happy to contribute.

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @bryanp22:

    Presently no on both counts.

    Scheduling will be very difficult to implement with the UI framework available to plugins. And personally, I do scheduling using my iPad, which I find much more usable. I am using the torc app (which costs around 5 USD), but the web-based scheduling baked into MythTV is very good too.

    So I have no plans to add scheduling to the plug-in. But you're welcome to give it a shot :-)

    As for live TV, it should be easy to add *if* the MythTV services API (http://www.mythtv.org/wiki/Services_API) supports it. I don't feel any pressing need for liveTV-through-Plex myself (I find the good old TV set sufficient for that:-), but I'll be happy to supply hints & pointers if anyone feels like adding this

    /thomas

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @alexvd:

    Thanks!

    The visual aspect of the plugin definitely needs some attention ("I'm an engineer - I don't do 'pretty' ").

    In Denmark, the series/season/episode concept is woefully under-supported in the XMLTV metadata available to MythTV, and the local producers and networks apparently haven't discovered thetvdb.com or xmltv. So I don't have much actual sample data to work with. Any input (or code) welcome!

    As for watching a recording in progress, it all depends on when the recording shows up in the MythTv services api (http://www.mythtv.org/wiki/Services_API) - when the recording starts or when it finishes. In the former case, I'd think you could start watching the recording a few seconds after it started.

    And any contributions are more than welcome - I'll be happy to provide hints/ideas/pointers, just ask!

    /thomas

  • alexvdalexvd Posts: 82Members, Plex Pass Plex Pass
    edited November 2013

    I get my guide data in the US from schedules direct.   Its very accurate.   Would it be possible or beneficial to share that with you somehow?   What about a recording that has metadata lookup done on it?

    1

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @alexvd

    If you can

    1. Describe how you'd like to see a series/season/episode tree to look. References to an existing plugin would be useful - then I can peek at that code to see how to get the layout right
    2. Send me MythTV GetRecoding XML data for a couple of episodes

    I'll have a look at it, and maybe I can whip something up :-)

    Just to manage your expectations, though: since this is something that I can't test (and won't be able to benefit from myself, for the reasons mentioned earlier), it'll probably be more like a sketch for you to work on :-)

    But if you're up for some Python coding, we should be able to get something working.

    Hope this helps

    /Thomas

  • bryanp22bryanp22 Posts: 26Members, Plex Pass Plex Pass
    I was looking at the API briefly and it wasn't completely obvious if live tv is available from what's exposed for http live streaming. I may have to configure a backend and see what I get sending sample requests with soapUI.
  • elisiussenelisiussen Posts: 5Members, Plex Pass Plex Pass

    What if my Plex server and MythTV server are on two different machines? Can it still be used?

  • GrahamH68GrahamH68 Posts: 3Members, Plex Pass Plex Pass

    Works great!   One small niggle at this point; is it possible to filter out deleted recordings?  Would be nice to be able to delete recordings too.

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @DebugBug: yes, the servers can be on different machines - in the plugin settings page (the gearbox icon on the top page of the plugin), set the MythTV backend IP (and port number, if you've changed it)

    @GrahanH68: Hmmm, I actually thought that deleted recordings (as in: "deleted using the MythTV frontend") actually did disappear. I'll have to test that.

    And deleting recordings using the plugin? Yes, I'd like that too!

    The problem isn't the actual deleting - it's how to fit it meaningfully into the user interface (i.e. where and how to put the delete button). I'd like to put a "delete" button next to the "play" button, but there's no way to do that. So if you find a plugin that has a good way of deleting entries, let me know, and I'll try to copy that!

  • extzedextzed Posts: 72Members, Plex Pass Plex Pass
    schaumburg wrote on November 28 2013, 7:43 AM: »

    @alexvd

    If you can

    1. Describe how you'd like to see a series/season/episode tree to look. References to an existing plugin would be useful - then I can peek at that code to see how to get the layout right
    2. Send me MythTV GetRecoding XML data for a couple of episodes

    I'll have a look at it, and maybe I can whip something up :-)

    Just to manage your expectations, though: since this is something that I can't test (and won't be able to benefit from myself, for the reasons mentioned earlier), it'll probably be more like a sketch for you to work on :-)

    But if you're up for some Python coding, we should be able to get something working.

    Hope this helps

    /Thomas

    Thomas - thanks for the plugin!  I'm new to mythTV but have been using Plex for a while now.  I can pull up my recordings without a problem, but I could see organization being an issue.  In my mind a logical grouping for show would be: MythTV Recordings -> Show Title -> Date of Broadcast

    For example:

    MythTV Recordings

    --> The Walking Dead

         ----> December 1, 2013

         ----> November 24, 2103

    ----> Big Bang Theory

         ----> November 28, 2013

        ----> November, 21, 2103

    Something like that would make sense to me.

  • pabergeronpabergeron Posts: 4Members
    edited December 2013

    Hello,

    I'm a new Plex user but a very old Mythtv user.  I have been trying to make the plugin show in Plex without any success.  I have followed the install process and unzip the file into my /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins folder.

    I'm under MythBuntu version 12.04.

    I have been using the new ChromeCast and PlexPass under Android.  My goal is to get rid of the computer on my TV and rely only on ChromeCast to show my TV recordings from my Mythbackend.

    Hope some will be able to help me.

    Regards...

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    Hi pabergeron,

    I haven't tried the Chromecast route yet (I'm using a Roku 3 - but I've got 2 Chromecasts lying on my desk). But mythrecordings is a plain vanilla plug-in (no fancy tricks), so it absolutely *should* work.

    But to diagnose your issues, let's go quickly through a checklist (I'm away from my system now, so I'm going to be a bit vague on specific paths and details - it's all from memory):

    1. Check that the directory structure of the unzipped plugin looks like other functioning plugins (its "neighbours" in the .../Plug-ins folder). It is a common mistake to add an extra directory (e.g. .../Plug-ins/mythrecordings/mythrecordings/...)
    2. Does the plugin show when you use the web client? There should be a MythTV logo in the "Channels" section...
    3. Is there anything in the log files? If memory serves (and often it doesn't...), the logs are in a "Logs" directory next to "Plug-ins" - there should be a general log (mediaserver.log, or something like that), and a set of plug-in specific logs (e.g. mythrecordings.log)

    /Thomas

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @pabergeron

    This just occurred to me: if mythrecordings shows up in the web client but not in chromecast, it may have to do with the "PlexClientPlatforms" setting.

    PlexClientPlatforms is a config setting for any plugin, listing the clients that the plugin supports. I have just added them all: "Android,iOS,Roku,Safari,Firefox,Chrome"

    But the Chromecast may have its own client ID, which just hasn't been published yet...

    So: IF the plugin works in the web client but not from chromecast, THEN try setting the PlexClientPlatforms (in .../Plug-ins/MythRecordings.bundle//Contents/Info.plist) to "*" (asterisk)

  • pabergeronpabergeron Posts: 4Members

    @schaumburg

    Thanks for your help.  Strangely this plugin in in the write directory.  Similar structures as the other plugins.

    Could it be a permission problem?

    Pierre

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @pabergeron,

    OK, so the plug-in is in the right place.

    Permissions? Well, yes, that could be the problem. Again: compare with other, working plugins.

    To rule things out, I still need to know:

    1. Does the plug-in show up in other clients (e.g. the web client in Chrome or Safari)?
    2. Is there a mythrecordings.log? And if so, what does it say?
    3. Is there anything relevant in the general PlexMediaServer.log?

    Oh, and one more crucial thing: did you re-start you Plex server after installing? Otherwise it won't pick up the installed plugins...

    /Thomas

    PS; Log files should be under /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/ on Ubuntu

  • aritafariaritafari Posts: 6Members
    pabergeron wrote on December 15 2013, 10:17 PM: »

    Hello,

    I'm a new Plex user but a very old Mythtv user.  I have been trying to make the plugin show in Plex without any success.  I have followed the install process and unzip the file into my /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins folder.

    I'm under MythBuntu version 12.04.

    I have been using the new ChromeCast and PlexPass under Android.  My goal is to get rid of the computer on my TV and rely only on ChromeCast to show my TV recordings from my Mythbackend.

    Hope some will be able to help me.

    Regards...

    I am in the same boat as pabergeron; my OS version is Ubuntu 12.04

    Tried as I may I couldn't get the plugin to show on the web client.

    I am beginning to think it's a Ubuntu 12.04 issue.

    Has anyone successfully gotten this to work on Ubuntu/MythBuntu 12.04?

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    Let me try to help.

    Below are my key configs - try and go through the same steps and see where your setup differs (be aware that the Plex server that you can get through the Ubuntu package manager is hopelessly outdated - or wrong in some other way - at least I never got it to work. Use the package you can download from the Plex homepage: http://www.plexapp.com/connected/).

    If it still doesn't work, post your commands and their output like I do below - maybe I can spot something.

    I'm on 12.04 too, if I'm reading the below right:

    thomas@mythbackend:~$ uname -a
    Linux mythbackend 3.8.0-34-generic #49~precise1-Ubuntu SMP Wed Nov 13 18:05:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
     
    My Plex version is 0.9.7.22 (a few months old - haven't bothered to upgrade yet:-):
     
    thomas@mythbackend:~$ head /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log 
    Dec 04, 2013 15:56:06 [0x7f847ee1d740] INFO - Plex Media Server v0.9.7.22.510-8faeab3
    Dec 04, 2013 15:56:07 [0x7f847ee1d740] DEBUG - Opening 10 database sessions to library, SQLite 3.7.15.2, threadsafe=1
     
    Around line 143, the above log file says:
     
    ...
    Dec 04, 2013 15:56:30 [0x7f845cff9700] DEBUG - Starting plug-in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/MythRecordings.bundle.
    Dec 04, 2013 15:56:30 [0x7f8475c71700] DEBUG - Waiting for all 24 plug-ins to finish starting.
    Dec 04, 2013 15:56:30 [0x7f845d7fa700] DEBUG - Perfect cache hit, we don't need to start [com.plexapp.agents.thetvdb] yet.
    Dec 04, 2013 15:56:30 [0x7f845d7fa700] DEBUG - Starting plug-in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Apple Movie Trailers.bundle.
    Dec 04, 2013 15:56:30 [0x7f846effd700] DEBUG - Perfect cache hit, we don't need to start [com.plexapp.agents.tvrage] yet.
    Dec 04, 2013 15:56:30 [0x7f846effd700] DEBUG - Starting plug-in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Wikipedia.bundle.
    Dec 04, 2013 15:56:30 [0x7f845cff9700] DEBUG - Perfect cache hit, we don't need to start [dk.schaumburg-it.plexapp.mythrecordings] yet.
    Dec 04, 2013 15:56:30 [0x7f845cff9700] DEBUG -  * Added MythTV recordings at /video/mythrecordings
    Dec 04, 2013 15:56:30 [0x7f845cff9700] DEBUG - Starting plug-in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Scanners.bundle.
    ...
     
    From that point on, I know that the Plex server has found the plugin. Then I can check the plug-ins' own log file:
     
    thomas@mythbackend:~$ head /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/PMS\ Plugin\ Logs/dk.schaumburg-it.plexapp.mythrecordings.log
    2013-12-17 17:03:53,640 (7f065a8b0700) :  INFO (core:336) - Starting framework core - Version: 2.3.12, Build: bd749cb (Mon Nov 18 18:57:02 UTC 2013)
    2013-12-17 17:03:53,641 (7f065a8b0700) :  DEBUG (core:348) - Using the elevated policy
    2013-12-17 17:03:53,641 (7f065a8b0700) :  DEBUG (core:437) - Starting runtime component.
    2013-12-17 17:03:53,642 (7f065a8b0700) :  DEBUG (core:437) - Starting caching component.
    2013-12-17 17:03:53,642 (7f065a8b0700) :  DEBUG (core:437) - Starting data component.
    2013-12-17 17:03:53,642 (7f065a8b0700) :  DEBUG (core:437) - Starting networking component.
    2013-12-17 17:03:53,643 (7f065a8b0700) :  DEBUG (networking:318) - Loaded HTTP cookies
    2013-12-17 17:03:53,643 (7f065a8b0700) :  DEBUG (networking:504) - Setting the default network timeout to 20.0
    2013-12-17 17:03:53,643 (7f065a8b0700) :  DEBUG (core:437) - Starting localization component.
    2013-12-17 17:03:53,643 (7f065a8b0700) :  INFO (localization:408) - Setting the default locale to en-us
     
    From this point on, everything that goes wrong should leave a trace in the log file above
«13456720
Sign In or Register to comment.