•   
  • 1
  • 93
  • 94
  • 95(current)
  • 96
  • 97
  • 179
  •   
[RELEASE] Texture Cache Maintenance utility
(2015-03-17, 10:17)Milhouse Wrote:
(2015-03-17, 03:04)gardnerd4me Wrote: edit2: file is now working fine locally

So the script now runs under OSMC? Great.

(2015-03-17, 03:04)gardnerd4me Wrote: still can't run S,s,R,r from remote location. Fatal again

The f, F, r, R, S, X and Xd options will only work when run locally, or when run against a mounted userdata folder, as they require direct filesystem access to the Textures13 database and Thumbnails folder of the client.

Either run these options locally on the OSMC client, or run them remotely on your Mac once you have mounted the OSMC userdata folder on the Mac and configured the script with the appropriate Mac-to-OSMC userdata path (@userdata=). Whether the latter is possible with OSMC depends on OSMC... does it have an SMB or NFS server with which to share or export directories?

Thanks for explaining that. I had to install samba server on Pi2, now I can mount and get direct path to textures.db and thumbnails folder. Now all
commands are working correct from my mac instead of just ssh. Wasn't clear why or how it worked before. Thanks for taking me to school... again Big Grin
Reply
I have "Wake devices when deactivating screensaver" activated for convenience, so that I only have to push my remote/keyboard to start both my TV and sound system. But the problem is when I run your tool it will deactivate the screensaver. Is there any solution to this other than deactivate the setting and start my TV and sound manually?

Also.. If I have the Dim screensaver set the screen will be stuck at dimmed when changing profiles. My current solution to this is to have the Dim level at 0%
Reply
(2015-03-31, 00:13)Polygon Man Wrote: I have "Wake devices when deactivating screensaver" activated for convenience, so that I only have to push my remote/keyboard to start both my TV and sound system. But the problem is when I run your tool it will deactivate the screensaver. Is there any solution to this other than deactivate the setting and start my TV and sound manually?

Maybe some more detail on how you are running the tool for it to cause this to happen. Caching shouldn't cause this to happen. Other options might, perhaps legitimately (I'm thinking of "input").

(2015-03-31, 00:13)Polygon Man Wrote: Also.. If I have the Dim screensaver set the screen will be stuck at dimmed when changing profiles. My current solution to this is to have the Dim level at 0%

