• 1
  • 94
  • 95
  • 96(current)
  • 97
  • 98
  • 197
[RELEASE] Texture Cache Maintenance utility
You can remotely prune (P) the texture cache of the FireTV, which will get rid of any leftover artwork. Just run the script on one of your Windows boxes, point it at the FireTV, and use the "P" 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
Hello Milhouse,

Just want to say thanks for this fine utility Smile It has saved me many times from having to wipe my library, and it has saved me a lot of work when I had to do it anyway. Backup and restore of watched status is awesome!

Thanks!
Reply
Hi,

I tried the tool on my RPi2 with OpenELEC 5.0.8 installed.

But i get errors while trying to re-download cache files for differtent tvshows.

I've put the output in a pastebin:

http://pastebin.com/P3bnwMZ4

Hope you can help me out Big Grin
Reply
Look at your kodi.log, it's Kodi that can't download the files. My guess is that the artwork isn't in a folder that is in your sources.xml.
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 Milhouse,

first of all I have to say that texturecache.py is a great utility for remotely administrating Kodi-PCs in a network, especially when you are not very familiar with JSON-RPC-commands and Python. I meanwhile not only use texturecache.py for updating my music and video databases (which I have centralized via mysql) and for having all textures scraped into the cache of each single Kodi-PC afterwards. I also use it for waking up, rebooting and shutting down those PCs remotely, taking screenshots remotely, starting xbmc-backup remotely, starting the ipcamera-addon remotely when the doorbell rings (showing the picture of the camera at the front-door), and sending messages to single Kodi-PCs remotely etc.. Texturecache.py for me is an omnipotent tool for remote-administrating my whole Kodi-network just from my main computer in my office-room. I have written batch-files for most of the steps I frequently take and it has become very convenient this way.

Now comming back to the feature of sending messages (the "notify"-option): I would like the popup-message to show a jpg residing on my server (smb-access to the respective path is possible from all Kodi-clients). Alternatively I could put the picture in the userdata-folder on each client, which - of course - would limit the amount of pictures I could chose from when sending a message. I already tried both but somehow it seems did not manage to state the path correctly. The result is "NameError: name 'icon' is not defined" and the message does not go through. So how would I have to combine the path to the picture with the notify-command? Does the picture have to be in a certain format (jpg, ico) or a specific resolution?

Another thing: The option to show messages on a (remote) Kodi-PC could be very useful for a lot of things. Would it be possible to implement parameters for resizing the popup-box (e.g. to have bigger boxes popping up) or to have pictures shown not only as an icon but in a wider resolution (e.g. the picture of an outdoor camera)? Or do those things too much depend on the skin used on the Kodi-PC?

Keep up the good work!

Brgds,

FantasticN
Reply
Thanks, glad you're finding it useful. Smile

Regarding the notify image, sorry about that - it looks like there was an error in the code, and I've pushed a new update, v.1.9.1.

These are all working for me now, with Kodi15 on OpenELEC:

Code:
./texturecache.py notify message title 5000 info
./texturecache.py notify message title 5000 warning
./texturecache.py notify message title 5000 error
./texturecache.py notify message title 5000 "/storage/atest.png"
./texturecache.py notify message title 5000 "/usr/share/kodi/media/icon48x48.png"
./texturecache.py notify message title 5000 "nfs://192.168.0.3/mnt/share/data/atest.png"
./texturecache.py notify message title 5000 "nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip]-poster.jpg"

Obviously the last 4 examples may not work for you depending on your setup, but it should now be possible to show png or jpg images, either locally or from the network.

(2015-04-21, 09:24)fantasticn Wrote: Another thing: The option to show messages on a (remote) Kodi-PC could be very useful for a lot of things. Would it be possible to implement parameters for resizing the popup-box (e.g. to have bigger boxes popping up) or to have pictures shown not only as an icon but in a wider resolution (e.g. the picture of an outdoor camera)? Or do those things too much depend on the skin used on the Kodi-PC?

