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

m3rcury

Development Group
  • Team MediaPortal
  • August 12, 2010
    977
    733
    Home Country
    Malta Malta
    MPCleaner v1.1.0.16 has been uploaded. Please download from here.
     

    barneh

    MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    ...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

    Retired Team Member
  • Premium Supporter
  • July 27, 2007
    2,657
    718
    Yorkshire, UK
    Home Country
    England England
    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
    57
    Home Country
    Austria Austria
    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
    977
    733
    Home Country
    Malta Malta
    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
    124
    71
    whereever my feet take me...
    Home Country
    Netherlands Netherlands
    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
    977
    733
    Home Country
    Malta Malta
    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

    Top Bottom