• 1
  • 38
  • 39
  • 40(current)
  • 41
  • 42
  • 197
[RELEASE] Texture Cache Maintenance utility
Hi there,

you were right. MySQL was not reachable. Restarted the DB-Server, now everythink works fine again Smile

Thank you very much Smile
Reply
texturecache.py (Version 1.2.4)
  • Add: input option, to send keyboard/remote control input via JSON. eg. input home, input back, input sendtext zombieland or combine multiple actions input home left left select pause 5.5 down select. See JSON API for more details. input executeaction screenshot is handy if you don't have a keyboard connected and need a screenshot (also added synonym screenshot as shortcut for this option).
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
Hi MilhouseVH,

Thanks for that! One tool to do it all, instead of remembering xbmc-send command sequences. Great stuff!
Reply
Not sure if this is a caching issue, therefore I might be posting in wrong forum. Let me know if wrong place and I'll delete this post.

I have all my Christmas movies in one central folder called "Christmas" and then each in their own. Each nfo contains <set>Christmas Movies</set>. Only one movie insists on not being part of the set and I can't figure out why. I've deleted it, cleaned library, ran with the R and P options several times, but no luck.

Playlist
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Christmas</name>
    <match>all</match>
    <rule field="path" operator="contains">
        <value>smb://SERVER3/video/Christmas</value>
    </rule>
    <rule field="set" operator="is">
        <value>Christmas Movies</value>
    </rule>
    <order direction="ascending">sorttitle</order>
</smartplaylist>

Movie.NFO
HTPC: Dell Optiplex 7050 SFF i7-7700 quad-core, 3.6GHz, 16GB
NAS: Synology DS1813+ and DX513, Hybrid RAID (SHR) 48TB usable space
My Media Center | www.CaptainKen.us | www.YouTube.com/KenInGilbert
Reply
Please use xbmclogs.com for code.
Image Image
Reply
(2013-12-07, 20:42)CaptainKen Wrote: Not sure if this is a caching issue, therefore I might be posting in wrong forum. Let me know if wrong place and I'll delete this post.

No, it doesn't sound like a caching issue.

I would suggest looking at your set details with "jd sets christmas movies" and confirm the status of the set members - members should appear as "tc.members", unless you have disabled set membership with @setmembers=no.

Starting a separate thread is probably the best way to proceed with this problem. Remove the movie and then re-scrape it, posting up the debug log (wiki) of the scrape and maybe someone familiar with scraper functionality can chime in and suggest why your movie refuses to become a set member. Maybe removing all of the set members (and thus the set) is worth a shot as well.
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
Just started using this utility on my Pi - when i run
Code:
./texturecache.py c tvseries

I notice in the texturecache log file a lot of these errors

Code:
2013-12-09 12:44:48.599832:Thread-2  : ** iotimeout occurred during web request **
2013-12-09 12:44:48.605006:Thread-2  : preparedl.RECEIVED DATA:
2013-12-09 12:44:48.606097:Thread-2  : Retrying getDownloadURL(), 3 attempts remaining
2013-12-09 12:44:49.089118:Thread-1  : ** iotimeout occurred during web request **
2013-12-09 12:44:49.091925:Thread-1  : preparedl.RECEIVED DATA:
2013-12-09 12:44:49.093399:Thread-1  : Retrying getDownloadURL(), 1 attempts remaining
2013-12-09 12:44:49.108733:Thread-2  : preparedl.JSON WEB REQUEST: [{"jsonrpc": "2.0", "params": {"path": "image://nfs%3a%2f%2f192.168.1.202%2fhome%2fdisk1%2fTV%2fSeinfeld%2fSeason%2005%2fSeinfeld%20-%20s05e03%20-%20The%20Glasses.tbn/"}, "method": "Files.PrepareDownload", "id": "preparedl"}]
2013-12-09 12:44:49.600286:Thread-1  : preparedl.JSON WEB REQUEST: [{"jsonrpc": "2.0", "params": {"path": "image://nfs%3a%2f%2f192.168.1.202%2fhome%2fdisk1%2fTV%2fSeinfeld%2fSeason%2005%2fSeinfeld%20-%20s05e02%20-%20The%20Puffy%20Shirt.tbn/"}, "method": "Files.PrepareDownload", "id": "preparedl"}]
2013-12-09 12:44:54.129590:Thread-2  : ** iotimeout occurred during web request **
2013-12-09 12:44:54.132464:Thread-2  : preparedl.RECEIVED DATA:
2013-12-09 12:44:54.138173:Thread-2  : Retrying getDownloadURL(), 2 attempts remaining
2013-12-09 12:44:54.620427:Thread-1  : ** iotimeout occurred during web request **
2013-12-09 12:44:54.623025:Thread-1  : preparedl.RECEIVED DATA:
2013-12-09 12:44:54.624555:Thread-1  : Image not available for download - uncacheable (embedded?), or doesn't exist. Filename [image://nfs%3a%2f%2f192.168.1.202%2fhome%2fdisk1%2fTV%2fSeinfeld%2fSeason%2005%2fSeinfeld%20-%20s05e02%20-%20The%20Puffy%20Shirt.tbn/]
2013-12-09 12:44:54.633641:Thread-1  : preparedl.JSON WEB REQUEST: [{"jsonrpc": "2.0", "params": {"path": "image://nfs%3a%2f%2f192.168.1.202%2fhome%2fdisk1%2fTV%2fSeinfeld%2fSeason%2005%2fSeinfeld%20-%20s05e06%20-%20The%20Lip%20Reader.tbn/"}, "method": "Files.PrepareDownload", "id": "preparedl"}]
2013-12-09 12:44:54.640922:Thread-2  : preparedl.JSON WEB REQUEST: [{"jsonrpc": "2.0", "params": {"path": "image://nfs%3a%2f%2f192.168.1.202%2fhome%2fdisk1%2fTV%2fSeinfeld%2fSeason%2005%2fSeinfeld%20-%20s05e03%20-%20The%20Glasses.tbn/"}, "method": "Files.PrepareDownload", "id": "preparedl"}]

