Clean up the Thumbnails folder

  Thread Rating:
  • 4 Votes - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
pko66 Offline
Senior Member
Posts: 189
Joined: Dec 2006
Reputation: 0
Post: #211
Hello, Bradvido!

I have not tried your script yet, but it seems to be a pretty useful one! thank you very much. Maybe you can advice me about it; I use 3 different profiles with 3 different databases, and I assume the script is not profile-aware...

I suppose I could use it although it would be complicated, please tell me if you think that this is possible:

My thumbs are stored in z:\THUMBS -> I make a backup to z:\THUMBS-b
open xbmc, select profile 1
run script, at the end it will left in z:\THUMBS only files used in profile 1
copy z:\THUMBS to z:\THUMBS-n
copy z:\THUMBS-b to z:\THUMBS
select profile 2 in xbmc, run script again
z:\THUMBS will now contain only files used in profile 2
copy z:\THUMBS to z:\THUMBS-n
z:\THUMBS-n will now contain only files used in any of profile 1 or profile 2
copy z:\THUMBS-b to z:\THUMBS
select profile 3 in xbmc, run script again
z:\THUMBS will now contain only files used in profile 3
copy z:\THUMBS-n to z:\THUMBS
z:\THUMBS will now contain only files used in any of profile 1, profile 2 or profile 3

after that, z:\THUMBS-b and z:\THUMBS-n could be safely deleted

Do you see any problem in that procedure?

It would be great if the script could be made "profile aware", I can think of a "learning mode" that you could perhaps implement:

1) start xbmc, select profile desired
2) run script in "learning" mode; it will internally make a list of all files used and at the end stop with a question: "run again to learn more used files or perform deletion? L/D"
3) then, you change to xbmc, select another profile, change back to the script and press "L" to run another "learning" cycle.
4) repeat step 3 for all the profiles you need
5) when all profiles had been "learned", enter "D" at the script question and it will delete all the files that are not used in any profile

Since I do not know java, I do not know what procedure the script uses, so maybe what I am proposing is completely wrong, but if you think is a doable idea maybe it can be implemented.

Thank you.
find quote
bradvido88 Offline
Donor
Posts: 736
Joined: Nov 2008
Reputation: 7
Location: MN
Post: #212
pko66 Wrote:Hello, Bradvido!

I have not tried your script yet, but it seems to be a pretty useful one! thank you very much. Maybe you can advice me about it; I use 3 different profiles with 3 different databases, and I assume the script is not profile-aware...

I suppose I could use it although it would be complicated, please tell me if you think that this is possible:
...
Since I do not know java, I do not know what procedure the script uses, so maybe what I am proposing is completely wrong, but if you think is a doable idea maybe it can be implemented.

Thank you.
This wasn't designed to handle profiles, but the procedure you outlined may work.
All I can suggest is to backup your thubmnails directory before starting, then if it messes up, you can just restore the directory...

There is also a simulation mode you can turn on.

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (ForTheRecord & XBMC Library Integration)
SageTV & XBMC PVR Integration
Delete unused thumbs
(This post was last modified: 2012-02-08 17:35 by bradvido88.)
find quote
Ogi010 Offline
Member
Posts: 79
Joined: Apr 2010
Reputation: 1
Post: #213
Just found a potential issue, not really a bug, but it could make a user scratch their head for a while.

In the command line prompt, I was getting something to the effect of
Code:
'directory' is not a directory

What I was in fact using was a symbolic linker for my thumbnails (thumbnails stored on dropbox folder across multiple PCs). The script had an issue with that, once I pointed it to the actual folder location in the XML file, all was well.
find quote
TRaSH Offline
Senior Member
Posts: 298
Joined: Jul 2011
Reputation: 1
Post: #214
is there a way to run this from inside of xbmc ?

Windows 7, 64-bit | XBMC Frodo | Aeon Nox | MONEUAL 320B (not working remote and display:angry:, yet) | Intel® Core™ i5 CPU 661 | Sapphire HD 6570 1GB DDR3
Onkyo TX-SR875 | Teufel System 5 THX Cinema 5.1
HP Microserver N40L WHS 2011 8TB
[Image: all-fanart.jpg]
find quote
bradvido88 Offline
Donor
Posts: 736
Joined: Nov 2008
Reputation: 7
Location: MN
Post: #215
TRaSH Wrote:is there a way to run this from inside of xbmc ?

Not easily. It could be converted to an addon, but I don't know python well enough (yet) to do that.

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (ForTheRecord & XBMC Library Integration)
SageTV & XBMC PVR Integration
Delete unused thumbs
(This post was last modified: 2012-02-27 23:58 by bradvido88.)
find quote
pkscuot Offline
Fan
Posts: 600
Joined: Jan 2011
Reputation: 10
Location: Honolulu, HI
Post: #216
TRaSH Wrote:is there a way to run this from inside of xbmc ?

You could use the Advanced Launcher plugin to launch it. You can't schedule it or anything, but at least you could do it from the remote.
find quote
wilson.joe Offline
Fan
Posts: 448
Joined: Nov 2010
Reputation: 6
Location: Salem, Or
Post: #217
Ive got this to work with linux with a little tweaking and twittling with the code
cleaned out over 8 gigs..
find quote
vbtrek Offline
Junior Member
Posts: 8
Joined: Aug 2011
Reputation: 0
Rainbow  RE: Clean up the Thumbnails folder Post: #218
For anyone who might have a shared MySQL database running on a Windows box and shared thumbnail cache, I have written a Windows Service to clean the cache and database. The code has been running on my home server for a week now to get some testing before I release an Alpha build.

Check it out at http://xbmccachemanager.codeplex.com/

Cheers.
find quote
nurgle Offline
Junior Member
Posts: 39
Joined: Jun 2007
Reputation: 0
Post: #219
Could someone explain how to get this working under linux? I have a shared mysql database if that matters.

Thanks!
find quote
bradvido88 Offline
Donor
Posts: 736
Joined: Nov 2008
Reputation: 7
Location: MN
Post: #220
(2012-03-14 20:27)nurgle Wrote:  Could someone explain how to get this working under linux? I have a shared mysql database if that matters.

Thanks!
Users have had luck previously under linux: http://forum.xbmc.org/showthread.php?tid...pid1007380

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (ForTheRecord & XBMC Library Integration)
SageTV & XBMC PVR Integration
Delete unused thumbs
(This post was last modified: 2012-03-14 20:40 by bradvido88.)
find quote
Post Reply