• 1
  • 96
  • 97
  • 98(current)
  • 99
  • 100
  • 197
[RELEASE] Texture Cache Maintenance utility
By the way, you can add your Emby url to the singlethread.urls property, so you can still use multiple download threads for other urls. For example:

Code:
texturecache.py c movies @singlethread.urls=+192\.168\.0\.146:8096/mediabrowser
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 curious, what is an example of other urls? I thought it just pulls locally.
Reply
(2015-05-22, 03:39)smakovits Wrote: Just curious, what is an example of other urls? I thought it just pulls locally.

Default singlethread.urls:
Code:
texturecache.py config | grep singlethread
  singlethread.urls = assets\.fanart\.tv

Artwork urls can be local or internet based - the script doesn't really care as it's Kodi that does the "pulling", however some sites (ie. fanart.tv, imdb.com) seem to react very badly to multiple concurrent requests.

Even with this measure imdb.com is still a PITA and will often fail to return perfectly valid actor artwork with a 403 response (I did post about it here but got no replies).
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
Awesome, thanks. If I understand, even though I might be pulling local from Emby for some things, if Emby does not have certain texture files, kodi itself will go to the internet to get it.
Reply
(2015-05-22, 13:45)smakovits Wrote: Awesome, thanks. If I understand, even though I might be pulling local from Emby for some things, if Emby does not have certain texture files, kodi itself will go to the internet to get it.

When caching artwork, Kodi will pull the original artwork from whatever url location is defined in the media library - this might be local (a file, or Emby) or internet.

It's your scraper that will make the decision to use local or internet artwork. Once that decision is made, if the file becomes unavailable for any reason, you won't be able to cache it and will get errors when doing so.

So yes, if Emby (which I know nothing about) doesn't have some things, then it's entirely possible your scraper may use an alternative (internet) location for artwork. Kodi will then honour whatever location is set by the scraper when it comes to caching the artwork.
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
Sweet, thanks.

FYI, EMBY is like plex, but different. It allows better metadata management. There is a plugin, it syncs to the local DB while still connecting back to a central server to maintain play counts across devices.

My purpose for using it is while the headless kodin install and mysql DB work, I like having a little more control of my media. While an NFO or ember media manager can help with a lot of this, emby is just easy. It is the new/old MBserver. I only got in recently when it became emby. As to why I loke it over say plex, I cannot say for sure, but I do know I do like it. It works, manages my media and still gives me full access to everything kodi, so it is a best of everything for me.

I came from a world of the popcorn hour line of players. There was no central media management, so things watched on 1 device were not reflected on another. It was time to replace some aging devices, which brought me to rpi and kodi with the mysql db. From there things were good and worked, but emby takes me a step further and makes life even better.
Reply
Hi,

I am trying to use this utility on MS Windows 8.1 with Python 3.4.

Executing the following command:

python texturecache.py c @xbmc.host=127.0.0.1

and I am getting the following error:

Traceback (most recent call last):
File "texturecache.py", line 7752, in <module>
main(sys.argv[1:])
File "texturecache.py", line 7461, in main
if not checkConfig(argv[0]): sys.exit(2)
File "texturecache.py", line 7061, in checkConfig
data = jcomms.sendJSON(REQUEST, "libVersion", checkResult=False)
File "texturecache.py", line 1871, in sendJSON
s = self.getSocket()
File "texturecache.py", line 1799, in getSocket
raise
RuntimeError: No active exception to reraise

Any ideas how to get this solved?

Thanks and regards

