Flag Mover: backup and restore watched flags (1 Viewer)

aspik

Retired Team Member
  • Team MediaPortal
  • April 14, 2008
    1,322
    586
    Hi all,

    as you probably read in the 2.2 Pre-release news, there will be a plugin to transfer watched flags. This mini plugin has basically two functions:
    - save watched series episodes and movies infos in two JSON files.
    - restore watched flags to MP2, by reading those JSON files.

    Example of watched episodes file:
    XML:
    [
       {
          "show_imdb":null,
          "show_tvdb":262980,
          "show_title":"House of Cards (US)",
          "season":1,
          "number":3
       },
       {
          "show_imdb":null,
          "show_tvdb":262980,
          "show_title":"House of Cards (US)",
          "season":1,
          "number":4
       },
       {
          "show_imdb":null,
          "show_tvdb":317653,
          "show_title":"Jean-Claude Van Johnson",
          "season":1,
          "number":2
       },
       {
          "show_imdb":null,
          "show_tvdb":317653,
          "show_title":"Jean-Claude Van Johnson",
          "season":1,
          "number":3
       }
    ]
    Example of watched movies file:
    XML:
    [
       {
          "imdb":"tt1490017",
          "tmdb":null,
          "title":"The Lego Movie",
          "year":2014
       },
       {
          "imdb":"tt0050083",
          "tmdb":null,
          "title":"12 Angry Men",
          "year":1957
       },
       {
          "imdb":"tt0298203",
          "tmdb":null,
          "title":"8 Mile",
          "year":2002
       }
    ]

    Currently the files are saved into C:\ProgramData\Team MediaPortal\MP2-Client\FlagMover\[user_id]\. The restore option also expects its in this directory.
    With this, the backup and restore operations are a bit limited, so I'm currently adding an option that the user will be able to choose the backup and restore directory.

    @Lehmden
    You had issues with the last version, could you please test this one a report, if they are now solved?

    Install procedure:
    extract the content of the attached archive into c:\Program Files (x86)\Team MediaPortal\MP2-Client\Plugins\,

    After that, start MP2 client and go to settings -> plugins, where you should see a new entry "Flag Mover".

    EDIT:
    attached two versions: one for MP2.1.3 and one for MP2.2.
     

    Attachments

    • FlagMover_for_2.1.3.zip
      249.4 KB
    • FlagMover_for_MP2.2_v3.zip
      250.7 KB
    Last edited:

    JSchuricht

    MP Donator
  • Premium Supporter
  • January 13, 2009
    239
    45
    Arizona
    Home Country
    United States of America United States of America
    Does flag mover work in 2.1 so the flags can be exported and reimported into 2.2? Flags not transferring to the new version made me roll back the upgrade.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Does flag mover work in 2.1 so the flags can be exported and reimported into 2.2? Flags not transferring to the new version made me roll back the upgrade.
    No, flag mover workes only with MP2.2 as far as I know. When you update to MP2.2 your data base including flags is migrated on first server start after installation.
    If this didn't work for you and you didn't report it yet, please create a bug report with log files.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,553
    3,934
    Lehmden
    Home Country
    Germany Germany
    Hi.
    If you want to do a clean 2.2 install without migrating the database but preserving your flags you can go this way...
    First migrate your db to 2.2 by upgrading your 2.1 installation to 2.2 Then save the flags with flag mover. If you like you can check out 2.2 and do some experiments. If you are done remove MP 2.2 completely incl the program data folder. (excerpt for the flag mover files/folders of course)... Now install 2.2 from scratch and import the flags with flag mover.
    Sounds complicated but it takes not that long as the migration is pretty fast. Saving the 2.1 flags with MP2-Buddy will take longer, I'm sure... And it's a one time only thing...
     

    aspik

    Retired Team Member
  • Team MediaPortal
  • April 14, 2008
    1,322
    586
    Does flag mover work in 2.1 so the flags can be exported and reimported into 2.2?
    No. It was planned to make a version for 2.1.3, but with the DB migration in 2.2 I don't think its needed anymore. If you want to do clean install coming from 2.1.3, Lehmden's description is a good (one time) solution.
    So far I didn't received any feedback how the recent version is working, so either test it on a test system or wait for feedback from others. Also, the possibility to choose the path for export/import files is still wip.
     

    JSchuricht

    MP Donator
  • Premium Supporter
  • January 13, 2009
    239
    45
    Arizona
    Home Country
    United States of America United States of America
    The DB migrates from 2.1.3 to 2.2, just the watch flags for all users are left behind. I'll run it again tonight and pull logs for a bug report. Thats my hangup right now, no way to move watched flags from 2.1.3 to 2.2.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    The DB migrates from 2.1.3 to 2.2, just the watch flags for all users are left behind. I'll run it again tonight and pull logs for a bug report. Thats my hangup right now, no way to move watched flags from 2.1.3 to 2.2.
    What do you mean with “for all users”. MP2.1.3 had no users and after 2.2 migration you have only one admin profile, which should have the watched flags. If you see more users something is wrong.
     

    JSchuricht

    MP Donator
  • Premium Supporter
  • January 13, 2009
    239
    45
    Arizona
    Home Country
    United States of America United States of America
    I run a standalone MP 2.1.3 server and separate clients. Each client acts as a user with its own watched flags. Morpheus description.
    I also have a plugin Morpheus provided for switching user profiles in 2.1.3. In 2.2, the user account as well as the admin account exist as selections. It didn't make any difference which user I selected in 2.2, all had no watched flags. The exception was after running MP2 buddy I was able to transfer series watched flags.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    I run a standalone MP 2.1.3 server and separate clients. Each client acts as a user with its own watched flags. Morpheus description.
    I also have a plugin Morpheus provided for switching user profiles in 2.1.3. In 2.2, the user account as well as the admin account exist as selections. It didn't make any difference which user I selected in 2.2, all had no watched flags. The exception was after running MP2 buddy I was able to transfer series watched flags.
    Did you try it without following the description and using the plugin once? I’m not sure, if the plugin is compatible and it might cause the trouble. To know better we need your log files after migration, otherwise everything is speculation.
     

    aspik

    Retired Team Member
  • Team MediaPortal
  • April 14, 2008
    1,322
    586
    Attached a new version with the option to select where to save and from where restore the JSON files. To update the existing version, just overwrite the content of the FlagMover directory with with new one.

    I decided to make a version for 2.1.3 after all. Its even already ready, but I won't post it because after a quick test I discovered a bug in the series episode numbers retrieval.

    @henso
    I suppose its the same bug which we discovered in 2.2. Could you please check for 2.1.3 if you also get double episode numbers? If you can confirm this, then I have no idea how to deal with it in the 2.1.3 version... maybe you have?
     

    Attachments

    • FlagMover_001.PNG
      FlagMover_001.PNG
      931.9 KB
    Last edited:

    Users who are viewing this thread

    Top Bottom