How to skip maintenace?

Discussion in 'Moving Pictures' started by maxx_nantes, May 1, 2011.

  1. maxx_nantes

    maxx_nantes Portal Pro

    Joined:
    October 5, 2009
    Messages:
    231
    Likes Received:
    11
    Ratings:
    +11 / 0
    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


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,209
    Likes Received:
    1,324
    Ratings:
    +1,717 / 2
    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.
     
  4. maxx_nantes

    maxx_nantes Portal Pro

    Joined:
    October 5, 2009
    Messages:
    231
    Likes Received:
    11
    Ratings:
    +11 / 0
    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)
     
  5. armandp
    • Premium Supporter

    armandp Retired Team Member

    Joined:
    April 6, 2008
    Messages:
    990
    Likes Received:
    584
    Gender:
    Male
    Occupation:
    Application Designer
    Location:
    Zoetermeer
    Ratings:
    +616 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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.
     
    • Like Like x 1
  6. maxx_nantes

    maxx_nantes Portal Pro

    Joined:
    October 5, 2009
    Messages:
    231
    Likes Received:
    11
    Ratings:
    +11 / 0
    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
     
  7. maxx_nantes

    maxx_nantes Portal Pro

    Joined:
    October 5, 2009
    Messages:
    231
    Likes Received:
    11
    Ratings:
    +11 / 0
    anyone with an idea? ;)
     
  8. armandp
    • Premium Supporter

    armandp Retired Team Member

    Joined:
    April 6, 2008
    Messages:
    990
    Likes Received:
    584
    Gender:
    Male
    Occupation:
    Application Designer
    Location:
    Zoetermeer
    Ratings:
    +616 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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>
     
    • Like Like x 1
  9. maxx_nantes

    maxx_nantes Portal Pro

    Joined:
    October 5, 2009
    Messages:
    231
    Likes Received:
    11
    Ratings:
    +11 / 0
    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
     
  10. armandp
    • Premium Supporter

    armandp Retired Team Member

    Joined:
    April 6, 2008
    Messages:
    990
    Likes Received:
    584
    Gender:
    Male
    Occupation:
    Application Designer
    Location:
    Zoetermeer
    Ratings:
    +616 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    so can you confirm that the path for E: had a different ID or did you have to create a new one?
     
  11. maxx_nantes

    maxx_nantes Portal Pro

    Joined:
    October 5, 2009
    Messages:
    231
    Likes Received:
    11
    Ratings:
    +11 / 0
    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
     
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!