Automated Recorded TV Import

Doctor Eggs

New Member
September 24, 2015
4
1
Home Country
United States of America United States of America
I'd like to better automate adding files into MediaPortal via TV-Server. I'm using the beta version on PlayOn which now allows you to "Subscribe" to a TV show so it will automatically record the show to MP4 once it's available online. My process is:
1. TV show gets recorded from PlayOn
2. MCEBuddy converts it to .ts and moves it to the Recorded TV folder that MP uses
3. I manually create a basic XML file for MediaPortal to use (I created a dummy channel in MP called PlayOn that is used in the XML)
4. I go into TV-Server >> Recording >> Database Import tab and import them

Is there any way that I can automate steps 3 and 4 so that it automatically shows up in my recordings?

Thanks.
 

Edalex
Country flag

Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,909
    113
    Saratov
    Home Country
    Russian Federation Russian Federation
    Hello, step 3 could be easily automated with script on any programming language. Step 4 could be automated by reproducing code which used in TV Server configuration for import in another script.
     

    morpheus_xx
    Country flag

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,188
    113
    Home Country
    Germany Germany
    @Doctor Eggs I know you are using MP1, but I only want to mentioned that there is an alternative way in MP2:

    The detection of recordings in MP2 is not limited to .ts, it also supports any other video format. This includes .wtv and .dvr-ms. Because you already have an .xml associated, the channel name, recording start/end will be extracted automatically and the recording will appear inside MP2 Recordings view.

    You might consider this option, as it removes the need for conversion .mp4 -> .ts and the manually taken steps. Another advantage is that also series are looked up from online sources and metadata and fanart is downloaded.

    Edit:
    One thing is needed to be changed for TVE3 recording metadata extractor: there is a limit to look only at ".ts", which needs to be removed (https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Tve3RecordingMetadataExtractor/Tve3RecordingMetadataExtractor.cs#L199-L200).

    I can provide an update if you are interested in trying this way.
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    113
    Home Country
    Hungary Hungary
    You might consider this option, as it removes the need for conversion .mp4 -> .ts and the manually taken steps. Another advantage is that also series are looked up from online sources and metadata and fanart is downloaded.
    Will he play the mp4 files inside the TvPlugin?
     

    mm1352000
    Country flag

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,541
    113
    Home Country
    New Zealand New Zealand
    The possibilities depend on the intention.
    If the intention is only to be able to play the files then the OP could simply import the files as videos in either MP1 or MP2 without need for conversions.
    If the intention is to prevent duplicate recordings in future then they must be imported by TVE as TV recordings, which MP2 does not do.
     

    morpheus_xx
    Country flag

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,188
    113
    Home Country
    Germany Germany
    If the intention is to prevent duplicate recordings in future then they must be imported as TV recordings, which MP2 does not do.
    I know about the logic of avoiding duplicate recordings.

    What came to my mind in this regard:

    Wouldn't it be good to extend the series schedule logic to allow checking "external" sources (from the view of TV library) for the existance of episodes?
    In MP2 terms this could be a query to MediaLibrary if the episode already exists, no matter in which format.
    (For MP1 this is not so easy, as the TvSeries plugin doesn't use a central database.)

    This might be a good option for TVE3.5. Maybe this also could be extended with more logic, i.e.:
    • Record only if the broadcasted resolution (HD) is higher than the existing local stored episode (SD)
     

    mm1352000
    Country flag

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,541
    113
    Home Country
    New Zealand New Zealand
    <off-topic>

    Wouldn't it be good to extend the series schedule logic to allow checking "external" sources (from the view of TV library) for the existance of episodes?
    In my opinion this is significantly more effort (and configuration) than simply importing the files from the file system directly. Otherwise there are too many sources and meta-data types - Plex, Emby, XBMC/Kodi, WMC, MP1, MP2, ARGUS, downloads... the list goes on... - to support. I certainly don't have the time to support all of those options for TVE 3.5 when nobody is helping... and since I don't use any of those alternative sources, I also have no interest.

    Maybe this also could be extended with more logic, i.e.:
    • Record only if the broadcasted resolution (HD) is higher than the existing local stored episode (SD)
    Yes, possibly.

    </off-topic>
     

    Doctor Eggs

    New Member
    September 24, 2015
    4
    1
    Home Country
    United States of America United States of America
    Thanks for all the replies.

    I'm using MP1 in conjunction with Kodi/XBMC as the front end and have everything working perfectly. I wouldn't be opposed to going to MP2, but I've seen posts about it not working well with Kodi just yet.


    As far as having them in the videos section: For me, the videos/tv series section are things that I'm going to binge watch and/or watch again at a later date and so I want to keep them. The recorded tv section is for stuff that I'm watching week to week and/or never going to watch again and so I want to delete them after I watch them.


    I know I'm making more (potentially unnecessary) work for myself by doing things this way but keeping things organized like this helps me out a lot.

    I haven't dug that deep into MP, but could I write a SQL script that checks if the file already exists and if not, insert it in there? Or am I asking for a lot of trouble?
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom