• 1
  • 39
  • 40
  • 41(current)
  • 42
  • 43
  • 197
[RELEASE] Texture Cache Maintenance utility
(2013-12-25, 22:26)blurp76 Wrote: Could it be some weird characted in my database?

Seems unlikely given the traceback, which doesn't correspond to the usual invalid encode/decode traceback. This looks more like a fatal and unexpected error in the SQLite library/module - are you sure SQLite is installed and working correctly on the ATV, as this platform is a bit of a nightmare where SQLite is concerned.

By all means PM me your Textures13.db and I'll see if I can reproduce, though I don't have an ATV but who knows - might get lucky.

I would suggest trying a recent Gotham build (within last month) on the ATV as by default texturecache.py will try and use JSON to query the texture cache database on recent Gotham builds and not use diect SQLite access at all, so you shouldn't even need to install SQLite to get texturecache.py to work (with Gotham).
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
(2013-12-26, 01:56)MilhouseVH Wrote: Seems unlikely given the traceback, which doesn't correspond to the usual invalid encode/decode traceback. This looks more like a fatal and unexpected error in the SQLite library/module - are you sure SQLite is installed and working correctly on the ATV, as this platform is a bit of a nightmare where SQLite is concerned.
Thanks for your help, MilhouseVH! Honestly i wouldn't know how to check for error in my crystalbuntu atv installation, but it used to work in the past and i don't think i ever made any changes related to SQLite..
I tried to run this:
Code:
root@crystalbuntu:/home/atv# dpkg -l|grep sqlite
ii  libsqlite3-0                      3.7.9-2ubuntu1.1                                    SQLite 3 shared library
root@crystalbuntu:/home/atv# dpkg-reconfigure libsqlite3-0
root@crystalbuntu:/home/atv#
root@crystalbuntu:/home/atv# dpkg -L libsqlite3-0
/.
/usr
/usr/lib
/usr/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu/libsqlite3.so.0.8.6
/usr/share
/usr/share/doc
/usr/share/doc/libsqlite3-0
/usr/share/doc/libsqlite3-0/README.Debian
/usr/share/doc/libsqlite3-0/changelog.Debian.gz
/usr/share/doc/libsqlite3-0/copyright
/usr/lib/i386-linux-gnu/libsqlite3.so.0
root@crystalbuntu:/home/atv# dpkg -l|grep python
ii  libpython2.7                      2.7.3-0ubuntu3.1                                    Shared Python runtime library (version 2.7)
ii  python                            2.7.3-0ubuntu2                                      interactive high-level object-oriented language (default version)
ii  python-configobj                  4.7.2+ds-3build1                                    simple but powerful config file reader and writer for Python
ii  python-dbus                       1.0.0-1ubuntu1                                      simple interprocess messaging system (Python interface)
ii  python-dbus-dev                   1.0.0-1ubuntu1                                      main loop integration development files for python-dbus
ii  python-gi                         3.2.2-1~precise                                     Python 2.x bindings for gobject-introspection libraries
ii  python-imaging                    1.1.7-4                                             Python Imaging Library
ii  python-minimal                    2.7.3-0ubuntu2                                      minimal subset of the Python language (default version)
ii  python-pexpect                    2.3-1ubuntu2                                        Python module for automating interactive applications
ii  python2.7                         2.7.3-0ubuntu3.1                                    Interactive high-level object-oriented language (version 2.7)
ii  python2.7-minimal                 2.7.3-0ubuntu3.1                                    Minimal subset of the Python language (version 2.7)
root@crystalbuntu:/home/atv#

(2013-12-26, 01:56)MilhouseVH Wrote: By all means PM me your Textures13.db and I'll see if I can reproduce, though I don't have an ATV but who knows - might get lucky.
You got a PM

(2013-12-26, 01:56)MilhouseVH Wrote: I would suggest trying a recent Gotham build (within last month) on the ATV as by default texturecache.py will try and use JSON to query the texture cache database on recent Gotham builds and not use diect SQLite access at all, so you shouldn't even need to install SQLite to get texturecache.py to work (with Gotham).
Mmh, i'll take this in consideration, but i think i'll wait that official builds for Gotham on crystalbuntu are released, i wouldn't want to mess up my installation that is working fine except this small problem
Reply
(2013-12-26, 16:29)blurp76 Wrote: You got a PM

Thanks, I've been able to reproduce on Ubuntu x86 so will try and narrow down the cause and hopefully implement a fix.

Edit: The first problem row is id 889, python3 gives a more informative traceback:
Code:
sqlite3.OperationalError: Could not decode to UTF-8 column 'url' with text 'nfs://192.168.1.104/mnt/user/MOVIES/La fine � il mio inizio (2010)/La fine � il mio inizio.dvd-fanart.jpg'
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
Ok, i did a little googling and this modification to your script seems to do the job, Nod no idea if this has any adverse effect..
(rows 1181-1183)

Code:
self.mydb = lite.connect(self.config.getDBPath(), timeout=10)
        self.mydb.text_factory = str
        self.DBVERSION = self.execute("SELECT idVersion FROM version").fetchone()[0]
Reply
Yeah, although it's a bit more involved than that if the script is also to support Python3 users, plus that fix alone causes problems for other foreign characters, and the SQLite data needs to be compatible with the data returned by JSON otherwise nothing will match...

Try version 1.2.6 that I have just pushed:
  • Fix: Revert SQLite to use iso-8859-1 text factory with speculative conversion to utf-8
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
can anyone help me out, im looking to automate the pre-cacheing of fanart and thumbs, to help speed up xbmc, has anyone got any pointers please
Reply
Knowing what OS would help.

For Linux, you could just add a cron entry that calls the "c" option, or write a simple script and run that from cron if you want a bit more control (logging, error handling etc.). On Windows you might be able to schedule something (the "at" command?) but it's been years since I looked at Windows or scheduling batch scripts and memories that are best forgotten... Smile
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
openelec on raspberry pi, dont really need to see whats happening, seeing as i want to set it to run over-night.

can you give me an example what id put into cron, so i can edit accordingly
Reply
1) Enable cron in the OpenELEC settings applet.

2) In SSH, enter "crontab -e" and the nano editor will start

3) Add a line as follows:
Code:
0 0 * * * /storage/texturecache.py c

4) Press "CTRL-X", Y, and then RETURN

5) Confirm the cron entry has been saved with "crontab -l" (that's l as in list)

6) Confirm that /sbin/crond is running with "ps aux | grep crond" - if not, you might have to reboot the Pi. Check for crond after rebooting.

With the above completed your cache will now preload at 0 (0-59) minutes past the 0 (0-23) hour on every day of the month (*, 1-31), on every month of the year (*, 1-12), on every day of the week (*, 0-6 [sun-sat]).

Or in other words, it will be run at midnight every night of the year.
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
00 06 * * /storage/texturecache.py c movies
00 06 * * /storage/texturecache.py c tvshows

would those be right for 6 am caching daily?
Reply
Yes, but you might not want to run them concurrently.

Code:
./texturecache.py c video

would cache movies, tvshows and sets (movie sets).

Alternatively this is where a simple script would help:

Code:
#!/bin/bash

/storage/texturecache.py c movies
/storage/texturecache.py c tvshows

and save it as /storage/preload.sh giving it execute permission with "chmod +x /storage/preload.sh"

Then in cron:
Code:
00 06 * * /storage/preload.sh

Now if you want to add extra steps or perform other preload tasks you just edit the script rather than add more cron entries which may overlap as you never know how long they're going to take.
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
thanks, added ./texturecache.py c video to cron for tomorrow morning at 6.02 after a 6.00 am reboot, added rep, thank-you for the help
Reply
(2013-12-29, 03:00)stuCONNERS Wrote: thanks, added ./texturecache.py c video to cron for tomorrow morning at 6.02 after a 6.00 am reboot, added rep, thank-you for the help

Make sure you use the full path rather than a relative path on cron jobs - although the job will be running as root the current directory may not be /storage when the job runs, in which case "./texturecache,py" will fail (most probably silently).

I would always use /storage/texturecache,py just to be sure of what will be run.
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
worked great, took your advice and added as a script instead, you dont how to add library(video) update to the script do you? that way i can add everything to 1 script instead after the reboot.
Reply
(2013-12-31, 03:05)stuCONNERS Wrote: you dont how to add library(video) update to the script do you?

Code:
/storage/texturecache.py vscan
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
  • 1
  • 39
  • 40
  • 41(current)
  • 42
  • 43
  • 197

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