[Info] New: Ability to watch ArgusTV (formerly ForTheRecord) Recordings in MPExtended (web or aMPdroid) (1 Viewer)

hairlesshobo

MP Donator
  • Premium Supporter
  • March 18, 2012
    66
    22
    Jacksonville, FL
    United States of America United States of America
    I am a faithful MediaPortal user who also utilizes ForTheRecord as the scheduling engine. I love my HTPC setup, but was bummed out when I found that it was not possible to watch any recordings that were made by ForTheRecord on the MPExtended web interface or in aMPdroid.

    For anyone else who has been in this predicament, I am happy to share the solution I came up with for my own setup. Using the SQL script that I wrote, I am able to synchronize all recordings from the ForTheRecord database to the MediaPortal database. Since ForTheRecord does not use the stock MP TV client, it should be perfectly safe to insert the necessary information.

    Long story short, when this script runs it synchronizes all recordings that are present in the ForTheRecord database into the MediaPortal database. By doing this, MPExtended can then "see" the recordings that are present on the hard disk and is able to stream it as if the recording were made natively by MediaPortal. I really do hope that this script is able to be useful to someone else as much as it is for me.

    Anyone who decides to try this out, please let me know how it goes!

    Notes:
    1. This script only synchronizes in ONE direction. Every time this script is ran, it ensures that the MediaPortal database reflects exactly what the ForTheRecord database shows at the time the script is ran. In order to help prevent situations where a recording originated from MediaPortal itself instead of being added by this script, ALL recordings that are added by this script are marked with a idSchedule of -102.
    2. This script was written for MySQL only, there's an extremely high chance that it will not work at all with MSSQL installations without first being rewritten.
    3. The MediaPortal and ForTheRecord database both must reside on the same MySQL server instance.
    4. When using MediaPortal as the recording engine, the script will not work properly if any of the channels are manually mapped in the MediaPortal TV Server ForTheRecord plugin. This is because the mappings are stored in a XML file that this script cannot access. The best workaround is to make sure that ALL channel names
    5. When using ForTheRecord as the recording engine (untested), the MediaPortal TV server must be installed on the same machine that hosts MPExtended. This is because MPExtended will only access a MediaPortal TV server instance. You should not need to import any EPG or XMLTV data, but you WILL need to make sure that that all channels that exist in ForTheRecord, must also be present in the MediaPortal TV Server. I do not believe that you will need to map any channels to cards, but again, this entire setup is untested. I ask that someone try and let me know how it works out.
    6. If your MySQL database is not on the same machine where MediaPortal and ForTheRecord are located, you will need to install the MySQL client utilities or find another way to run this script and ignore most of the directions here.
    Installation:
    1. Unpack this zip file to anywhere you want.
    2. Edit Synchronize.bat and locate the following lines toward the top of the file:
      • set SQLhost=localhost
      • set SQLuser=root
      • set SQLpassword=changeme
    3. Change the host, username, and password for your MySQL database server. This password is usually 'MediaPortal'
    4. Schedule the bat file to run (see below)
    5. Login to MPExtended Web and/or open aMPdroid on Android and verify that recorded TV shows all the recordings that are available in ForTheRecord.
    Scheduling:
    • To schedule in Windows (tested method), you will need to add a new scheduled task in Windows Task Scheduler. I recommend having the task run every 5 minutes. Just make sure that you specify the start path to the location that you unpacked the zip file to above.
    • This script could also be scheduled in Window's Task Scheduler or setup to run at the start and the end of any recording in ForTheRecord, but this is untested.

    -Steve
     

    Attachments

    Captain Dunsel

    Portal Member
    January 26, 2014
    6
    4
    New York
    United States of America United States of America
    MANY thanks for this! I was looking for a solution for this exact problem. Of course, I am using SQL Server instead of MySQL...

    ...so I took up the gauntlet and ported your SQL script and batch file for use with SQL Server. I am currently using it with Argus TV 2.2.1, MediaPortal 1.6, and SQL Server 2012 Express with SP1 on Windows 8.1 x64 and it works flawlessly.

    I hope that my work honors yours. Again, thanks for doing the heavy lifting!


    CD
     

    Attachments

    Peter2

    MP Donator
  • Premium Supporter
  • September 18, 2006
    848
    53
    Belgium Belgium
    Hi Steve,
    Good for you that you found a solution and nice that you are sharing it.
    Just out of curiosity: I have heard about 4TR but do not know a lot about it, so what is the reason/advantage of using it for recording instead of MePo?
    P.
     

    hairlesshobo

    MP Donator
  • Premium Supporter
  • March 18, 2012
    66
    22
    Jacksonville, FL
    United States of America United States of America
    MANY thanks for this! I was looking for a solution for this exact problem. Of course, I am using SQL Server instead of MySQL...

    ...so I took up the gauntlet and ported your SQL script and batch file for use with SQL Server. I am currently using it with Argus TV 2.2.1, MediaPortal 1.6, and SQL Server 2012 Express with SP1 on Windows 8.1 x64 and it works flawlessly.

    I hope that my work honors yours. Again, thanks for doing the heavy lifting!
    Awesome!! Thanks for your help with this one. Question, aside from the usual converting from MySQL to MSSQL, did you have to do anything in particular to make the script compatible with MP 1.6.0 and Argus 2.2.1? I haven't yet updated my server to the latest version of both apps and was wondering if I should expect to need to make changes to this script in the process.

    Hi Steve,
    Good for you that you found a solution and nice that you are sharing it.
    Just out of curiosity: I have heard about 4TR but do not know a lot about it, so what is the reason/advantage of using it for recording instead of MePo?
    P.
    I found that the power of the scheduling engine in 4TR (Now ArgusTV) is much more powerful than MediaPortal's. I still use MediaPortal as the actual recorder but Argus is used to tell the server when to start and stop recording. Plus there is a handy Android and iOS app available that lets you control the scheduler remotely so you can search for programs and schedule them while you're out and about.
     

    Captain Dunsel

    Portal Member
    January 26, 2014
    6
    4
    New York
    United States of America United States of America
    Awesome!! Thanks for your help with this one. Question, aside from the usual converting from MySQL to MSSQL, did you have to do anything in particular to make the script compatible with MP 1.6.0 and Argus 2.2.1? I haven't yet updated my server to the latest version of both apps and was wondering if I should expect to need to make changes to this script in the process.
    There was nothing Argus-release- or MP-release-specific that I found. The changes were all subtle syntax, substitution of similar verbs and appropriate parameter massaging, explicitly specify default collation in some places, etc. I also globally replaced reference to "ForTheRecord" to "Argus", just because I'm anal retentive. :)


    CD
     

    hairlesshobo

    MP Donator
  • Premium Supporter
  • March 18, 2012
    66
    22
    Jacksonville, FL
    United States of America United States of America
    Awesome!! Thanks for your help with this one. Question, aside from the usual converting from MySQL to MSSQL, did you have to do anything in particular to make the script compatible with MP 1.6.0 and Argus 2.2.1? I haven't yet updated my server to the latest version of both apps and was wondering if I should expect to need to make changes to this script in the process.
    There was nothing Argus-release- or MP-release-specific that I found. The changes were all subtle syntax, substitution of similar verbs and appropriate parameter massaging, explicitly specify default collation in some places, etc. I also globally replaced reference to "ForTheRecord" to "Argus", just because I'm anal retentive. :)


    CD
    Awesome, great to know. And again, thanks for taking the time to port this for all the other SQL server users out there!

    -Steve
     

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

    OP Similar threads Forum Replies Date
    ajs [fixed] 5029: Add the ability to choose the type of pause for designers in the slideshow MediaPortal 1 4
    C Ability to browse videos and audio by folder General 2
    T Moving Pictures...seem to have 'lost' ability to display Movie info. (eg Resolution/Audio) Moving Pictures 2
    K 1.25.0 VOD from .m3u playlist. Is possible to watch? watch/edit Videos 7
    E retaining Watch Status when updating? Newcomers Forum 1
    g0rsq Info box randomly popping up when watching TV or other video MediaPortal 2 Newcomers Forum 1
    SpudR Forum Duplicate lines in 'Watched' Website/Forum/Wiki Feedback 2
    TLD Can not watch tv from remote clients Television (MyTV frontend and TV-Server) 19
    R Visual status of watched TV programs MediaPortal 1 Talk 2
    M How to Watch my videos from my Media Portal to My TV without TV Tuner Newcomers Forum 1
    limpwhizkid 1.22.0 Stutter and or artifact problem when recording and watching the same live tv channel 1.22 2
    K sudden complication watching recorded TV Newcomers Forum 6
    R [solved] Watching a record during recording stops sometimes 2.2 Archive 30
    Scheibes Automatischer Serienimport fehlerhaft (Share Watch) Allgemeines Support- und Diskussionsforum 18
    doskabouter Black screen while watching some iptv streams General Support 2
    A Flag Mover: backup and restore watched flags Plugin Development 33
    zunixnuz TV recording is watched state 1.20 2
    A Plugin to transfer watched states between two MP2 installations Archive 47
    CyberSimian MP 1.20: Watched percent sometimes incorrect MediaPortal 1 47
    M partially watched video/song/recorded tv show file text color + remember cursor in folders other features (of release or svn versions) 28
    Alberto83 [no Bug] Watched status not retained when rewatching an episode and stopping. Archive 49
    doskabouter Notification mail for new posts on watched threads Website/Forum/Wiki Feedback 5
    M Recorded TV - Watched status is not updated 1.20 Pre Release 11
    N Can't Watch DVB-T2 Channels General Support 44
    mp2-ulrich [solved] MP2 W10 watching tv not possible General 3
    Similar threads

























    Top Bottom