I'd say it's more of an issue that this isn't supported by the JSON API - the only way to notify the user is with the small kai toast dialog, and if you want something more prominent this would require a modification to the JSON API. It's also true that each skin implements the kai toast notification in different ways, so that would also be a factor. Perhaps an addon would be a better solution, that could executed with various parameters and display the required dialog/window/image/etc.
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
Quick question...

When using the qax option, along with the qa.nfo.refresh parameter -- is the CREATED or MODIFIED date of the NFO file used to determine if it is new?

My specific issue:
I have an NFO file created 4/1/15. I modified it yesterday, so now the created date is 4/1/15 and the last modified date is 4/21/15, When I run texturecache with qax and qa.nfo.refresh=1, it doesn't seem to be catching this modified NFO file (the changes I made to it don't end up making it to the database), but it definitely sees (and updates) NFO files that were created on 4/21/15 in this scenario.

If it matters (I assume it's looking at file system attributes for this), I'm running this on a Win7 box.

Thanks
Reply
Hello Milhouse,

thank you very much for your reply and for revising your great tool. Unfortunately I was not able to trigger a popup message with a custom picture. I tried "smb://.../picture.jpg" as well as "nfs://../picture.jpg" (for I also have haneWIN NFS Server running on my Windows-Server), but with no success. The messages went through but they always showed up without any icon at all.

However, I am pretty fine with the "warning" and "info" options since they at least offer kind of a "neutral" image. Without those options the message always displays the image of the last pop message (e.g. the image of an addon that was updated and the update message had been shown with its logo). That is quiet random. Therefore I would suggest implementing the "info"-option as the default selection when no other parameter is given.

As to the resolution of the images I understand that there is no preference and that they will always be automaticall resized to fit the icon field.

Once again thank you very much for your answers and your powerful tool. Since it is not limited to texures-cache maintenance (anymore), you should think about giving it a more general name. It could easily become an omnipotent remote-adaministration utility for kodi. E.g. I found a lot of threads regarding certain ways of remotely triggering the playback of a videofile or music, starting addons or sending messages via JSON-RPC which your tool would be an easy solution to.

Keep up the good work!

Brgds,

FantasticN
Reply
(2015-04-22, 18:34)cgrey Wrote: Quick question...

When using the qax option, along with the qa.nfo.refresh parameter -- is the CREATED or MODIFIED date of the NFO file used to determine if it is new?

My specific issue:
I have an NFO file created 4/1/15. I modified it yesterday, so now the created date is 4/1/15 and the last modified date is 4/21/15, When I run texturecache with qax and qa.nfo.refresh=1, it doesn't seem to be catching this modified NFO file (the changes I made to it don't end up making it to the database), but it definitely sees (and updates) NFO files that were created on 4/21/15 in this scenario.

