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

Discussion in 'MPExtended' started by hairlesshobo, September 9, 2012.

  1. hairlesshobo
    • Premium Supporter

    hairlesshobo MP Donator

    Joined:
    March 18, 2012
    Messages:
    66
    Likes Received:
    22
    Gender:
    Male
    Location:
    Jacksonville, FL
    Ratings:
    +22 / 0
    Home Country:
    United States of America United States of America
    Show System Specs
    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


     

    Attached Files:

    • Like Like x 9
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Captain Dunsel

    Captain Dunsel Portal Member

    Joined:
    January 26, 2014
    Messages:
    6
    Likes Received:
    0
    Gender:
    Male
    Location:
    New York
    Ratings:
    +4 / 0
    Home Country:
    United States of America United States of America
    Show System Specs
    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
     

    Attached Files:

    • Thank You! Thank You! x 2
  4. Peter2
    • Premium Supporter

    Peter2 MP Donator

    Joined:
    September 18, 2006
    Messages:
    848
    Likes Received:
    45
    Ratings:
    +52 / 1
    Home Country:
    Belgium Belgium
    Show System Specs
    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.
     
  5. hairlesshobo
    • Premium Supporter

    hairlesshobo MP Donator

    Joined:
    March 18, 2012
    Messages:
    66
    Likes Received:
    22
    Gender:
    Male
    Location:
    Jacksonville, FL
    Ratings:
    +22 / 0
    Home Country:
    United States of America United States of America
    Show System Specs
    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.

    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.
     
  6. Captain Dunsel

    Captain Dunsel Portal Member

    Joined:
    January 26, 2014
    Messages:
    6
    Likes Received:
    0
    Gender:
    Male
    Location:
    New York
    Ratings:
    +4 / 0
    Home Country:
    United States of America United States of America
    Show System Specs
    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
     
  7. hairlesshobo
    • Premium Supporter

    hairlesshobo MP Donator

    Joined:
    March 18, 2012
    Messages:
    66
    Likes Received:
    22
    Gender:
    Male
    Location:
    Jacksonville, FL
    Ratings:
    +22 / 0
    Home Country:
    United States of America United States of America
    Show System Specs
    Awesome, great to know. And again, thanks for taking the time to port this for all the other SQL server users out there!

    -Steve
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!