[Plugin] MPCleaner - Deletes images from your thumbs folder that are no longer in use (1 Viewer)

m3rcury

Development Group
  • Team MediaPortal
  • August 12, 2010
    962
    707
    Malta Malta
    Country flag
    MPCleaner v1.1.0.16 has been uploaded. Please download from here.
     

    barneh

    MP Donator
  • Premium Supporter
  • February 4, 2010
    244
    52
    Malmö
    Sweden Sweden
    Country flag
    ...meaning that if you delete OtherSeriesname.S01E01.x265.720p.HDTV.mkv, the whole TV-Series folder is purged - would be extremely bad.
    Will remove the new enhancement as it seems who requested it is having second thoughts now!! :confused:
    Well.. the intention was not to delete the movie file as I see the request.

    The request was, as I read it:
    • if the user uses a folder structure and a folder don't have a movie file, then delete all the files in the folder and the folder as well.
    • if the user has a flat structure with all the files in one folder, check if the *.srt/ *.nfo/ *.jpg has a corresponding (in name) *.mov/ *.mkv/ *.mp4 file. If it has, do nothing. Otherwise delete the file.
     

    SpudR

    Documentation Group
  • Team MediaPortal
  • July 27, 2007
    2,652
    711
    Yorkshire, UK
    England England
    Country flag
    Pretty sure that the above is way outside the remit of this plugin - AFAIK this was aimed at removing out of date fanart and thumbs etc. not a media management plugin.
    Maybe the Moving Pictures and/or My TV Series plugins would be better suited as that is what they are aimed at.

    Anyways - thanks for the update :)
     

    Terra

    Portal Pro
    August 25, 2009
    230
    56
    Austria Austria
    Country flag
    Since today I am having the problem that MPCleaner crashes MePo a few minutes after MePo starts.
    I can post full logs if desired, but I think there just needs to be a try-catch implemented?

    I had to uninstall MPCleaner now so that I can start MePo.

    Code:
    [2017-08-27 20:42:10,638] [Log    ] [1        ] [INFO ] - Starting deployer application
    [2017-08-27 20:42:10,663] [Log    ] [MPMain   ] [INFO ] - Main: MediaPortal SetProcessDPIAware 1
    [2017-08-27 20:42:10,668] [Log    ] [MPMain   ] [INFO ] - Using alternate configuration file: C:\Users\Terra\AppData\Local\Temp\MPTemp\MediaPortalTemp.xml
    [2017-08-27 20:42:10,691] [Log    ] [MPMain   ] [INFO ] - Main: MediaPortal v1.16.0.0 is starting up on Windows 10 [10.0.15063.0]
    [2017-08-27 20:42:10,698] [Log    ] [MPMain   ] [INFO ] - Build: 1.16.0.0
    [2017-08-27 20:42:10,703] [Log    ] [MPMain   ] [INFO ] - Main: Minimum number of worker threads to 8/4
    [...]
    [2017-08-27 20:43:31,209] [Log    ] [MPMain   ] [INFO ] - PluginManager: Plugin: 'C:\Program Files (x86)\Team MediaPortal\MediaPortal\Plugins\process\MPCleaner.dll' / Version: 1.1.0.16
    [...]
    [2017-08-27 20:43:31,799] [Log    ] [MPMain   ] [INFO ] - FanartHandler Translation: Cannot find translation file C:\ProgramData\Team MediaPortal\MediaPortal\Language\FanartHandler\en-US.xml.  Failing back to English
    [2017-08-27 20:43:34,181] [Log    ] [MPMain   ] [INFO ] - PS: Starting PowerScheduler client plugin...
    [2017-08-27 20:43:34,196] [Log    ] [20       ] [INFO ] - MPCleaner: process plugin initialisation.
    [2017-08-27 20:43:34,224] [Log    ] [20       ] [INFO ] - MPCleaner: process plugin last run on 17.08.2017 23:23:51
    [2017-08-27 20:43:34,231] [Log    ] [20       ] [INFO ] - MPCleaner: process plugin configured to run daily.
    [2017-08-27 20:43:34,228] [Log    ] [MPMain   ] [INFO ] - PS: Detected remote client setup - TV-Server on "XXX"
    [2017-08-27 20:43:34,241] [Log    ] [20       ] [INFO ] - MPCleaner: process plugin configured to run at 07:00. Current time is 20:43
    [2017-08-27 20:43:34,261] [Log    ] [MPMain   ] [INFO ] - PS: PowerSchedulerFactory
    [2017-08-27 20:43:34,266] [Log    ] [20       ] [INFO ] - MPCleaner: process plugin starting execution immediately.
    [2017-08-27 20:43:34,317] [Log    ] [MPMain   ] [INFO ] - PS: PowerScheduler client plugin started
    [2017-08-27 20:43:34,333] [Log    ] [MPMain   ] [INFO ] - MusicShareWatcher Plugin 0.3 starting.
    [2017-08-27 20:43:34,333] [Log    ] [29       ] [INFO ] - MPCleaner: processing movingpictures - start.
    [2017-08-27 20:43:34,355] [Log    ] [46       ] [INFO ] - MPCleaner: processing pictures - start.
    [2017-08-27 20:43:34,347] [Log    ] [43       ] [INFO ] - MPCleaner: processing TVSeries objects - start.
    [2017-08-27 20:43:34,337] [Log    ] [40       ] [INFO ] - MPCleaner: processing movie objects - start.
    [2017-08-27 20:43:34,362] [Log    ] [47       ] [INFO ] - MPCleaner: processing videos - start.
    [2017-08-27 20:43:34,345] [Log    ] [45       ] [INFO ] - MPCleaner: processing music - start.
    [2017-08-27 20:43:34,351] [Log    ] [41       ] [INFO ] - MPCleaner: processing tvseries - start.
    [2017-08-27 20:43:34,414] [MusicShareWatcher] [MPMain   ] [INFO ] - MusicShareWatcher starting up!
    [2017-08-27 20:43:34,440] [MusicShareWatcher] [MPMain   ] [INFO ] - Starting up a worker thread...
    [2017-08-27 20:43:34,460] [Log    ] [MPMain   ] [INFO ] - MusicShareWatcher Plugin now monitoring the shares.
    [2017-08-27 20:43:34,464] [MusicShareWatcher] [MusicShareWatcher] [INFO ] - Monitoring active for following shares:
    [2017-08-27 20:43:34,484] [MusicShareWatcher] [MusicShareWatcher] [INFO ] - ---------------------------------------
    [2017-08-27 20:43:34,474] [Log    ] [MPMain   ] [INFO ] - SkinTranslationsPlugin: Starting plugin
    [2017-08-27 20:43:34,522] [MusicShareWatcher] [MusicShareWatcher] [INFO ] - XXX
    [2017-08-27 20:43:34,532] [MusicShareWatcher] [MusicShareWatcher] [INFO ] - ---------------------------------------
    [2017-08-27 20:43:34,542] [MusicShareWatcher] [MusicShareWatcher] [INFO ] - Note: Errors reported for CD/DVD drives can be ignored.
    [2017-08-27 20:43:34,567] [Log    ] [MPMain   ] [INFO ] - SkinTranslationsPlugin: Using language: en-US
    [2017-08-27 20:43:34,602] [Log    ] [MPMain   ] [WARN ] - SkinTranslationsPlugin: Cannot find skin translation file C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\Translations\en-US.xml
    [2017-08-27 20:43:34,617] [Log    ] [MPMain   ] [INFO ] - SkinTranslationsPlugin: Nothing to translate for skin Titan
    [2017-08-27 20:43:34,652] [Log    ] [MPMain   ] [INFO ] - Titan BasicHome plugin: Skin found
    [2017-08-27 20:43:34,752] [Log    ] [BassAudio] [INFO ] - BASS: Initialize BASS environment ...
    [2017-08-27 20:43:34,800] [Log    ] [MPMain   ] [INFO ] - Main: Initializing volume handler
    [2017-08-27 20:43:34,801] [Log    ] [BassAudio] [INFO ] - BASS: Loading audio decoder add-ins...
    [2017-08-27 20:43:34,872] [Log    ] [BassAudio] [INFO ] - BASS: Loaded 15 Audio Decoders.
    [2017-08-27 20:43:34,992] [Log    ] [BassAudio] [INFO ] - BASS: Initializing BASS environment done.
    [2017-08-27 20:43:35,163] [Log    ] [MPMain   ] [INFO ] - Main: Deactivation request received
    [2017-08-27 20:43:35,321] [Log    ] [MPMain   ] [INFO ] - Main: Activation request received
    [2017-08-27 20:43:35,342] [Log    ] [MPMain   ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2017-08-27 20:43:35,353] [Log    ] [MPMain   ] [INFO ] - Main: The display is on
    [2017-08-27 20:43:35,584] [Log    ] [MPMain   ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2017-08-27 20:43:35,640] [Log    ] [MPMain   ] [INFO ] - Main: User is providing input to the session
    [2017-08-27 20:43:35,603] [Log    ] [PS StandbyWakeup] [INFO ] - PS: System changed from busy state to idle state
    [2017-08-27 20:43:35,967] [Log    ] [MPMain   ] [INFO ] - Main: Activation request received
    [2017-08-27 20:43:36,014] [Log    ] [MPMain   ] [INFO ] - GUIMusicPlaylist: Default Playlist loaded
    [2017-08-27 20:43:36,089] [Log    ] [MPMain   ] [INFO ] - D3D: Stopping splash screen thread
    [2017-08-27 20:43:38,024] [Log    ] [48       ] [INFO ] - MPSync: process plugin version 1.0.0.17 initialisation.
    [2017-08-27 20:43:40,016] [Log    ] [MPMain   ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\TVSeries.xml' is missing control id 10 (window property: filterButton)
    [2017-08-27 20:43:40,030] [Log    ] [MPMain   ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\TVSeries.xml' is missing control id 526 (window property: loadingImage)
    [2017-08-27 20:43:40,097] [Log    ] [MPMain   ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\TVSeries.xml' is missing control id 10 (window property: filterButton)
    [2017-08-27 20:43:40,106] [Log    ] [MPMain   ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\TVSeries.xml' is missing control id 526 (window property: loadingImage)
    [2017-08-27 20:43:44,956] [Log    ] [46       ] [INFO ] - MPCleaner: processing Pictures - start
    [2017-08-27 20:43:45,044] [Log    ] [46       ] [INFO ] - MPCleaner: processing Pictures - complete. Thumbs deleted to trash: 0
    [2017-08-27 20:43:45,153] [Log    ] [46       ] [INFO ] - MPCleaner: processing pictures - complete.
    [2017-08-27 20:43:59,140] [Log    ] [40       ] [INFO ] - MPCleaner: processing movie objects - complete.
    [2017-08-27 20:44:04,541] [Log    ] [41       ] [INFO ] - MPCleaner: processing tvseries (3) - failed with error when deleting extra fanart records: database is locked
    database is locked
    [2017-08-27 20:44:04,609] [Error  ] [41       ] [ERROR] - MediaPortal: Unhandled exception occured
    [2017-08-27 20:44:04,699] [Log    ] [41       ] [ERROR] - Exception: System.InvalidOperationException: Operation is not valid due to the current state of the object.
       at System.Data.SQLite.SQLiteConnection.set_ConnectionString(String value)
       at MPCleaner.MPCleanerProcess.Process_TVSeries()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()  Message: Operation is not valid due to the current state of the object.  Site   : Void set_ConnectionString(System.String)  Source : System.Data.SQLite  Stack Trace:     at System.Data.SQLite.SQLiteConnection.set_ConnectionString(String value)
       at MPCleaner.MPCleanerProcess.Process_TVSeries()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
     

    m3rcury

    Development Group
  • Team MediaPortal
  • August 12, 2010
    962
    707
    Malta Malta
    Country flag
    Hi m3rcury,

    Since the last changes in the naming convention for fanart as shown in MP TVSeries, MPCleaner keeps removing those after download.
    Is there any change you can look into that? There's a thread over here; [Resolved] No fanart for "Who is America?"
    @volumia. The plugin gets the names from what is stored in the database, hence irrespective of what naming convention is used, as long as the image name is stored somewhere in the database, it should not be deleted.
     

    volumia

    Portal Pro
    November 23, 2011
    119
    65
    whereever my feet take me...
    Netherlands Netherlands
    Country flag
    Well, that's just it... it does delete them. For now I disabled the TVSeries cleanup and that's the fix for now.
    Maybe it depends on the column it's looking up the filename in the Fanart table? I noticed that the filenames defer between the LocalPath and BannerPath?
    But that's just what I could come up with.
     

    m3rcury

    Development Group
  • Team MediaPortal
  • August 12, 2010
    962
    707
    Malta Malta
    Country flag
    Well, that's just it... it does delete them. For now I disabled the TVSeries cleanup and that's the fix for now.
    Maybe it depends on the column it's looking up the filename in the Fanart table? I noticed that the filenames defer between the LocalPath and BannerPath?
    But that's just what I could come up with.
    @volumia. Will have a look into the code.
     

    Users who are viewing this thread

    Similar threads
    OP Title Forum Replies Date
    C Issue with plugin initialisation My TVSeries 7
    morpheus_xx [Finished] "What's New" plugin for MP2 upgrades MediaPortal 2 20
    da3dsoul [Request] An MVP Plugin example for custom settings in MP2 Plugin Development 2
    da3dsoul MP2 Plugin - Getting Started (Directory Tree and Player) Plugin Development 27
    M Installing Plugins Newcomers Forum 2
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 10
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    E aktuelle englische Forums Webseite von - Showtime Plugin v3 Plugins & Erweiterungen 4
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    joecrow MultiShortcut Plugin (Uavailable) in DWHD skin General Support 58
    vapourEyes Building TV Plugin General Development (no feature request here!) 49
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    D [solved] TVServer Plugin must be missing something. General Development (no feature request here!) 1
    framug Nouveau plugin XmlTvFR pour récupérer le guide télé français Kazer / ZguideTv (WebEPGfr) 28
    emphatic Allow remote control mapping of all plugins Improvement Suggestions 0
    D Where should plugins be located on hard drive? General Support 0
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    cbr954rr How to disable a pre-configured plugin? General 2
    mrmojo666 [Plugin]Marantz Control Plugin 0.0.0.2 MediaPortal 1 Plugins 2
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 11
    doskabouter [Question] Stale plugins Developer Discussions 9
    M MP1 stops responding after Starting Plugins General Support 14
    Terra LAVFilter Plugin cannot be updated (MP1.23) MediaPortal 1 Plugins 10

    Similar threads

    Top Bottom