I've decoded one of the lines where its complaining

Code:
image://nfs://192.168.1.202/home/disk1/TV/Seinfeld/Season 05/Seinfeld - s05e02 - The Puffy Shirt.tbn/

Is the extra slash at the end causing the problem? The file does exist.

Quote:Image not available for download - uncacheable (embedded?), or doesn't exist

If so, any ideas as to how to fix it. So far its picked up 150 errors and its only been running for 10 mins.
Reply
Check your xbmc.log for errors, as it seems to be XBMC that is having problems accessing the files. Maybe a problem with NFS?
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-09, 20:55)MilhouseVH Wrote: Check your xbmc.log for errors, as it seems to be XBMC that is having problems accessing the files. Maybe a problem with NFS?


Mmm - so many errors in the logs.

Code:
11:03:40 T:2846880832   ERROR: COMXImageFile::GetCodingType error unsupported image format
11:03:40 T:2846880832   ERROR: COMXImageFile::ReadFile nfs://192.168.1.202/home/disk2/TV/Californication/Season 05/Californication - s05e01 - JFK to LAX.tbn GetCodingType=0x7fffffff
11:03:40 T:2846880832   ERROR: COMXImageFile::GetCodingType error unsupported image format
11:03:40 T:2846880832   ERROR: COMXImageFile::ReadFile nfs://192.168.1.202/home/disk2/TV/Californication/Season 05/Californication - s05e01 - JFK to LAX.tbn GetCodingType=0x7fffffff
11:03:40 T:2846880832  NOTICE: LoadJpeg: unable to load nfs://192.168.1.202/home/disk2/TV/Californication/Season 05/Californication - s05e01 - JFK to LAX.tbn
11:03:40 T:2846880832 WARNING: JpegIO: Error 55: Not a JPEG file: starts with 0x%02x 0x%02x
11:03:40 T:2846880832   ERROR: Texture manager unable to load file: nfs://192.168.1.202/home/disk2/TV/Californication/Season 05/Californication - s05e01 - JFK to LAX.tbn
11:03:41 T:2969564224   ERROR: COMXCoreComponent::DecoderEventHandler OMX.broadcom.image_decode - OMX_ErrorStreamCorrupt, Bitstream corrupt
11:03:41 T:2846880832   ERROR: COMXReEnc::ReEncode nfs://192.168.1.202/home/disk2/TV/Californication/Season 04/Californication - S04E02 - Suicide Solution.tbn - image not supported

Another thing I've noticed is that some of the paths are incorrect.

Code:
11:38:29 T:2842686528   ERROR: NFS: Failed to stat(home/disk1/TV/2 Broke Girls/season02.tbn) stat call failed with "NFS: Lookup of //2 Broke Girls failed with NFS3ERR_NOENT(-2)"

It should be home/disk2/TV......

Is there a way to completely start over while keeping the flags of what episodes have been watched?

I dont mind trashing all the tbn's if I have to but dont want to lose the watched flags.

I've tried the the C flag but then i get other errors:

Code:
11:44:25 T:2834297920  NOTICE: LoadJpeg: unable to load nfs://192.168.1.202/home/disk2/TV/2 Broke Girls/Season 03/2.Broke.Girls.S03E07.HD.TV.tbn

