20 Nov 2019 - TVDB Scraper v3.2.0 is now available which reinstates scraping. TVDB are still in the process of fixing a number of bugs so there may still be further breakages. See this post. 2901570 (post)

  •   
  • 1
  • 100
  • 101
  • 102(current)
  • 103
  • 104
  • 179
  •   
[RELEASE] Texture Cache Maintenance utility
OK, this is the last post on this, sorted. I can now continue with using texturecache as originally intended. Thanks for the help and sorry it went OT.

The RPi Kodi log showed it wasn't loading the proper advancedsettings.xml file. Searching around forum posts I came across another post from you Milhouse. The file was in the correct location, but had a capital A first letter (Advancedsettings.xml). Fixed that and next boot all was OK.

1882389 (post)
Reply
Okay a bit of a problem when trying to run ./texturecache.py c

Code:
FATAL: The task you wish to perform requires that the web server is
       enabled and running on the XBMC system you wish to connect.

       A connection cannot be established to the following webserver:
       localhost:8080

       Check settings in properties file texturecache.cfg

Here's my setting:

Code:
#userdata = ~/.kodi/userdata/
#dbfile = Database/Textures13.db
#thumbnails = Thumbnails/
#kodi.host = localhost
#webserver.port = 9090
#webserver.username = ****
#webserver.password = ****
#rpc.port = 9090
#download.threads = 2
#extrajson.albums  =
#extrajson.artists =
#extrajson.songs   =
#extrajson.movies  =
#extrajson.sets    =
#extrajson.tvshows.tvshow =
#extrajson.tvshows.season =
#extrajson.tvshows.episode=
#qaperiod = 30
#qa.file = no
#cache.castthumb = no
#logfile =
#logfile.verbose = no
#network.mac = aa:bb:cc:dd:ee:ff

My port in Kodi is 9090. I know it's working because I've used another app and it connected.

So, I gave in and changed my port to 8080, along with the setting file, but I got this:

