Sync databases by Media Sync Service | Page 2

Discussion in 'MediaPortal 1 Talk' started by ajs, February 9, 2019.

  1. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,404
    Likes Received:
    2,486
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,406 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    No, I'm from UA ;)

    --
    WBR, ajs :):whistle::coffee:


     
    Last edited: February 13, 2019
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,404
    Likes Received:
    2,486
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,406 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    Those. Any changes on one of the clients will be broadcast to and from the server to all other clients?
    If so, then I think everyone needs such a tool.
    We have a sync plugin, but it only works in one direction. From the main client to the server and from the server towards other clients.
     
  4. Anthony Vaughan
    • Premium Supporter

    Anthony Vaughan MP Donator

    Joined:
    June 25, 2015
    Messages:
    218
    Likes Received:
    27
    Gender:
    Male
    Ratings:
    +44 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Hi ajs

    My software does not have to be installed all at once. For example, the synchronization feature can be installed on its own and it doesn't need to access the SQL database, so you can have that straight away. The issue now, is where to install it. I install my software on the same machine that contains the SQL database. In my setup this machine is separate from the TV server. But the sync service can be installed anywhere so long as it has access to all of the client databases and is running 24/7.

    In my setup I use the shared configuration option in MP1 where I have a MediaPortalDirs.xml file in the user section of each client machine pointing to the SQL database machine and setup all of the client databases on the same machine - so the configuration, skins, databases etc. are all on the same machine but not the TV server. I find that MP1 works best when the TV server doesn't have many competing processes on it.

    I think the best way to proceed is for me to send you the software and for you to see how you go from there.

    The sync service does three things:
    • Processes a video database when it is changed (by a client MP closing) and copies the result to overwrite all other declared client databases;
    • Periodically processes any video file changes that have been queued because one of the client video databases is locked at the time of one of the MP clients being closed; when the MP system is idle;
    • Periodically clears down obsolete data from the video databases.
    Let me know if you have any questions about how to set up the system.

    Tony

    P.S. do you have a SQL Server database or only a MySQL database. If the former, I can give you all of the software. If you only use MySQL, I need to update my system to work with MySQL; but that will take a while.
     

    Attached Files:

    Last edited: February 13, 2019
  5. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,404
    Likes Received:
    2,486
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,406 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    You use shared configuration in MP for databases? And all work? At me not :( db lock problem.
    But thumbs at me worked.

    --
    WBR, ajs :):whistle::coffee:
     
  6. Anthony Vaughan
    • Premium Supporter

    Anthony Vaughan MP Donator

    Joined:
    June 25, 2015
    Messages:
    218
    Likes Received:
    27
    Gender:
    Male
    Ratings:
    +44 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Yes, I have the shared configuration working very well. Did you follow the instructions carefully about how to install the MediaPortalDirs.xml file. It really does work but you have to plan the installation carefully.

    BTW, are you using SQL Server or MySQL?

    Tony
     
  7. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,404
    Likes Received:
    2,486
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,406 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    At me in shared not work TVSeries, and some other plugins I don’t remember

    --
    WBR, ajs :):whistle::coffee:
     
  8. Anthony Vaughan
    • Premium Supporter

    Anthony Vaughan MP Donator

    Joined:
    June 25, 2015
    Messages:
    218
    Likes Received:
    27
    Gender:
    Male
    Ratings:
    +44 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Okay. The shared configuration shouldn't have any effect on the functionality of MP. However, The Media Sync Service will work for non-shared setups, but the machine that you install the Media Sync Service on must have read/write access rights to all of the client databases; you will need to setup shared access to all of the VideoDatabaseV5.db3 client files.

    Tony
     
  9. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,404
    Likes Received:
    2,486
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,406 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    When run one client, no problem, when run other client, And both clients start to access the same database (Video or TVSeries or FanartHandler), there are delays, up to the Mediaportal hangs, and all this because of the database lock.
    Hmmm...
    Physically copies the database when you close Mediaportal? Where? Or?
    I did not quite understand what the video files were about. :(
    Analyzes the presence of files? What about portable devices?

    As I see the work of two-way synchronization:

    There are 3 computers with Media Portal. There is a server with a directory for sharing information. In this directory are all databases.

    We watch a movie on one of the computers and turn off the view in the middle, go to the second computer and continue to watch from the same place.

    Reset the viewing flag, it is dropped everywhere.

    At the same time, a new episode appears in the series, on the third computer it is imported and immediately the information about it is transmitted to the other two.

    The same is about films, we import a new film on any of the computers and there is information for everyone.

    When you turn on 4 computers that were turned off for a week, we get a fully up-to-date database on it.

    You also need conflict analysis, because Import of the same episode or film can be simultaneously on several computers. performed automatically.
     
  10. Anthony Vaughan
    • Premium Supporter

    Anthony Vaughan MP Donator

    Joined:
    June 25, 2015
    Messages:
    218
    Likes Received:
    27
    Gender:
    Male
    Ratings:
    +44 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Hi ajs

    The help file I sent you explains how the Media Sync Service works and answers several of the questions you pose.

    The Media Sync Service has no effect on TV series. It only deals with VideoDatabaseV5.db3 files, not with the MyTvDb SQL database. The VideoDatabaseV5.db3 files contain the videos/programs you have recorded and monitors where last watched position is of any programs that have been watched, whereas the MpTvDb database contains programs you have recorded and whether those programs belong to a schedule/series.

    Each MP client has a separate VideoDatabaseV5.db3 file and the Media Sync Service ensures that changes in one VideoDatabaseV5.db3 file are distributed to all other client VideoDatabaseV5.db3 files. If there are VideoDatabaseV5.db3 files in your setup that are not available at the time that a program has been watched by another client, because the machines holding those VideoDatabaseV5.db3 files are switched off, then they will not be updated with changes stored in the MpTvSync SQLite database until they use MP and close MP again, because the Media Sync Service is only triggered when a MP client session closes.

    This is why it is so important that the client databases be located on a machine that is always running. Doing this will then ensure all client databases are kept synchronized irrespective of whether the client machines are turned on or off.

    The Media Sync Service is working in my setup, that has five clients, with no issues. I am content to keep using my system and don't need to share it, but am happy to do so provided testers are clear about what their setups are so I can appreciate what is going on when problems arise. I don't feel that I have enough information to understand what your setup is or appreciate what you are expecting that the Media Sync Service does not provide.

    But I guess this is always the issue with trying to help remote users...

    Tony
     
  11. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,404
    Likes Received:
    2,486
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,406 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    VideoDatsbase - database of MyVideo plugin, in this plugin i have all my Movies collection and sync it and other database by MPSync plugin.


    --
    WBR, ajs :):whistle::coffee:
     
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!