Delete old Covers and Backdrops no longer in movingpictures.db3 (1 Viewer)

Paranoid Delusion

Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Beat you, lost 1.2gb of junk files :D

    Pity that neither TVSeries\MovPics does this on file deletion :(
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Beat you, lost 1.2gb of junk files :D

    Pity that neither TVSeries\MovPics does this on file deletion :(

    Well consider this, you delete your entire collection by mistake (or database corruption, or whatever) and reimport it all. Then those many GBs of artwork can be instantly obtained from the local version again.

    However, this "garbage collection" as I think the correct term is, would be better suited to be part of either plugins, or perhaps this tool can be expanded to be a nice easy to use MPEI plugin for couch control from within MePo GUI, as it can then be expanded to cover MyVideos and other artwork generating plugins as well (OnlineVideos, Fanart Handler, etc).
     

    ysmp

    Design Group
  • Team MediaPortal
  • May 17, 2008
    1,863
    744
    Seoul.
    Home Country
    South Korea South Korea
    ...... or perhaps this tool can be expanded to be a nice easy to use MPEI plugin for couch control from within MePo GUI, as it can then be expanded to cover MyVideos and other artwork generating plugins as well (OnlineVideos, Fanart Handler, etc).

    Just thinking to my self the same thing.... ;) , sure will be cool to have ...
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    RoChess, can you give the attached a try since I only have W7 machines. With the changes done to load paths from MediaPortalDirs.xml, it is still working on my setup.

    Tried it, now it shows "\Team MediaPortal\MediaPortal\Database\" for database folder and "\Team MediaPortal\MediaPortal\Thumbs\" for thumbs, which is not correct either. Looking at the MediaPortalDirs.xml file, I see that the MePo team has changed things and I think they deal with the correct path on XP machines on a different way.

    See the CMD environment value of %ProgramData% doesn't even exist on XP, as you have to use %ALLUSERSPROFILE% to get to "C:\Documents and Settings\All Users", it is inside this folder (well "Application Data" subfolder to be exact) that MediaPortal puts its data files.

    XP = "%ALLUSERSPROFILE%\Application Data\Team MediaPortal\MediaPortal\database"
    Vista/Win7/Win8 = "%ProgramData%\Team MediaPortal\MediaPortal\database"

    So what MediaPortal most likely does (guessing a bit) is to see if the "%ProgramData%" CMD environment variable is empty or contains a path. If it has a path you are on Vista/Win7 and can use it as-is. If its empty then your path becomes "%ALLUSERSPROFILE%\Application Data".

    Thats the logic behind it to make it XP/Vista/Win7/Win8/etc compatible, I just don't know how to do that in C# :)

    But I'll be happy to test v1.2 for you :D
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Beat you, lost 1.2gb of junk files :D

    Pity that neither TVSeries\MovPics does this on file deletion :(

    Well consider this, you delete your entire collection by mistake (or database corruption, or whatever) and reimport it all. Then those many GBs of artwork can be instantly obtained from the local version again.

    However, this "garbage collection" as I think the correct term is, would be better suited to be part of either plugins, or perhaps this tool can be expanded to be a nice easy to use MPEI plugin for couch control from within MePo GUI, as it can then be expanded to cover MyVideos and other artwork generating plugins as well (OnlineVideos, Fanart Handler, etc).

    I agree fully, also have backdrops\fanart\nfo in movie folder, so re-import is never a major problem, would like this expanded to cover the MP myvideo's as well, especially with the changes now done by Deda for 1.3.0alpha, not sure about anyone else, but my movie collection is constantly changing\updating :D
     

    m3rcury

    Development Group
  • Team MediaPortal
  • August 12, 2010
    977
    733
    Home Country
    Malta Malta
    RoChess, can you give the attached a try since I only have W7 machines. With the changes done to load paths from MediaPortalDirs.xml, it is still working on my setup.

    Tried it, now it shows "\Team MediaPortal\MediaPortal\Database\" for database folder and "\Team MediaPortal\MediaPortal\Thumbs\" for thumbs, which is not correct either. Looking at the MediaPortalDirs.xml file, I see that the MePo team has changed things and I think they deal with the correct path on XP machines on a different way.

    See the CMD environment value of %ProgramData% doesn't even exist on XP, as you have to use %ALLUSERSPROFILE% to get to "C:\Documents and Settings\All Users", it is inside this folder (well "Application Data" subfolder to be exact) that MediaPortal puts its data files.

    XP = "%ALLUSERSPROFILE%\Application Data\Team MediaPortal\MediaPortal\database"
    Vista/Win7/Win8 = "%ProgramData%\Team MediaPortal\MediaPortal\database"

    So what MediaPortal most likely does (guessing a bit) is to see if the "%ProgramData%" CMD environment variable is empty or contains a path. If it has a path you are on Vista/Win7 and can use it as-is. If its empty then your path becomes "%ALLUSERSPROFILE%\Application Data".

    Thats the logic behind it to make it XP/Vista/Win7/Win8/etc compatible, I just don't know how to do that in C# :)

    But I'll be happy to test v1.2 for you :D


    RoChess, thanks for the details. Will amend accordingly as I didn't know of this difference due to not having an XP box :p
     

    m3rcury

    Development Group
  • Team MediaPortal
  • August 12, 2010
    977
    733
    Home Country
    Malta Malta
    RoChess, here is FanartCleaner v1.2 which should now cater for "%ALLUSERSPROFILE%\Application Data". Can you test it for me please and advise if it woks.


    Thanks and regards
     

    Attachments

    • FanartCleaner v1.2.rar
      464.6 KB

    ysmp

    Design Group
  • Team MediaPortal
  • May 17, 2008
    1,863
    744
    Seoul.
    Home Country
    South Korea South Korea
    Hi , just a small note abut the name of the tool ...:) ,
    the tool delete Covers and Backdrops .... so the name say "FanartCleaner" ... maybe " ArtimageCleaner" or "MPCleaner" as ltfearme suggest more Feat's the tool ??

    1 more thing do the tool also delete the Banners image's in TVSeries too ?
     

    m3rcury

    Development Group
  • Team MediaPortal
  • August 12, 2010
    977
    733
    Home Country
    Malta Malta
    Hi , just a small note abut the name of the tool ...:) ,
    the tool delete Covers and Backdrops .... so the name say "FanartCleaner" ... maybe " ArtimageCleaner" or "MPCleaner" as ltfearme suggest more Feat's the tool ??

    1 more thing do the tool also delete the Banners image's in TVSeries too ?

    ysmp, tool clears the following folders:
    • MovingPictures\Covers\FullSize
    • MovingPictures\Covers\Thumbs
    • MovingPictures\Backdrops\FullSize
    • MPTVSeriesBanners
    • Fan Art\fanart\original
    • Fan Art\_cache\fanart\original
    Regarding the tool name, I'll see if I can first turn it into a plugin, but it will be a first for me, so will take me some time :)
     

    Users who are viewing this thread

    Top Bottom