Code:
Traceback (most recent call last):
  File "C:\Users\MarHutchy\Downloads\Programs\Texture Cache Maintenance utility\
texturecache.py", line 7890, in <module>
    main(sys.argv[1:])
  File "C:\Users\MarHutchy\Downloads\Programs\Texture Cache Maintenance utility\
texturecache.py", line 7599, in main
    if not checkConfig(argv[0]): sys.exit(2)
  File "C:\Users\MarHutchy\Downloads\Programs\Texture Cache Maintenance utility\
texturecache.py", line 7181, in checkConfig
    data = wcomms.sendJSON(REQUEST, "libPing", checkResult=False, useWebServer=T
rue)
  File "C:\Users\MarHutchy\Downloads\Programs\Texture Cache Maintenance utility\
texturecache.py", line 1987, in sendJSON
    data = self.sendWeb("POST", "/jsonrpc", json.dumps(request), {"Content-Type"
: "application/json"}, timeout=timeout)
  File "C:\Users\MarHutchy\Downloads\Programs\Texture Cache Maintenance utility\
texturecache.py", line 1955, in sendWeb
    raise httplib.HTTPException("Remote web host requires webserver.username/web
server.password properties")
httplib.HTTPException: Remote web host requires webserver.username/webserver.pas
sword properties

What am I doing wrong?
Also what's the difference between c and C?
Laptop: Dell Inspiron i7559-2512BLK | Windows 10 Pro x64 | Intel Core i7 6700HQ (2.60 GHz) | 1 TB + 8 GB SSHD
Kodi 18.3
MiniPC: LibreELEC 8.2.1
Sharing Media: SMB (HDD: 2 TB, 1 TB) | Media Manager/Organizer - Media Companion
Reply
Port 9090 is the RPC port, not the web server port.

Kodi is probably configured with the webserver on port 80, so either change the webserver port to 8080 in Kodi, or configure texturecache.py to use "webserver.port = 80".

You can only change the RPC port by adding a setting to advancedsettings.xml, and best to leave this as 9090.

Also, in texturecache.cfg any line that begins with "#" is a comment and will be ignored - you need to remove the comment (hash) if the setting is to be used, so your texturecache.cfg should look like:
Code:
webserver.port = 80
to configure texturecache.py to connect to port 80 of the webserver on localhost (the script will try and use sensible defaults so you don't need extra settings at all in most cases).

(2015-07-09, 03:21)marhutchy Wrote: Also what's the difference between c and C?

"c" will only cache artwork that isn't already in the cache.

"C" will not only cache items that are missing from the cache, it will also re-cache existing items (ie. delete them from the cache, then cache them again) - this is useful if you have updated original artwork and now want the cache to updated with the new artwork.

You can use "nc" to see which items need to be cached.
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-07-09, 03:28)Milhouse Wrote: Port 9090 is the RPC port, not the web server port.

Kodi is probably configured with the webserver on port 80, so either change the webserver port to 8080 in Kodi, or configure texturecache.py to use "webserver.port = 80".

You can only change the RPC port by adding a setting to advancedsettings.xml, and best to leave this as 9090.

Also, in texturecache.cfg any line that begins with "#" is a comment and will be ignored - you need to remove the comment (hash) if the setting is to be used, so your texturecache.cfg should look like:
Code:
webserver.port = 80
to configure texturecache.py to connect to port 80 of the webserver on localhost (the script will try and use sensible defaults so you don't need extra settings at all in most cases).

(2015-07-09, 03:21)marhutchy Wrote: Also what's the difference between c and C?

"c" will only cache artwork that isn't already in the cache.

"C" will not only cache items that are missing from the cache, it will also re-cache existing items (ie. delete them from the cache, then cache them again) - this is useful if you have updated original artwork and now want the cache to updated with the new artwork.

You can use "nc" to see which items need to be cached.

It's working now. Thanks Smile

It was the hash/comment.
That puzzled me because I know the hash could mean a comment, but in this case there were double hashes above the single hashes.
Yes, now that I read the top again, it did state that I should remove the hash to make a property active - silly me.

Thanks for the info.
Laptop: Dell Inspiron i7559-2512BLK | Windows 10 Pro x64 | Intel Core i7 6700HQ (2.60 GHz) | 1 TB + 8 GB SSHD
Kodi 18.3
MiniPC: LibreELEC 8.2.1
Sharing Media: SMB (HDD: 2 TB, 1 TB) | Media Manager/Organizer - Media Companion
Reply
Asking my question here as advised in 231599 (thread) . Maybe because this utility can offer similar type of solution as I am looking.

So i have been running XBMC for 4+ years now and have quite a sizeable collection of movies. The movies are actually stored on a separete server with (X,Y,Z) three shared windows paths. These windows shares are mapped as local drives on the Kodi PC . The local drives are added to the Kodi media sources to scrape and scan any new addition.

It happened a while ago that my physical hard disks got corrupted and during the fixing I lost numerous movies. The movie entry is still there in Kodi movie library database , but the actual movies file from the harddisk may be deleted or misplaced.

So if I run the "clean database" function from within Kodi. it would match each movie library database entry with the presence of the movie file on the movie sources path, and if it does not find the movie file, it would delete the entry from the database, hence I would not know which movie files were the ones I lost.

Hence I need to know is there is plugin or procedure, via which I can know which movie entries are in the movie library database, but dont have the actual movie file lying on the hard disk storage, this way I would be able to retrieve all such missing and deleted movie and complete my collection.

There is a plugin called Missing Movie Scanner, but it does the reverse of what I want to achieve. it scans the movie storage paths and checks if there is any movie file which is not added to the kodi video library database.

Need some expert help.

Would appreciate your guidance.

Thanks.
Reply
(2015-07-09, 14:38)HyperEscape Wrote: Hence I need to know is there is plugin or procedure, via which I can know which movie entries are in the movie library database, but dont have the actual movie file lying on the hard disk storage, this way I would be able to retrieve all such missing and deleted movie and complete my collection.

Code:
./texturecache.py @qaperiod=9999 @qafile=yes @qa.art.movies= qa movies
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-07-09, 14:46)Milhouse Wrote:
(2015-07-09, 14:38)HyperEscape Wrote: Hence I need to know is there is plugin or procedure, via which I can know which movie entries are in the movie library database, but dont have the actual movie file lying on the hard disk storage, this way I would be able to retrieve all such missing and deleted movie and complete my collection.

Code:
./texturecache.py @qaperiod=9999 @qafile=yes @qa.art.movies= qa movies

Thanks a lot. But sorry for being the rookie I am. How do I run the above command.

A guide to install the necessary software required and steps would be appreciated.
Reply
(2015-07-09, 16:55)HyperEscape Wrote: Thanks a lot. But sorry for being the rookie I am. How do I run the above command.

A guide to install the necessary software required and steps would be appreciated.

See the "Installation Instructions" in the first post.

The command I gave will work as-is on Linux, but on Windows you may need to install Python, then prefix the command with the location of your Python interpreter (or add the location to your system variables) - see this post for details.
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
Using XBian on RPi2 and receiving the following error:

Code:
2015-07-09 15:56:53.185271:MainThread: Command line args: ['texturecache.py', 'j', 'Big Hero 6']
2015-07-09 15:56:53.185986:MainThread: Current version #: v2.0.4
2015-07-09 15:56:53.186472:MainThread: Current platform : linux2
2015-07-09 15:56:53.187235:MainThread: Python  version #: v2.7.3.0 (final)
2015-07-09 15:56:53.191913:MainThread: RPC connection established with IPv4
2015-07-09 15:56:53.192914:MainThread: libVersion.JSON SOCKET REQUEST: [{"jsonrpc": "2.0", "method": "JSONRPC.Version", "id": "libVersion"}]
2015-07-09 15:56:53.193988:MainThread: libVersion.BUFFER RECEIVED (len 5)
2015-07-09 15:56:54.196127:MainThread: ERROR: Socket closed prematurely - exiting

I have verified that my rpc port is correct and tried reading through the 102 pages of this forum but unable to find an answer... Please Advise...
Reply
(2015-07-09, 18:21)Milhouse Wrote:
(2015-07-09, 16:55)HyperEscape Wrote: Thanks a lot. But sorry for being the rookie I am. How do I run the above command.

A guide to install the necessary software required and steps would be appreciated.

See the "Installation Instructions" in the first post.

The command I gave will work as-is on Linux, but on Windows you may need to install Python, then prefix the command with the location of your Python interpreter (or add the location to your system variables) - see this post for details.

Ok,

So what will this command give me in the output and how to interpret it.

Will it give a scrolling list of all movies files in the database but actual files missing from the HDD location (either file or the folder).

Can I save the output of this command to a text file for later reference.

Thanks.
Reply
(2015-07-09, 22:59)jurmb8435 Wrote: I have verified that my rpc port is correct and tried reading through the 102 pages of this forum but unable to find an answer... Please Advise...

Can you try downloading this slightly modified version and upload a new log.
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-07-09, 23:05)HyperEscape Wrote: Will it give a scrolling list of all movies files in the database but actual files missing from the HDD location (either file or the folder).

