• 1
  • 27
  • 28
  • 29(current)
  • 30
  • 31
  • 197
[RELEASE] Texture Cache Maintenance utility
Hi Jonathan

I'm guessing it's just the [textures] commits that I'm interested in - the functionality looks good, and should provide me with the ability to extract one or more, or all, rows from the database and then subsequently delete individual rows (and the underlying file).

Not sure if this is still on the cards, but the only missing functionality would then be access to the Thumbnails folder, for instance when finding "orphaned" files (which won't have rows in the database), or when removing dds files (which map to jpg files in the database). I'd need to be able to get the list of files in the Thumbnails folder (path, size, creation date + filter), then remove individual files.

Do you think I can just apply just the [textures] commits to XBMC, or are there dependencies on the other commits?

Edit: Build failed with just the [textures] commits so pulling down the [smartplaylist] commits too...
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
Deletion of .dds files is done automatically if you remove a texture from the database.

I'm not sure if I can give easy access to the textures folders or not. It may be possible using the existing file directory stuff perhaps - will chat with Montellese.

(And I'll fix up the branch today - in the middle of a large rebase that will take most of the morning).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
No problems, ping me whenever you're ready.

(2013-10-26, 22:55)jmarshall Wrote: Deletion of .dds files is done automatically if you remove a texture from the database.

You mean with your new JSON API? That's good to know.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
After pruning textures with this script, I tried to run it again but I get this error regarding my Textures db:
Code:
Traceback (most recent call last):
  File "K:\scripts\TextureCache\texturecache.py", line 4479, in <module>
    main(sys.argv[1:])
  File "K:\scripts\TextureCache\texturecache.py", line 4384, in main
    dirScan(removeOrphans=False)
  File "K:\scripts\TextureCache\texturecache.py", line 3357, in dirScan
    rows = database.getAllColumns().fetchall()
sqlite3.DatabaseError: database disk image is malformed
However, neither XBMC nor SQLite Browser complain about the db file. They both open it just fine and can read it.

Any suggestions?
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
(2013-10-30, 23:06)bradvido88 Wrote: After pruning textures with this script, I tried to run it again but I get this error regarding my Textures db:
Code:
Traceback (most recent call last):
  File "K:\scripts\TextureCache\texturecache.py", line 4479, in <module>
    main(sys.argv[1:])
  File "K:\scripts\TextureCache\texturecache.py", line 4384, in main
    dirScan(removeOrphans=False)
  File "K:\scripts\TextureCache\texturecache.py", line 3357, in dirScan
    rows = database.getAllColumns().fetchall()
sqlite3.DatabaseError: database disk image is malformed
However, neither XBMC nor SQLite Browser complain about the db file. They both open it just fine and can read it.

Any suggestions?

I've not got anything helpful, unfortunately, as I've not seen this before. Presumably the database was fine originally, then became corrupt during the prune? Was there a lot of concurrent database activity in XBMC at the time you were running the prune? How are you mounting/accessing the database file, is it being accessed across a network (NFS or SMB)?

You could try sending me your Textures13.db and I'll take a look, it might be interesting to see how jmarshalls recent JSON API commit handles your database.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
I ended up using SQLite browser to export the db to a .sql file and using that to create a new clone of the db. Xbmc and your script were both happy after that
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
hi
i have 2 PI and another media center with frodo on it.
all of them have a 8GB sd card (with openelec)
since path substitution doesnt working anymore and i need to find a way to clean the thumbnails folder and recreate the texture file. will this help me?
what are your solution for the PI not to run out of space due to thumbnails?
thanks
Reply
(2013-10-31, 11:09)EZ1976 Wrote: hi
i have 2 PI and another media center with frodo on it.
all of them have a 8GB sd card (with openelec)
since path substitution doesnt working anymore and i need to find a way to clean the thumbnails folder and recreate the texture file. will this help me?

Path substitution is still supported, though not now recommended when it may have been previously. Path substitution isn't supported by this script, but it doesn't need to be as you can specify the location of your Thumbnails folder in the properties file - as long as the OS can access that location, the script will work.

If you just want to re-create the texture file (Textures13.db), the easiest way is to delete it from the Database folder, delete the entire Thumbnails folder, restart XBMC and the re-populate the texture cache manually by browsing the GUI, or automatically with "./texturecache.py c". Note that any remote (ie. internet-based) artwork that is now no longer available will be permanently lost using this approach (that's just the risk you take with internet based artwork).

(2013-10-31, 11:09)EZ1976 Wrote: what are your solution for the PI not to run out of space due to thumbnails?
thanks

You can also use NFS for your /storage partition with OpenELEC, which pretty much eliminates any SD card storage problems (not just space, but also corruption). Or using a large USB (16GB+) memory stick is another option, they're fairly cheap these days (although I realise "cheap" is a relative term depending on your finances).

However if you're sticking with the 8GB SD cards then "pruning" ("./texturecache.py P") on a regular basis should help eliminate unnecessary thumbnails - depending on your scripting skills, you could schedule a prune to run overnight on each of your OpenELEC clients.

Although I would say that, unless you're storing movies on your SD cards (which will take up a lot of space), 8GB is a pretty decent amount of texture cache storage - on my system with 641 movies, 2547 episodes and 7538 songs (all with posters and fanart), only 1GB storage is used by Thumbnails.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
Hallo!

Pretty awesome tool!

Works fine for my TV Shows, but always skips ALL movies Sad(

How can that be??

Thanks in advance Wink

EDIT: It also skips some TV Shows... is there a log file to check WHY it skips??
EDIT2: Created a logfiel... no errors or something like "skip" can be found :/
Reply
Run it with a logfile and also the option @logfile.verbose=yes, then upload your logfile somewhere (may need to be zipped) and I'll take a look.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
I run texturecache.py on my Windows machine from a shortcut I created and added the options to the command so when I launch the shortcut a cmd window opens and it runs. Problem is when it finishes the window closes before I can read the results. Any possibility of adding "press enter to close window" to the end of the script? Probably best as an option maybe in texturecache.cfg so people running it as a chron job don't get stuck with an open window. Hope this makes sense Smile
If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
(2013-11-03, 14:58)Dilligaf Wrote: I run texturecache.py on my Windows machine from a shortcut I created and added the options to the command so when I launch the shortcut a cmd window opens and it runs. Problem is when it finishes the window closes before I can read the results. Any possibility of adding "press enter to close window" to the end of the script? Probably best as an option maybe in texturecache.cfg so people running it as a chron job don't get stuck with an open window. Hope this makes sense Smile

No, sorry. Just create a cmd file which calls texturecache.py and then add a pause at the end. Make your shortcut call the cmd file.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
Thank you, I just sent you the log files Smile
Reply
(2013-11-03, 15:12)crayzee Wrote: Thank you, I just sent you the log files Smile

Thanks for the logs, they look normal. You're running "c movies" which will cache items only when it needs to, and since all of your movie artwork is already cached, it skips everything and caches nothing.

If you want it to force artwork to be re-cached, use "C movies" (yes, it is case sensitive!)

Standard warning: Since all your artwork is remote, forcing the cache to be repopulated may result in some artwork not being re-cached should the original artwork no longer be available on the remote server.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
Strange...

I ran the tool one time after I added my TV Shows to the library. It worked fine and alle the Artwork was cached. After that, switching through the TV Shows in the library runs very fluent.

After that, I added my movies to the library. I ran the tool again but it cached nothing.
When I go through the library, it's not as fluent as in the TV Show section Sad
Reply
  • 1
  • 27
  • 28
  • 29(current)
  • 30
  • 31
  • 197

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Texture Cache Maintenance utility17