If it matters (I assume it's looking at file system attributes for this), I'm running this on a Win7 box.

Thanks

It's the lastmodified file attribute returned by Kodi when querying directory/file details in JSON, so should be the modification timestamp.

By default qa/qax will only consider movies and tvshows added to the library in the previous 30 days, so it may be ignoring your movie if it was added to your library more than 30 days ago. Add @qaperiod=9999 to effectively disable this check.
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
(2015-04-22, 18:53)fantasticn Wrote: thank you very much for your reply and for revising your great tool. Unfortunately I was not able to trigger a popup message with a custom picture. I tried "smb://.../picture.jpg" as well as "nfs://../picture.jpg" (for I also have haneWIN NFS Server running on my Windows-Server), but with no success. The messages went through but they always showed up without any icon at all.

Strange, as this is working fine for me - maybe some sort of permission problem? If you enable debug logging in Kodi, do you see any NFS requests to access the image file?

This is me accessing a non-existent poster image:
Code:
./texturecache.py notify msg title 1500 "nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip]-posterX.jpg"
...
22:22:32 4223.093262 T:1754473536   DEBUG: JSONRPC Server: New connection detected
22:22:32 4223.093262 T:1754473536    INFO: JSONRPC Server: New connection added
22:22:32 4223.109375 T:1754473536    INFO: JSONRPC Server: Disconnection detected
22:22:32 4223.109863 T:1754473536   DEBUG: JSONRPC Server: New connection detected
22:22:32 4223.109863 T:1754473536    INFO: JSONRPC Server: New connection added
22:22:32 4223.110352 T:1754473536   DEBUG: JSONRPC: Value does not match any of the enum values in type
22:22:32 4223.110840 T:1754473536    INFO: JSONRPC Server: Disconnection detected
22:22:32 4223.147949 T:1968001024   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
22:22:32 4223.148438 T:1947202624  NOTICE: CAESinkPi:AddPackets Underrun (delay:0.00 frames:2205)
22:22:32 4223.152832 T:1673331776  NOTICE: Thread JobWorker start, auto delete: true
22:22:32 4223.159180 T:1673331776   ERROR: NFS: Failed to stat(mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip]-posterX.jpg) stat call failed with "NFS: Lookup of /media/Video/MoviesHD/Zombieland (2009)[BDRip]-posterX.jpg failed with NFS3ERR_NOENT(-2)"
22:22:32 4223.159668 T:1673331776   DEBUG: GetImageHash - unable to stat url nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip]-posterX.jpg
22:22:34 4225.020020 T:1968001024   DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------

so you should see something in your log which may give a clue why Kodi can't access the file, and maybe even allow you to fix that problem.

(2015-04-22, 18:53)fantasticn Wrote: However, I am pretty fine with the "warning" and "info" options since they at least offer kind of a "neutral" image. Without those options the message always displays the image of the last pop message (e.g. the image of an addon that was updated and the update message had been shown with its logo). That is quiet random. Therefore I would suggest implementing the "info"-option as the default selection when no other parameter is given.

Yes, this particular behaviour is known.
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
(2015-04-22, 23:13)Milhouse Wrote:
(2015-04-22, 18:34)cgrey Wrote: Quick question...

When using the qax option, along with the qa.nfo.refresh parameter -- is the CREATED or MODIFIED date of the NFO file used to determine if it is new?

My specific issue:
I have an NFO file created 4/1/15. I modified it yesterday, so now the created date is 4/1/15 and the last modified date is 4/21/15, When I run texturecache with qax and qa.nfo.refresh=1, it doesn't seem to be catching this modified NFO file (the changes I made to it don't end up making it to the database), but it definitely sees (and updates) NFO files that were created on 4/21/15 in this scenario.