Yes, that's what you asked for although it's only checking the existence of the file.

(2015-07-09, 23:05)HyperEscape Wrote: Can I save the output of this command to a text file for later reference.

Of course, redirect the output into a file using the "command > file.txt" notation - this will write the output from "command" into "file.txt".
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:Can you try downloading this slightly modified version and upload a new log.

Did so... it died in the same spot but without the "ERROR: Socket closed prematurely - exiting" line... however I did get the following in the window...

Code:
[email protected] /home/xbian # ./texturecache.py j "Big Hero 6"
FATAL: The task you wish to perform requires that the JSON-RPC server is
       enabled and running on the XBMC system you wish to connect.

       In addtion, ensure that the following options are ENABLED on the
       XBMC client in Settings -> Services -> Remote control:

            Allow programs on this system to control XBMC
            Allow programs on other systems to control XBMC

       A connection cannot be established to the following JSON-RPC server:
       localhost:9999

       Check settings in properties file texturecache.cfg
[email protected] /home/xbian #

I have the following in my advancedsettings.xml:

Code:
<jsonrpc>
    <compactoutput>false</compactoutput>
    <tcpport>9999</tcpport>
  </jsonrpc>

and the following in my texturecache.cfg

Code:
rpc.port = 9999

Here is the output from netstat -nap | grep 9999:

Code:
netstat: /proc/net/tcp6: No such file or directory
tcp        0      0 127.0.0.1:9999          0.0.0.0:*               LISTEN      257/splash-daemon
netstat: /proc/net/udp6: No such file or directory
netstat: /proc/net/raw6: No such file or directory

Thank you very much for looking into this...
Reply
I have no idea what splash-daemon is, it doesn't look like a Kodi process.

I suggest you remove your advancedsettings.xml entries and leave the RPC server on it's default port 9090. Also, remove the rpc.port setting from texturecache.cfg. Make sure you have enabled the two options in Kodi Settings as explained by the console message.

At the moment it looks like your Kodi RPC server is dead, or dying whenever a connection is established, or isn't actually the Kodi RPC server at all but some unrelated process/service.

If you connect with telnet to localhost 9090 and paste the following:
Code:
{"jsonrpc": "2.0", "method": "JSONRPC.Version", "id": "libVersion"}
then you should get a reponse similar to the following from the Kodi RPC server:
Code:
{"id":"libVersion","jsonrpc":"2.0","result":{"version":{"major":6,"minor":25,"patch":1}}}
If you receive a different response, you're not communicating with the Kodi RPC server.
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
Here is the weird part... wasn't working before and so (based on earlier messages in this thread) I changed the port to test... Didn't work there and you had me change it back to default... Works like a charm now... LOL... go figure...

Thank you for your help... Great Utility!!!
Reply
  •   
  • 1
  • 100
  • 101
  • 102(current)
  • 103
  • 104
  • 179
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



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