Profiles are badly broken where the screensaver is concerned (see: trac #15512). Don't expect a fix any time soon.
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,

I thought this might be the answer to my woes of missing/not locally cached artwork on my shared mysql clients. However when I run it locally on my ubuntu installation I get this.

~/.kodi/userdata$ ./texturecache.py c
Traceback (most recent call last):
File "./texturecache.py", line 7753, in <module>
main(sys.argv[1:])
File "./texturecache.py", line 7462, in main
if not checkConfig(argv[0]): sys.exit(2)
File "./texturecache.py", line 7043, in checkConfig
data = wcomms.sendJSON(REQUEST, "libPing", checkResult=False, useWebServer=True)
File "./texturecache.py", line 1866, in sendJSON
data = self.sendWeb("POST", "/jsonrpc", json.dumps(request), {"Content-Type": "application/json"}, timeout=timeout)
File "./texturecache.py", line 1834, in sendWeb
raise httplib.HTTPException("Remote web host requires webserver.username/webserver.password properties")
httplib.HTTPException: Remote web host requires webserver.username/webserver.password properties

I do not have a username or password set for the webserver. I can run the command with an 'nc' and it runs fine. But not when I ask it to cache missing artwork with just a 'c'

Any ideas. I tried downloading the cfg file and putting the username and password fields in. I also tried putting a username and password in the webserver config in Kodi and the cfg file to no avail.

I am running it from the ~/.kodi/userdata directory.

Any help appreciated
Cheers
Spart
6 x Raspberry Pi Model B & B+ Pi2 & 3 Zotac Mag Ubuntu 14.04.1 - Ubuntu 14.04.1 Test Machine Kodi Nightly - RocketNAS 8TB Usable Raid 6 Ubuntu 14.04.1 RocketNAS Build
Reply
(2015-04-03, 00:19)sparticle Wrote: I can run the command with an 'nc' and it runs fine.

The "nc" option doesn't require webserver access, so never attempts a connection to the webserver.

(2015-04-03, 00:19)sparticle Wrote: But not when I ask it to cache missing artwork with just a 'c'

The only way you can get the error you are seeing is by the webserver returning the status "httplib.UNAUTHORIZED", which indicates failed authentication (ie. username/password).

(2015-04-03, 00:19)sparticle Wrote: Any ideas. I tried downloading the cfg file and putting the username and password fields in. I also tried putting a username and password in the webserver config in Kodi and the cfg file to no avail.

You mean you added "webserver.username" and "webserver.password" properties to your cfg file?

Just make sure the script is connecting to the correct port, the default port used by the script is 8080. You can configure the script to use a different port with webserver.port.

Perhaps you have something else listening on port 8080 (requiring authentication) while Kodi is listening on port 80. Just configure the script to use port 80.
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
Quote:The only way you can get the error you are seeing is by the webserver returning the status "httplib.UNAUTHORIZED", which indicates failed authentication (ie. username/password).

(2015-04-03, 00:19)sparticle Wrote: Any ideas. I tried downloading the cfg file and putting the username and password fields in. I also tried putting a username and password in the webserver config in Kodi and the cfg file to no avail.

You mean you added "webserver.username" and "webserver.password" properties to your cfg file?

Just make sure the script is connecting to the correct port, the default port used by the script is 8080. You can configure the script to use a different port with webserver.port.

Perhaps you have something else listening on port 8080 (requiring authentication) while Kodi is listening on port 80. Just configure the script to use port 80.

Interesting. I changes the port and took out the username/password lines and hey presto. Can't see anything else on 8080 though on this machine. Weird, will have to do some digging.

Question is it downloading the missing artwork from one of the other clients or from the net?

Cheers
Spart
6 x Raspberry Pi Model B & B+ Pi2 & 3 Zotac Mag Ubuntu 14.04.1 - Ubuntu 14.04.1 Test Machine Kodi Nightly - RocketNAS 8TB Usable Raid 6 Ubuntu 14.04.1 RocketNAS Build
Reply
(2015-04-03, 01:01)sparticle Wrote: Question is it downloading the missing artwork from one of the other clients or from the net?

It (Kodi) downloads from whatever url is defined in your media library, either local or internet. It's unlikely to be downloading from another client (this might be possible with UPnP, not really sure).
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 everyone,

I'm trying to use this tool for deleting unused artwork. Currently my cached thumbnails folder is over 600mb and I want to clean it up.

I tried:

Code:
python.exe texturecache.py x "where lastusetime='2015-01-01'"

This returns 0 matched rows. I was hoping to earse anything that wasn't accessed this year.

Could anyone share what's the correct command to use?
Reply
It looks like lastusetime isn't a valid filter for the Textures API, I'll need to look into this further.

In the meantime you should be able to get your query to work by using SQL direct access - add @dbjson=no to your command line. Note that the filter you are using is a date/time string so you will need to use a range, eg. "where lastusetime <= '2015-01-01', as matching on exactly '2015-01-01' is never going to find any rows.

Also note the parser is very basic and requires white space between each term. If you get unusual/unexpected results check the logfile to confirm the correct query is being executed.
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
@purpleman: I've pushed an update (v1.9.0) that resolves the field mapping issue, so that you can now query using the JSON API instead of direct SQL.

Code:
python.exe texturecache.py x "where lastusetime like '2015-01-01%'"
would return any item last used on 2015-01-01.

Code:
python.exe texturecache.py x "where lastusetime < '2015-01-01'"
would return any item last used prior to 2015-01-01.
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 a lot, seems to return lots of results now.

What would be the corresponding command to erase all of those?

[/align]
Reply
See first post, parse the row ids and use the "d" 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
Does the JSON API allow the script to query or delete without having direct access to SQL? the reason I ask is that I have an unrooted Fire TV which does not allow me to run the script directly on the box, nor does it allow me direct access to the thumbnail folder ( no way to mount it ) if so how would I go about this? would I need something special in my cfg file for this?

If not are there other folks with unrooted Fire TV's and how do you handle it when the thumbnails start to take up too much space on the device

Thanks in advance for your help! I use this script on my Windows boxes all of the time
Reply
@tropicaljoe: Yes.

Enable remote access in Kodi Settings on the FireTV, then install & run the script on a PC (or some device other than your FireTV) and specify the ip address of your FireTV as a configuration parameter - either @xbmc.host=xx.xx.xx.xx on the command line, or add xbmc.host=xx.xx.xx.xx to texturecache.cfg.

The only options you won't be able to use remotely are: f, F, r, R, S, X and Xd.
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 Milhouse,
Until they figure out how to root the Fire Tv, in the mean time, what do you think I should do if the thumbnail folder gets to big, can I just delete the thumbnail folder and some database within Kodi ( if so what is the name of the database ) and then recache everything with the script? I typically have a lot of shows coming and going so I know there are leftover thumbs and images and the Fire TV does not have a ton of space to waste.

Of course my ideal situation is they figure out how to root the device and allow your script to the do the work as it does on my windows boxes

Thanks again
Reply
  •   
  • 1
  • 93
  • 94
  • 95(current)
  • 96
  • 97
  • 179
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



Logout Mark Read Team Forum Stats Members Help
[RELEASE] Texture Cache Maintenance utility4.7617