How to skip maintenace? (1 Viewer)

maxx_nantes

Portal Pro
October 5, 2009
231
11
Hi, I recently had to change HD's and my blu-ray player connection. Its letter remained the same (E) but it does not prevent maintenance task to erase all my blu rays every time I launch the configuration tool.
Is there a way I could skip the maintenance task before this bug is fixed?

thanks a lot
 

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Hi, I recently had to change HD's and my blu-ray player connection. Its letter remained the same (E) but it does not prevent maintenance task to erase all my blu rays every time I launch the configuration tool.
    Is there a way I could skip the maintenance task before this bug is fixed?

    thanks a lot

    MovingPictures does not recognize a HDD based on drive letter, it also looks at the serial number. Since you changed the physical drive, this info has changed, which prompts the maintenance task to clear out the movies.

    Your only solution now is to edit the MovingPictures.db3 database with an SQLite database editor tool and replace the old serial with the new one.

    The SQL command in question is as follows: UPDATE local_media SET volume_serial = REPLACE(volume_serial, 'old_volume_serial', 'new_volume_serial');

    And you obviously have to replace that with the correct volume_serial strings, if you don't know the value of the new one, easiest way to obtain it, is to just create a new MovPic database and set it up with a new import parth that only contains one or a few movies. Import those and then check the db3 file.
     

    maxx_nantes

    Portal Pro
    October 5, 2009
    231
    11
    Hi RoChess,

    thanks for your answer. The thing is that I was specifically talking about optical media (blu-ray and HD-DVD) and from browsing the db, I guess every single movie has its own serial, am I right?
    therefore, replacing all serials will take ages (I have more than 300 discs)

    I think the only solution would be to plug my optical drive in the same sata port it used to be connected to

    maxx

    And just one thing I'd like to add : my physical Blu-Ray drive is still the same. The only things that changed are its sata connector and, maybe, I switched from master to slave (or the contrary)
     

    armandp

    Retired Team Member
  • Premium Supporter
  • April 6, 2008
    990
    620
    Zoetermeer
    Home Country
    Netherlands Netherlands
    Actually could you post some logs of this happening ? and did you by any chance reinstall MediaPortal?
    I saw the same thing happen once when the virtual drive letter set in the MediaPortal configuration is the same as your DVD/BD drive.

    If the drive letter stays the same for the bluray drive there should be no issue.
    Also the serial should be not involved with the removal of your movies.
     

    maxx_nantes

    Portal Pro
    October 5, 2009
    231
    11
    Hi pal, you'll find my logs file attached.
    Btw, my virtual drive is set to G: so no problem there (at least I guess)

    Thanks a lot for your help
     

    armandp

    Retired Team Member
  • Premium Supporter
  • April 6, 2008
    990
    620
    Zoetermeer
    Home Country
    Netherlands Netherlands
    Hi, i'm currently working on some code to prevent this from happening in the future (issue).

    From your logs the only thing i can think of that could cause this if the import path E: was removed and readded (with the plugin actively picking up on the removal). The import path record will have a different ID and the old import path add reference (even though both refer to E:\) will be invalid.. resulting in the deletion of the movies. For now you can prevent this from happening by editing the database and replace the invalid importpath id with the new import path id.

    Steps for the workaround:

    1) Open the database with your favorite SQLLite editor and look in the table "import_path"
    2) Write down the id for the import path that specifies E:\
    3) If a record for E:\ does not exist in the import path table, create one (the internallymanaged column should be checked/true)
    4) Check the "local_media" table and see what 'importpath' id is filled in for the files have a path on E: (this is your old ID)
    5) Replace the import path id's for these records with the one written down in 2/3)

    Statement: UPDATE local_media SET importpath = <NEW ID> WHERE importpath = <OLD ID>
     

    maxx_nantes

    Portal Pro
    October 5, 2009
    231
    11
    Hi, i'm currently working on some code to prevent this from happening in the future (issue).

    From your logs the only thing i can think of that could cause this if the import path E: was removed and readded (with the plugin actively picking up on the removal). The import path record will have a different ID and the old import path add reference (even though both refer to E:\) will be invalid.. resulting in the deletion of the movies. For now you can prevent this from happening by editing the database and replace the invalid importpath id with the new import path id.

    Steps for the workaround:...

    Thanx a lot armandp, you rock ;)
    I'll take a look at it tonight and keep you posted.

    edit : works just fine. thanks a lot
     

    armandp

    Retired Team Member
  • Premium Supporter
  • April 6, 2008
    990
    620
    Zoetermeer
    Home Country
    Netherlands Netherlands
    so can you confirm that the path for E: had a different ID or did you have to create a new one?
     

    maxx_nantes

    Portal Pro
    October 5, 2009
    231
    11
    Indeed, the path for E: had a different idea.
    For any one facing this problem, replacing the id directly in import_path table with the one in local_media (on the movies you imported from your optical drive) is much simpler ;)

    Thanks again armandp, I'm back on track :p
     

    Users who are viewing this thread

    Top Bottom