UPDATE: changed the xbmc.host to localhost and it worked for the same PC.
However, it the same error appears whenever I try to run it against a remote KODI installation.
Tried IP, tried hostname (checked it is working as I can ping it) but still it does not work for remote KODI installation.
Checked via the browser that jsonrpc is working:
{
"description": "JSON-RPC API of XBMC",
"id": "http://xbmc.org/jsonrpc/ServiceDescription.json"
...
Any ideas how to solve this?

Thanks and regards
Reply
(2015-05-30, 12:14)aderlopas Wrote: Hi,

I am trying to use this utility on MS Windows 8.1 with Python 3.4.

Executing the following command:

python texturecache.py c @xbmc.host=127.0.0.1

and I am getting the following error:

Traceback (most recent call last):
File "texturecache.py", line 7752, in <module>
main(sys.argv[1:])
File "texturecache.py", line 7461, in main
if not checkConfig(argv[0]): sys.exit(2)
File "texturecache.py", line 7061, in checkConfig
data = jcomms.sendJSON(REQUEST, "libVersion", checkResult=False)
File "texturecache.py", line 1871, in sendJSON
s = self.getSocket()
File "texturecache.py", line 1799, in getSocket
raise
RuntimeError: No active exception to reraise

Any ideas how to get this solved?

Thanks and regards

UPDATE: changed the xbmc.host to localhost and it worked for the same PC.
However, it the same error appears whenever I try to run it against a remote KODI installation.
Tried IP, tried hostname (checked it is working as I can ping it) but still it does not work for remote KODI installation.
Checked via the browser that jsonrpc is working:
{
"description": "JSON-RPC API of XBMC",
"id": "http://xbmc.org/jsonrpc/ServiceDescription.json"
...
Any ideas how to solve this?

Thanks and regards

More Update: after troubleshooting it seems that JSON is called but does nothing...
at XBMC log:

...
22:25:54 T:18446744071983072128 DEBUG: Thread JobWorker 18446744071983072128 terminating (autodelete)
22:26:48 T:18446744071857013376 DEBUG: webserver: request received for /jsonrpc
22:27:19 T:18446744072444084992 DEBUG: Previous line repeats 6 times.

22:27:19 T:18446744072444084992 DEBUG: bool CWinSystemEGL::CreateWindow(RESOLUTION_INFO&): Created surface of size 2560x1440
22:27:19 T:18446744072444084992 NOTICE: GL_VENDOR = Qualcomm
22:27:19 T:18446744072444084992 NOTICE: GL_RENDERER = Adreno (
...

Removed password from Kodi same behavior.

Any ideas?
Reply
(2015-05-30, 21:43)aderlopas Wrote: Any ideas?

Not really.

Try enabling JSON-RPC in Kodi Debugging > Component Logging. Upload both your kodi.log and the log from texturecache.py (add "@logfile=c:\tc.log").

It could be a problem with ipv6, you can force ipv4 with "@rpc.ipversion=4".

Outside chance of it being a problem with Python 3.4, which I've never tested.
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-05-30, 21:51)Milhouse Wrote:
(2015-05-30, 21:43)aderlopas Wrote: Any ideas?

Not really.

Try enabling JSON-RPC in Kodi Debugging > Component Logging. Upload both your kodi.log and the log from texturecache.py (add "@logfile=c:\tc.log").

It could be a problem with ipv6, you can force ipv4 with "@rpc.ipversion=4".

Outside chance of it being a problem with Python 3.4, which I've never tested.

Many thanks for the reply. I am not sure how to attach the logs. Please let me know...
Until then, below an extract:

1. Kodi.log

23:08:24 T:18446744072008294528 DEBUG: JSONRPC: Incoming request: {"params": {"setting": "network.usehttpproxy"}, "jsonrpc": "2.0", "method": "Settings.GetSettingValue", "id": 1}
23:08:24 T:18446744072008294528 DEBUG: JSONRPC: Incoming request: {"params": {"setting": "network.httpproxytype"}, "jsonrpc": "2.0", "method": "Settings.GetSettingValue", "id": 1}


2. texturecache.log:

2015-05-30 23:11:16.214435:MainThread: Command line args: ['texturecache.py', 'c']
2015-05-30 23:11:16.214435:MainThread: Current version #: v1.9.4
2015-05-30 23:11:16.214435:MainThread: Current platform : win32
2015-05-30 23:11:16.214435:MainThread: Python version #: v3.4.3.0 (final)
2015-05-30 23:11:16.214435:MainThread: libPing.JSON WEB REQUEST: [{"id": "libPing", "method": "JSONRPC.Ping", "jsonrpc": "2.0"}]
2015-05-30 23:11:16.292587:MainThread: libPing.RECEIVED DATA: {
"id": "libPing",
"jsonrpc": "2.0",
"result": "pong"
}

ERROR:root:** Terminating due to unexpected exception **
Traceback (most recent call last):
File "texturecache.py", line 7754, in <module>
main(sys.argv[1:])
File "texturecache.py", line 7463, in main
if not checkConfig(argv[0]): sys.exit(2)
File "texturecache.py", line 7063, in checkConfig
data = jcomms.sendJSON(REQUEST, "libVersion", checkResult=False)
File "texturecache.py", line 1873, in sendJSON
s = self.getSocket()
File "texturecache.py", line 1801, in getSocket
raise
RuntimeError: No active exception to reraise
Reply
Use pastebin.com or xbmclogs.com to upload your log, then post the link.

Also use the [code] tag to format small snippets/extracts of logs.

I don't know where the network.usehttpproxy and network.httpproxytype requests are coming from, they're not from the texturecache.py script.

The exception that is being raised would suggest the script is not able to establish either an IPv4 or IPv6 TCP socket to Kodi - this smells of a firewall issue on your Windows PC.
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-05-30, 22:20)aderlopas Wrote:
(2015-05-30, 21:51)Milhouse Wrote:
(2015-05-30, 21:43)aderlopas Wrote: Any ideas?

Not really.

Try enabling JSON-RPC in Kodi Debugging > Component Logging. Upload both your kodi.log and the log from texturecache.py (add "@logfile=c:\tc.log").

It could be a problem with ipv6, you can force ipv4 with "@rpc.ipversion=4".

Outside chance of it being a problem with Python 3.4, which I've never tested.

Many thanks for the reply. I am not sure how to attach the logs. Please let me know...
Until then, below an extract:

1. Kodi.log

23:08:24 T:18446744072008294528 DEBUG: JSONRPC: Incoming request: {"params": {"setting": "network.usehttpproxy"}, "jsonrpc": "2.0", "method": "Settings.GetSettingValue", "id": 1}
23:08:24 T:18446744072008294528 DEBUG: JSONRPC: Incoming request: {"params": {"setting": "network.httpproxytype"}, "jsonrpc": "2.0", "method": "Settings.GetSettingValue", "id": 1}


2. texturecache.log:

2015-05-30 23:11:16.214435:MainThread: Command line args: ['texturecache.py', 'c']
2015-05-30 23:11:16.214435:MainThread: Current version #: v1.9.4
2015-05-30 23:11:16.214435:MainThread: Current platform : win32
2015-05-30 23:11:16.214435:MainThread: Python version #: v3.4.3.0 (final)
2015-05-30 23:11:16.214435:MainThread: libPing.JSON WEB REQUEST: [{"id": "libPing", "method": "JSONRPC.Ping", "jsonrpc": "2.0"}]
2015-05-30 23:11:16.292587:MainThread: libPing.RECEIVED DATA: {
"id": "libPing",
"jsonrpc": "2.0",
"result": "pong"
}

ERROR:root:** Terminating due to unexpected exception **
Traceback (most recent call last):
File "texturecache.py", line 7754, in <module>
main(sys.argv[1:])
File "texturecache.py", line 7463, in main
if not checkConfig(argv[0]): sys.exit(2)
File "texturecache.py", line 7063, in checkConfig
data = jcomms.sendJSON(REQUEST, "libVersion", checkResult=False)
File "texturecache.py", line 1873, in sendJSON
s = self.getSocket()
File "texturecache.py", line 1801, in getSocket
raise
RuntimeError: No active exception to reraise

OK, got it to work. Had to also specify the allow remote programs to control Kodi setting in services.
Strangely enough this help message came out only when running with python 2.7.

Thanks a lot for your response and help.
Reply
(2015-05-30, 22:54)aderlopas Wrote:
(2015-05-30, 22:20)aderlopas Wrote:
(2015-05-30, 21:51)Milhouse Wrote: Not really.

Try enabling JSON-RPC in Kodi Debugging > Component Logging. Upload both your kodi.log and the log from texturecache.py (add "@logfile=c:\tc.log").

It could be a problem with ipv6, you can force ipv4 with "@rpc.ipversion=4".

Outside chance of it being a problem with Python 3.4, which I've never tested.

Many thanks for the reply. I am not sure how to attach the logs. Please let me know...
Until then, below an extract:

1. Kodi.log

23:08:24 T:18446744072008294528 DEBUG: JSONRPC: Incoming request: {"params": {"setting": "network.usehttpproxy"}, "jsonrpc": "2.0", "method": "Settings.GetSettingValue", "id": 1}
23:08:24 T:18446744072008294528 DEBUG: JSONRPC: Incoming request: {"params": {"setting": "network.httpproxytype"}, "jsonrpc": "2.0", "method": "Settings.GetSettingValue", "id": 1}


2. texturecache.log:

2015-05-30 23:11:16.214435:MainThread: Command line args: ['texturecache.py', 'c']
2015-05-30 23:11:16.214435:MainThread: Current version #: v1.9.4
2015-05-30 23:11:16.214435:MainThread: Current platform : win32
2015-05-30 23:11:16.214435:MainThread: Python version #: v3.4.3.0 (final)
2015-05-30 23:11:16.214435:MainThread: libPing.JSON WEB REQUEST: [{"id": "libPing", "method": "JSONRPC.Ping", "jsonrpc": "2.0"}]
2015-05-30 23:11:16.292587:MainThread: libPing.RECEIVED DATA: {
"id": "libPing",
"jsonrpc": "2.0",
"result": "pong"
}

ERROR:root:** Terminating due to unexpected exception **
Traceback (most recent call last):
File "texturecache.py", line 7754, in <module>
main(sys.argv[1:])
File "texturecache.py", line 7463, in main
if not checkConfig(argv[0]): sys.exit(2)
File "texturecache.py", line 7063, in checkConfig
data = jcomms.sendJSON(REQUEST, "libVersion", checkResult=False)
File "texturecache.py", line 1873, in sendJSON
s = self.getSocket()
File "texturecache.py", line 1801, in getSocket
raise
RuntimeError: No active exception to reraise

OK, got it to work. Had to also specify the allow remote programs to control Kodi setting in services.
Strangely enough this help message came out only when running with python 2.7.

Thanks a lot for your response and help.

Yes, confirmed. with Python 3.4 I get socket closed prematurely while running...
So with python 3.4 it is not running correctly.
Reply
OK thanks, if I get time I'll install Python 3.4 on a Windows box and try to nail it down, obviously a slightly altered semantic somewhere...
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-05-30, 23:07)Milhouse Wrote: OK thanks, if I get time I'll install Python 3.4 on a Windows box and try to nail it down, obviously a slightly altered semantic somewhere...

Great, Many thanks. Please also take note that it would still not work without specifying the following in advancedsettings.xml:

<jsonrpc>
<compactoutput>false</compactoutput>
<tcpport>9090</tcpport>
</jsonrpc>

Note that I am also working with Kodi 15.0 Beta 1, and I got it working on the following devices:

1. LG G3 Android 5.0
2. Minix Neo X7 Kit Kat
3. Minix Neo X8-H Kit Kat
4. Minix Neo X8-H Plus Kit Kat

Your script is running on a Zotac ZBox ID18 4GB RAM, with MS Windows 8.1 Pro and Python 2.7. Got it working for the local Windows Kodi as well.
Reply
  • 1
  • 96
  • 97
  • 98(current)
  • 99
  • 100
  • 197

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