MediaPortal2-Buddy (1 Viewer)

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi.
    And here is another "Buddy"... Today's Buddy is "MediaPortal2-Buddy" (or short, MP2-Buddy), a tool to do some work around MediaPortal 2, as the name suggests. It is the successor of MP 2.1 Backup & Restore and will replace it completely. All features of the "old" tool are included. There also is a lot new stuff.

    At first MP2-Buddy already is supporting the upcoming new Version 2.2 of MP2. Due to some database optimizations and, much more related, due to the new user management the databases of 2.1 and 2.2 won't be compatible. A direct upgrade is not possible but with MP2-Buddy you can preserve all your watched flags, play counts and play positions of all your movies, series and videos...

    As most features are nearly the same as in the old tool I will explain them only in a shorter way....
    The installation is done by an average installer. Nothing special about, so you will get it done easily. MP2-Buddy needs to be installed on the same system, the MP2 server is running. For special scenarios like migrating from MP 1.x it is possible to install MP2-Buddy on other systems too, but most of the options are only possible on the MP2 server system. And the tool needs admin rights as it needs to alter copy or delete files in system folders or owned by other users/processes. That's why admin rights are necessary. Without it won't run...

    After start you first should do some configuration to fit your needs.
    upload_2018-1-18_14-21-26.png

    The GUI language is available in English and German and can be extended by everyone. The language files are plain text files and can be edited with every text editor (like notepad or something better). Every line contains one term. All that is after the = should be changed into your language, if you want to translate MP2-Buddy.
    On the right you also can activate debug loglevel. But this should not be necessary that often, I hope... And you can activate the backup function for the MP2-Buddy own database. If you backup the watched flags from your MP 2.1 or 2.2 the previous saved data will be erased.. If you have a backup of the MP2-Buddy db you can correct this if needed.
    In the middle you can set some important path to your needs. Normally everything excerpt of the path for Database- backups generated by MP2-Buddy must not be touched, if you've installed MP in the default path...

    The next page is for backup management. Here you can generate, delete or restore db- backups for media library and TV engine...
    upload_2018-1-18_14-29-28.png


    The third page may look familiar if you already use EPG-Buddy.
    upload_2018-1-18_14-30-27.png


    On the left you can set the days and time an automated backup should be done. Time needs to be entered in 24 Hours format. In the middle there are some further options for the schedule and you can enter the number of backups to keep. If the given number of backups are reached the oldest available backup will be deleted. Lower numbers than 2 I would not recommend. If you have enough space you can raise the number for more safety. And on the right you can select which databases should be backed up. As you normally only use one TV engine at a time it is not very useful to backup the database of a TV engine you don't use...
    Below you can delete or create a schedule. Delete normally is not necessary as with a newly created schedule the old one is removed. SO delete only is useful if you completely want to disable automated backups. The backup process itself is using SQLite mechanism and did not disturb MP2 server at all.

    Up to here all is nice and easy. But now it's getting complicated.
    With "old" MP versions, MP 1.x and MP 2.0 there a video is watched or not watched. That's all So we can use a plain text file with a list of watched movies (done with tt number) or series (TVDB-ID, Season and episodes number) to store the watched flags. MP1- TVSeries plugin is using such so called "*.watched" files already since ages. For MP 2.0, MovingPictures, MyVideos and MyFilms there are similar functions included in MP2-Buddy.

    But this has changed dramatically with the release of MP 2.1. As from now on there is a play percentage, a play count and the last position to store. And this for every existing user. In MP 2.1 every client is a different user, from MP 2.2 on there are various users possible where all of them have their own watched flags to preserve. This could no longer be achieved with a simple text file. So MP2-Buddy needs it's own database. Unfortunately it is not enough to save (a part of) the MP2 media library to achieve this. In the MP2 ML everything is identified and connected by a "Media_Item_ID", a GUID or UUID. Those UUID are generated on first import of a item into the ML. For this they are different on every system, every installation of MP2. To assign the play data to a specific movie, episode or video there are lots of very complex database queries needed. And this also is the reason why there are so many options for such a "simple" tast like storing the watched flags...

    For series and movies there are 4 different options where videos only have two.
    upload_2018-1-18_15-0-1.png

    This view nearly looks identical for series excerpt for the first option on the left. For series there only is one radio knob, MP 2.0 as TVSeries has it's own in-build function for this.

    Option 1 is named "*.watched export from:" and this is for saving watched flags from "old" MP versions. You need to specify if you want to save the flags from MP 2.0, Moving Pictures, MyVideos or MyFilms. After you've choose what to export you click on "Start". Now a average file requester appears where you can choose the matching database file to export from. When done a "movie.watched" file is saved in the configured folder. That's all and it will be pretty fast...

    Option 2 is named "Save from:" and here you can select if you want to save from MP 2.1 or MP 2.2. Then another window appears:
    upload_2018-1-18_15-7-17.png

    On the right you can select for which user you want to backup the data. Best is to backup the data for all users as you always can select what you want to restore later... Then click "Start" and the backup process is running. This will take a while, so please be patient. You only can store one backup per MP Version, 2-.1 and 2.2.

    Option 3 is named "Import *.watched to:" and is used to migrate from older versions to 2.1 or 2.2. For this you first need to backup the "new" data (as in Option 2) This is needed even if you haven't played a single media up to now with the new system. If not there are no data in the MP2-Buddy database to match the *.watched files to. Then this window appears:
    upload_2018-1-18_15-13-8.png

    Here you can select to which user (or also possible to all users) the watched flags should be imported. Then press "Start" and the magic begins...

    And finally Option 4 named "restore watched flags to:" Select to which MP2 version you want to restore the flags and click on "Start" Now this window appears:
    upload_2018-1-18_15-17-18.png

    In the middle you need to select from which MP version you want to restore the data and from which user. On the right you can select to which user the data should be saved. This way you can migrate from 2.1 to 2.2 but you also can transfer the watched data from one user to another easily...

    For options 3 and 4 it is necessary to stop the MP2 server as there are changes done directly to the server's database. Normally this isn't planed so lots of ugly things can happen, if you try to do so while MP2 server is running. This even can lead to a completely destroyed MediaLibrary. (Lucky you, if you have a backup handy then ;) ). You will be asked if it is allowed to stop the MP2 server as this will interrupt recordings, Live-TV and media playback. If you deny, the process is canceled, if you allow it will stop the MP2 server, do it's job and as soon as possible start MP2 server again. The restore process can take a while (my "tiny" series collection of 40.000++ episodes needs more than one hour on a Core i5 system) so better don't do this right before the Superbowl begins...

    The design kindly was provided by @ge2301

    The recent version is 2.2.0.4 and is attached here.

    This is the first public release, so feedback is very welcome.
     

    Attachments

    • MediaPortal2-Buddy_2.2.0.4.exe.zip
      2.3 MB

    JSchuricht

    MP Donator
  • Premium Supporter
  • January 13, 2009
    239
    45
    Arizona
    Home Country
    United States of America United States of America
    The Status Tools Save from MP 2.1 for Movies isn't working for me. Saving for all users or a specific one gets the overall progress bar a bit over 1/2 with no movement after 20 hours. Series export works and worked for the import to MP 2.2.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Due to many changes in MP 2.2 database since this tool was released it is not really compatible any longer. But the watched flags are preserved if you upgrade from 2.1.3 to 2.2 due to the new database migration feature during installation. So it is not really needed any longer. The database backup features are still working for 2.2 as they were for 2.1.x...
    Right now I don't have the time to fix this, sorry. Just migrate your database and all is fine...
     

    JSchuricht

    MP Donator
  • Premium Supporter
  • January 13, 2009
    239
    45
    Arizona
    Home Country
    United States of America United States of America
    I had hoped watched flags would migrate with the upgrade but that's why I ended up here. Hopefully in the future one of the methods gets fixed.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,736
    3,501
    Stuttgart
    Home Country
    Germany Germany
    I had hoped watched flags would migrate with the upgrade but that's why I ended up here. Hopefully in the future one of the methods gets fixed.
    That’s what Lehmden said. Watched flags get migrated when updating to 2.2.
    Also a new plugin is almost finished to backup watched flags and restore later.
     

    Users who are viewing this thread

    Top Bottom