I've verified the file and it does exist.
Reply
At least you found the problem. Smile

I guess you'll need to confirm if those tbn files really are jpeg images, and replace them if not.
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-11, 13:05)kl1k Wrote: Another thing I've noticed is that some of the paths are incorrect.

Code:
11:38:29 T:2842686528   ERROR: NFS: Failed to stat(home/disk1/TV/2 Broke Girls/season02.tbn) stat call failed with "NFS: Lookup of //2 Broke Girls failed with NFS3ERR_NOENT(-2)"

It should be home/disk2/TV......

You'll need to fix your media library so that it is using the correct path for all the artwork. You can "dump" the media library ("jd movies" or "jd tvshows" etc.) and find all shows/episodes with references to the incorrect paths, then fix them via the GUI. Or try running a QA check:
Code:
./texturecache.py qa tvshows @qa.fail.urls=+/home/disk1/

(2013-12-11, 13:05)kl1k Wrote: Is there a way to completely start over while keeping the flags of what episodes have been watched?

I dont mind trashing all the tbn's if I have to but dont want to lose the watched flags.

As long as the names of your movies and tv shows remain the same before/after the library rescrape, you can backup then restore your watched status.

Backup your watched statuses with:
Code:
./texturecache.py watched movies backup movies.dat
./texturecache.py watched tvshows backup tvshows.dat

Trash and rescrape your library, then finally restore the watched statuses:
Code:
./texturecache.py watched movies restore movies.dat
./texturecache.py watched tvshows restore tvshows.dat

(2013-12-11, 13:05)kl1k Wrote: I've tried the the C flag but then i get other errors:

Code:
11:44:25 T:2834297920  NOTICE: LoadJpeg: unable to load nfs://192.168.1.202/home/disk2/TV/2 Broke Girls/Season 03/2.Broke.Girls.S03E07.HD.TV.tbn

I've verified the file and it does exist.

It's not that the file doesn't exist, is it actually a valid jpg? The xbmc errors you posted previously would suggest that several of your tbn files are not in fact valid jpeg files.
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
Milhouse

I think you probably should think of changing your script name because it does much more than just re-cache textures!

Something on the lines of XBMC.Octopus Smile
Image Image
Reply
Yeah, I wish I'd seen the future when I started this so that I could have chosen a more appropriate name but then I'd have bought lottery tickets too and probably never published a thing from my recently purchased Caribbean hideaway! 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
Hi.. First of all thanks for this fantastic script Smile I have used this tool in windows and worked perfectly.. Now I have switched to linux completely.. Using the latest version of tool, python 2.7.5, Same xbmc build as was on windows and same size of media collection... But on linux, it's taking ages to just load movies and tvshows.. What may be the reason? I can provide any info that you want..

Edit: When I ran it again, looks like things are back to normal speed.. weird :p
~Web and graphic designer... Linux enthusiast... Python Fan... A Gooner~
[AMD A10-7850K 3.7 Ghz, Radeon R7]
[Fedora 27] | [Kodi - 17.6 / Skin - Grid]

Image
Reply
Hi, i have been using this amazing script in the past without any issues, but in the last days i tried it again and i keep getting this error.. Could it be some weird characted in my database?

Code:
atv@crystalbuntu:~$ ./texturecache.py c artists
Traceback (most recent call last):ms...            ..
  File "./texturecache.py", line 6049, in <module>
    main(sys.argv[1:])
  File "./texturecache.py", line 5918, in main
    extraFields=_extraFields, query=_query)
  File "./texturecache.py", line 3219, in jsonQuery
    cacheImages(mediatype, jcomms, database, data, title_name, id_name, force, nodownload)
  File "./texturecache.py", line 3274, in cacheImages
    for r in database.getRows(allfields=False):
  File "./texturecache.py", line 1220, in getRows
    return self._transform(self._getAllColumns(filter, order))
  File "./texturecache.py", line 1240, in _getAllColumns
    return self.execute(SQL).fetchall()
sqlite3.OperationalError: atv@crystalbuntu:~$

Last line in the log is:

Code:
2013-12-25 21:21:10.538734:MainThread: EXECUTING SQL: SELECT t.id, t.cachedurl, t.lasthashcheck, t.url, s.height, s.width, s.usecount, s.lastusetime, s.size, t.imagehash FROM texture t JOIN sizes s ON (t.id = s.idtexture)

I tried run this query in SQLite explorer but it returned no error..

Thanks!
Reply
  • 1
  • 38
  • 39
  • 40(current)
  • 41
  • 42
  • 197

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