Moving Pictures config & MP crashing (1 Viewer)

Dark Eyes

Portal Pro
February 27, 2011
55
4
Hello RoChess

Okay, I will start with the divide and conquer process to see if I can narrow down the offending file(s).
I would be interested in trying your verification script, I have an i5 in my Media-PC, so hopefully it would run a bit quicker.
 

Dark Eyes

Portal Pro
February 27, 2011
55
4
Surprisingly MovPic now successfully scans all the folders, after I reintroduced them 1 by 1 !!
MediaPortal was still crashing, but that turned out to be Fanart handler, which I have now disabled.
So now all I have to do is deal with the 1832 items, it hasn't automatically identified :(

Thanks RoChess for your help, I really appreciate it.
 

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Yeah, and it can be an annoying single file with corrupt header that is causing it.

    Clearly Moving-Pictures should have used more try/catch code to support exceptions without crashing, but it is hard to account for every scenario unless you have an easy reproducible way to test for all possible use-cases.

    Computer code tends to be 100 lines of code to do something, and then it grows to 10,000 lines to account for every possible scenario that might go wrong :)

    Fanart-handler has given me much grieve in the past as well, because it caused database corruption for me to occur (and sounds like that was your issue as well). That is what ended up inspiring me to write an auto-backup+restore script for MediaPortal (available somewhere on this forum as well), which uses SQLite.exe command-line tool and runs a PRAGMA INTEGRITY scan real quick to verify the database did not become corrupt, and if it did to auto-restore the last known good-backup.

    Feel free to use that as well to avoid running into the same issue again, because it is annoying to have to do a fresh install and full import scan each time something goes wrong.

    Moving-Pictures makes a backup itself as well, but only when you update the plugin. Still that backup might save you some time if it was made before the database got corrupted.

    PS: IMDb+ should be able to auto-identify a lot more than the default IMDb scraper that comes with MovPic, so that might save you a bunch of time.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    This is the script (attached), and yeah an i5 should do much better than the AMD A5-5300 that I used, unless you got a really old i5 second generation.

    It requires ffmpeg.exe that you can download from: Builds - Zeranoe FFmpeg and extract from the ZIP file in the /bin folder.

    I'd recommend to first put the script in a folder with 1 or 2 sample media files, so you can see what it does and how long it will take.

    It's an ugly script that does not support resume or anything, so if it fails for some unexpected reason you're on your own, but I would be interested in more info to see if I can improve it.

    Two logs file are created, one that shows every file processed (good and bad), and one that shows just the ones that failed.

    PS: The failures should fail to play in MediaPlayerClassic or VLC, but it is good to double-check obviously as ffmpeg.exe might have a bug itself as well.
     

    Attachments

    • ScanMedia.zip
      873 bytes

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    Fanart-handler has given me much grieve in the past as well, because it caused database corruption for me to occur (and sounds like that was your issue as well).
    Probably it uses SQL requests instead of some MovPics API, that's why
     

    Users who are viewing this thread

    Top Bottom