If it matters (I assume it's looking at file system attributes for this), I'm running this on a Win7 box.

Thanks

It's the lastmodified file attribute returned by Kodi when querying directory/file details in JSON, so should be the modification timestamp.

By default qa/qax will only consider movies and tvshows added to the library in the previous 30 days, so it may be ignoring your movie if it was added to your library more than 30 days ago. Add @qaperiod=9999 to effectively disable this check.

Hmm... Thanks for the info. I will double check by setting the qaperiod to 9999, but in this particular case, the move I've been testing with was added on 4/1/15 (21 days ago). Still, I'll wait for the results of another scan with that parameter set to be sure.
Reply
You'll probably need @nfo.refresh=2 to pick up the nfo modified on 21 April, or touch the nfo to update the modification timestamp. If it's still not being found, maybe a logfile will help.

Also remember that "date added" is by default based on the modification timestamp of the media item, not when it was physically added to Kodi, but setting @qaperiod=9999 should mean that is no longer a concern.
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 see that the "choose art" button can be used to add a new art type to video content. For example, you can use this to add the art type "discart" to music videos. It gets in the database as a "type" for a "media_type" in the video art table. So my question is, is it possible to iterate through all music videos in the database and see if art with art type "discart" is stored (url exists)? If not, if file name disc.png or cdart.png exists in the item folder, add it to the database?

scott s.
.
Reply
(2015-04-28, 04:50)scott967 Wrote: I see that the "choose art" button can be used to add a new art type to video content. For example, you can use this to add the art type "discart" to music videos. It gets in the database as a "type" for a "media_type" in the video art table. So my question is, is it possible to iterate through all music videos in the database and see if art with art type "discart" is stored (url exists)?

I've just pushed a new version (v1.9.4) that has basic support for a "musicvideos" media class - pretty much untested, as I don't have any music videos with which to test.

You should be able to dump your musicivideos data with "texturecache.py jd musicvideos" and process the artwork types.

For example:
Code:
./texturecache.py jd musicvideos | grep \"image | awk -F\" '{ print $2 }' | sort -u
would list all the unique artwork types for musicvideos.

(2015-04-28, 04:50)scott967 Wrote: If not, if file name disc.png or cdart.png exists in the item folder, add it to the database?

Normally you would be able to assign an image for an artwork type using the "set" option - if the artwork type doesn't exist already, it will be created.

For example, to assign a new poster for musicvideo #1:
Code:
./texturecache.py set musicvideo 1 art.poster "nfs://192.168.0.3/mnt/share/media/MusicVids/AVideo-poster.jpg"

However, this is currently crashing Kodi master - it could be because I don't have any musicvideos loaded in my library, maybe you can test it and confirm.

Backtrace of crash (lastest master):
Code:
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x003bf580 in std::vector<dbiplus::field_value, std::allocator<dbiplus::field_value> >::at(unsigned int) const ()
...
Thread 1 (LWP 620):
#0  0x003bf580 in std::vector<dbiplus::field_value, std::allocator<dbiplus::field_value> >::at(unsigned int) const ()
#1  0x003ae2c4 in CVideoDatabase::GetDetailsForMusicVideo(std::vector<dbiplus::field_value, std::allocator<dbiplus::field_value> > const*, bool) ()
#2  0x003ae548 in CVideoDatabase::GetDetailsForMusicVideo(std::unique_ptr<dbiplus::Dataset, std::default_delete<dbiplus::Dataset> >&, bool) ()
#3  0x003ae8fc in CVideoDatabase::GetMusicVideoInfo(std::string const&, CVideoInfoTag&, int) ()
#4  0x008cb250 in JSONRPC::CVideoLibrary::SetMusicVideoDetails(std::string const&, JSONRPC::ITransportLayer*, JSONRPC::IClient*, CVariant const&, CVariant&) ()
#5  0x008a56f8 in JSONRPC::CJSONRPC::HandleMethodCall(CVariant const&, CVariant&, JSONRPC::ITransportLayer*, JSONRPC::IClient*) ()
#6  0x008a5974 in JSONRPC::CJSONRPC::MethodCall(std::string const&, JSONRPC::ITransportLayer*, JSONRPC::IClient*) ()
#7  0x007be268 in JSONRPC::CTCPServer::CTCPClient::PushBuffer(JSONRPC::CTCPServer*, char const*, int) ()
#8  0x007bf1f0 in JSONRPC::CTCPServer::Process() ()
#9  0x00956a14 in CThread::Action() ()
#10 0x00957280 in CThread::staticThread(void*) ()
#11 0x76dcbd88 in ?? () from /lib/libpthread.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Full crashlog: http://sprunge.us/gPZc
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 have the problem that sometimes the scraper for music just doesn't find thumbs or fanart. I then add them manually to the music folder. But those images don't show up after an audio library update. But if I delete the whole Music library and do a fresh rescan, they get picked up. Can I use Texture Cache Maintenance to do the trick without a rescan from scratch?? Thanks!
Reply
  • 1
  • 94
  • 95
  • 96(current)
  • 97
  • 98
  • 197

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