[Plugin] MPSync - MediaPortal multi-seat Synchronization (2 Viewers)

nyt

Retired Team Member
  • Premium Supporter
  • October 15, 2009
    199
    48
    Home Country
    United States of America United States of America
    Hi nyt

    I decided to develop a simpler synchronization application for my own use that only maintains and synchronizes the MpTvDb SqlServer database with the VideoDatabaseV5.db3 across multiple PCs. It has negligible effect on performance and maintains the resume values across all PCs in the VideoDatabaseV5.db3 files (but I don't do anything except pass across the watched setting). It also synchronizes video watched by one PC with all other PCs or new films loaded by one client with other clients.

    I have not submitted this software for general use because it doesn't fit into the general MediaPortal software pattern - because it uses WPF and entity framework and I really only needed this functionality for myself and am not trying to compete with (or step on the toes of) the developer of MPSync.

    If you want to try this software out then contact me at tony.vaughan@safehelp.com and I'll send you what you need.

    I would attach a help file that describes what this software does but its extension is not allowed in this forum which is why I suggest you contact me directly.

    Tony

    I'd test it, but I do not use that functionality. I'm just looking to sync moving pictures and mp-tvseries
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,654
    3,120
    Nuenen
    Home Country
    Netherlands Netherlands
    I do not have those slowness issues myself, but possibly that's because of my usecase (only sync movingpictures database (without watched status)+thumbs from central server to client).

    Perhaps checking the logs of a sync where it's slow, or unexpected results can help
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Hi nyt

    What do you mean by moving pictures and mp-tvseries? Do you mean movies and tv programs recorded using MediaPortal. If so, then that is what I was talking about.

    It occurs to me that, if you install MpSync on the same machine as MediaPortal server (i.e. where TVService is running), you may get poorer performance because MediaPortal server does use quite a bit of that machine's resources. You could try installing MpSync on another machine. I have my sync application running on my database server and have not experienced any performance issues.

    Get in touch if you want to try my app.

    Tony
     

    nyt

    Retired Team Member
  • Premium Supporter
  • October 15, 2009
    199
    48
    Home Country
    United States of America United States of America
    Hi nyt

    What do you mean by moving pictures and mp-tvseries? Do you mean movies and tv programs recorded using MediaPortal. If so, then that is what I was talking about.

    It occurs to me that, if you install MpSync on the same machine as MediaPortal server (i.e. where TVService is running), you may get poorer performance because MediaPortal server does use quite a bit of that machine's resources. You could try installing MpSync on another machine. I have my sync application running on my database server and have not experienced any performance issues.

    Get in touch if you want to try my app.

    Tony

    I'm not using tvservice at all. Moving pictures and mp-tvseries are plugins for downloaded media.

    Moving Pictures

    MP-TVSeries
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Hi nyt

    Okay. I get it. I don't have a solution for that since I don't use those apps.

    The reason I developed my program is because I wanted to ensure that when I watched part of a tv program using one client pc, I would be able to resume watching that program from a different client from where I left off before. I had to develop something to deal with this because each client connects to a single user database called VideoDatabaseV5.db3 that stores the last viewed position of a program.

    This is why it is necessary to synchronize the VideoDatabaseV5.db3 database across all clients. The problem is that when more than one client is watching programs at the same time, and since these databases are only updated when the client MediaPortal program is closed down, the VideoDatabaseV5.db3 files are locked and cannot be updated while MediaPortal is open (because they are single user databases).

    My solution is to queue all VideoDatabaseV5.db3 changes and apply them to all declared databases when each of the client databases become unlocked.

    My app also synchronizes movie information, but only that stored in VideoDatabaseV5.db3.

    I hope this explains what my app does for those who may be interested.

    Tony
     

    m3rcury

    Development Group
  • Team MediaPortal
  • August 12, 2010
    977
    733
    Home Country
    Malta Malta
    Is MPSync incredibly slow for anyone else? I've installed and set it up, and it seems to mostly work, however it doesn't seem to synchronize properly all the time, sometimes media shows as missing even though it's not, and it's incredibly slow and makes mp almost unusable. I'd really like to have synchronization between multiple pcs and this seems to be the only option...

    @nyt. The plugin is designed to synchronize in the shortest time possible, so it does submit a lot of threads. Having said this, you can configure how many threads it submits as can be seen from the attached screen shot.

    upload_2019-12-7_9-41-42.png


    Please also note that when you do have a lot to synchronise, you can launch the synchronisation outside of MediaPortal from the configuration screen itself. This allows for the bulk of the process to be done prior to launching MediaPortal.
     

    nyt

    Retired Team Member
  • Premium Supporter
  • October 15, 2009
    199
    48
    Home Country
    United States of America United States of America
    @nyt. The plugin is designed to synchronize in the shortest time possible, so it does submit a lot of threads. Having said this, you can configure how many threads it submits as can be seen from the attached screen shot.

    View attachment 203116

    Please also note that when you do have a lot to synchronise, you can launch the synchronisation outside of MediaPortal from the configuration screen itself. This allows for the bulk of the process to be done prior to launching MediaPortal.

    I didn't set any thread limits, External sync took over 25 minutes before I canceled it. Was super slow. I'll grab some logs when I get a few minutes.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    I'm not using tvservice at all. Moving pictures and mp-tvseries are plugins for downloaded media.

    Moving Pictures

    MP-TVSeries

    Hi nyt

    I have had a look at Moving Pictures and MP_TVSeries and I think I have a solution. I had developed a Sync app that only processed the Video database. I have now re-developed the app from the ground up to develop any database, but with one caveat - the databases are divided into two categories; primary or non-primary.

    Primary databases are:

    Fanart;
    Folder;
    Music;
    Picture;
    Video.

    Non-primary will be any other database.

    Primary databases require considerable development to synchronize, whereas non-primary databases are simply captured by a file watcher and copied to all other clients or to a queue when files are locked. This adjustment to my strategy at least allowed me to offer a versatile solution with a reasonable development time. BTW, you don't HAVE TO declare primary databases as primary in my app. For example, if you know that your system will only process the picture database from one client at a time, then you can safely declare the picture database as a non-primary database. It will then be copied to all clients without detailed processing - far faster than the alternative.

    The primary databases will be processed record by record to apply any changes and copied to all clients. Non-primary databases will only be copied to clients.

    For this to work, users will need to take care to avoid running non-primary databases using processes that update the database from more than one client at a time.

    The app is a real-time, peer to peer, sync application, using a separate database to store client databases changes for primary databases and applying the changes to all clients. The app must be installed on a machine running 24/7; preferably not the MP server machine, otherwise client changes may be lost.

    Let me know if you are interested in trying it out. I have been using it for over a year in its earlier version without issues, but have only just finished testing the latest version - with primary and non-primary databases.

    Tony
     

    nyt

    Retired Team Member
  • Premium Supporter
  • October 15, 2009
    199
    48
    Home Country
    United States of America United States of America
    Hi nyt

    I have had a look at Moving Pictures and MP_TVSeries and I think I have a solution. I had developed a Sync app that only processed the Video database. I have now re-developed the app from the ground up to develop any database, but with one caveat - the databases are divided into two categories; primary or non-primary.

    Primary databases are:

    Fanart;
    Folder;
    Music;
    Picture;
    Video.

    Non-primary will be any other database.

    Primary databases require considerable development to synchronize, whereas non-primary databases are simply captured by a file watcher and copied to all other clients or to a queue when files are locked. This adjustment to my strategy at least allowed me to offer a versatile solution with a reasonable development time. BTW, you don't HAVE TO declare primary databases as primary in my app. For example, if you know that your system will only process the picture database from one client at a time, then you can safely declare the picture database as a non-primary database. It will then be copied to all clients without detailed processing - far faster than the alternative.

    The primary databases will be processed record by record to apply any changes and copied to all clients. Non-primary databases will only be copied to clients.

    For this to work, users will need to take care to avoid running non-primary databases using processes that update the database from more than one client at a time.

    The app is a real-time, peer to peer, sync application, using a separate database to store client databases changes for primary databases and applying the changes to all clients. The app must be installed on a machine running 24/7; preferably not the MP server machine, otherwise client changes may be lost.

    Let me know if you are interested in trying it out. I have been using it for over a year in its earlier version without issues, but have only just finished testing the latest version - with primary and non-primary databases.

    Tony

    Sure, will try it, url for details?
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Sure, will try it, url for details?

    The app comes in two parts:

    1) Windows service;
    2) Governing windows application you should use to configure the windows service. There is a help file that explains how the service works.

    Please find them attached.

    Please let me know if you have any questions.

    Tony
     

    Attachments

    • Safehelp.MediaSyncServiceSetup.msi
      3.4 MB
    • Safehelp.MediaServicesConfigurationSetup.msi
      8.5 MB

    Users who are viewing this thread

    Top Bottom