•   
  • 1
  • 79
  • 80
  • 81(current)
  • 82
  • 83
  • 179
  •   
[RELEASE] Texture Cache Maintenance utility
Hi. scott967 suggested I pay you a visit. 211187 (thread)

Deleted all my moviename-trailer.mov from individual local folders where they used to live alongside each title.
Using Helix nightly, pressing trailer no longer does anything.
If I remove moviename-trailer.mov from <trailer>moviename-trailer.mov</trailer> in the .nfo, everything works perfect with no need to do anything else.

Can this utility automate this for me? There are thousands of .nfo's spanning multiple drives.
If it can, I'll be using a CMD prompt with admin rights in Windows and I'd need to know exactly what to copy and paste into the prompt if possible.
texturecache.py is in the root of C:

Thanks for any help you can provide.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players
W10/1903 MPC-BE\HC PDVD19 DVDFab3&5 KODI 19 PotPlayer 960-4GB/RGB 4:4:4/Desktop=60Hz/Video=Matched Refresh rates 8bit/65JS8500 UHD HDR 3D
Reply
Unfortunately it's not possible to remove the trailer property using JSON. To remove a property you would normally set a blank value, which works for the artwork fields, but isn't working for trailer - the blank value is simply ignored.

So I don't think this script can help you, as JSON doesn't currently support the feature you require.

However should you want to backup your watched status before wiping your library, this script can do that for you (eg. "texturecache.py watched movies backup movies.dat"). Then restore with "texturecache.py watched movies restore movies.dat". Also works for tvshows.
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
Sorry, I have limited skills. Is this what to enter in the CMD?

C:\Python34\python.exe C:\texturecache.py watched movies backup movies.dat (copy and paste into CMD)
Then I will remove the sources, delete all the nfo's, re-add the sources and scan them in.

At this point, do I need to export this library so that nfo's are created again?

And to retain the watched status:
C:\Python34\python.exe C:\texturecache.py watched movies restore movies.dat (copy and paste into CMD)

1 last thing. Can 'Date Added' be retained also?

Thanks for you help. Much appreciated.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players
W10/1903 MPC-BE\HC PDVD19 DVDFab3&5 KODI 19 PotPlayer 960-4GB/RGB 4:4:4/Desktop=60Hz/Video=Matched Refresh rates 8bit/65JS8500 UHD HDR 3D
Reply
(2014-12-13, 02:23)brazen1 Wrote: C:\Python34\python.exe C:\texturecache.py watched movies backup movies.dat (copy and paste into CMD)

Yes, that should work (see previous post about running/installing in Windows if you have a problem).

Substitute "tvshows" for "movies" if you also want to backup your tvshows, ie.:

Code:
C:\Python34\python.exe C:\texturecache.py watched tvshows backup tvshows.dat

(2014-12-13, 02:23)brazen1 Wrote: Then I will remove the sources, delete all the nfo's, re-add the sources and scan them in.

At this point, do I need to export this library so that nfo's are created again?

You don't need to, but you can export them again if you want to.

(2014-12-13, 02:23)brazen1 Wrote: And to retain the watched status:
C:\Python34\python.exe C:\texturecache.py watched movies restore movies.dat (copy and paste into CMD)

Yep.

(2014-12-13, 02:23)brazen1 Wrote: 1 last thing. Can 'Date Added' be retained also?

"Date Added" is the file modification date of the movie (and not the date it is added into your library) so this shouldn't change after you're reloaded the library.
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
Thank you. Worked out great!
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players
W10/1903 MPC-BE\HC PDVD19 DVDFab3&5 KODI 19 PotPlayer 960-4GB/RGB 4:4:4/Desktop=60Hz/Video=Matched Refresh rates 8bit/65JS8500 UHD HDR 3D
Reply
Quote:Specify a filename for the logfile property, to log detailed processing information. Prefix the filename with + to force flushing.

Flushing for the logfile isn't working for me.

A new file is created every time, regardless if i set

Code:
logfile = cache.log

or

Code:
logfile = +cache.log
Reply
The log will always overwrite any existing file, that's by design. Flushing just prevents the OS from buffering output. If you want separate files for each run, you can specify @logfile.unique=yes which will append a random number to the log file name, or of course specify your own unique filename for each run with @logfile=. There is no support for appending to an existing log file.
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 someone has reported to me privately that debugon is reporting an error on Gotham ("Invalid params" with an id of "libSetSetting"). They left (IRC) before I could ask for a log file, but they said debug logging was correctly enabled.
Comparing Gotham and Helix code I see that debug.extralogging only exists on Helix (https://github.com/xbmc/xbmc/pull/4711/files#diff-48) and I guess that's what is causing this error.

The same applies to debugoff.
Reply
(2014-12-17, 02:43)menakite Wrote: @Milhouse someone has reported to me privately that debugon is reporting an error on Gotham ("Invalid params" with an id of "libSetSetting"). They left (IRC) before I could ask for a log file, but they said debug logging was correctly enabled.
Comparing Gotham and Helix code I see that debug.extralogging only exists on Helix (https://github.com/xbmc/xbmc/pull/4711/files#diff-48) and I guess that's what is causing this error.

The same applies to debugoff.

Many thanks - I've just pushed v1.8.5 which makes the setting of debug.extralogging conditional on JSON version 6.15.3 or later, and should stop the errors.
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
(2014-12-17, 02:23)Milhouse Wrote: The log will always overwrite any existing file, that's by design. Flushing just prevents the OS from buffering output. If you want separate files for each run, you can specify @logfile.unique=yes which will append a random number to the log file name, or of course specify your own unique filename for each run with @logfile=. There is no support for appending to an existing log file.

Thank you for the clarification.

Another thing: I have a few problem with season posters. Sometimes i'm adding them later in my local tv show folder, so they are not shown in my library (especially for new seasons).

I thought by adding "qa.art.tvshows.season = poster" in my cfg file i could initiate a rescan, but with qa/qax i only get a warning (WARN (missing poster)) instead of a FAIL. What am i missing here?
Reply
(2014-12-18, 15:21)theowiesengrund Wrote:
(2014-12-17, 02:23)Milhouse Wrote: The log will always overwrite any existing file, that's by design. Flushing just prevents the OS from buffering output. If you want separate files for each run, you can specify @logfile.unique=yes which will append a random number to the log file name, or of course specify your own unique filename for each run with @logfile=. There is no support for appending to an existing log file.

Thank you for the clarification.

Another thing: I have a few problem with season posters. Sometimes i'm adding them later in my local tv show folder, so they are not shown in my library (especially for new seasons).

I thought by adding "qa.art.tvshows.season = poster" in my cfg file i could initiate a rescan, but with qa/qax i only get a warning (WARN (missing poster)) instead of a FAIL. What am i missing here?

The qax option works by removing items and then rescanning them back in, which should pick up new artwork and metadata. However in the case of seasons artwork it would be unreasonable to delete the entire season (and episodes) just to reload and fix a poster.

You can however use mklocal.py which will load any missing posters that you have locally - add the "--season" option so that mklocal.py processes your season poster/fanart artwork.

For example, the following will load 6 artwork types for the main tv show, plus the two default artwork types for seasons.
Code:
texturecache.py jd tvshows @query.episodes=no > /tmp/tvseasons.dat
cat /tmp/tvseasons.dat | mklocal.py --local /freenas/media --prefix nfs://192.168.0.3/mnt/share/media --artwork fanart poster clearlogo clearart banner landscape --season --output /tmp/tvchanges.dat
cat /tmp/tvchanges.dat | texturecache.py set

I run the above after adding a new episode and it loads season posters for new seasons that Kodi fails to load.
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'm getting Kodi crashes in Windows when I try and cache movie artwork (works fine against XBMC with same texturecache version). It seems to happen randomly and I can't pinpoint a single piece of artwork causing the issue. What logs would be best to provide to help sort this out?
Reply
You can enable logging by adding @logfile=c:\tc.log to your command line, that will include detailed information up to the point of the crash (and beyond - stop the script once Kodi has crashed). Try running with @Download.threads=1 to simplify logged information, however the crash may be harder to reproduce with fewer threads.

Also enable debug logging in Kodi and after the failure, review both logs to see if there is a pattern.

Ultimately you should try to capture a backtrace of the failing process, though I'm not sure how you do this in Windows-land.
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! Can't reproduce with one thread. I was using 8. I'll try 2 and then 4 and see if I can reproduce.
Reply
Hi Milhouse

Have been running your script for months without problems. But since today I get an error when recaching artwork.
Log here below. If you have any clue about what's broken.

2014-12-26 00:16:29.932481:MainThread: Command line args: ['C:\\Xbmcsc~1\\script~1\\textur~1\\textur~1.py', 'C', '@logfile=c:\\tc.log', '@logfile.verbose=yes']
2014-12-26 00:16:29.933481:MainThread: Current version #: v1.8.5
2014-12-26 00:16:29.933481:MainThread: Current platform : win32
2014-12-26 00:16:29.933481:MainThread: Python version #: v3.4.2.0 (final)
2014-12-26 00:16:29.933481:MainThread: libPing.JSON WEB REQUEST: [{"jsonrpc": "2.0", "method": "JSONRPC.Ping", "id": "libPing"}]
2014-12-26 00:16:29.949482:MainThread: libPing.RECEIVED DATA: No such page
ERROR:root:** Terminating due to unexpected exception **
Traceback (most recent call last):
File "C:\Xbmcsc~1\script~1\textur~1\textur~1.py", line 7704, in <module>
main(sys.argv[1:])
File "C:\Xbmcsc~1\script~1\textur~1\textur~1.py", line 7413, in main
if not checkConfig(argv[0]): sys.exit(2)
File "C:\Xbmcsc~1\script~1\textur~1\textur~1.py", line 6994, in checkConfig
data = wcomms.sendJSON(REQUEST, "libPing", checkResult=False, useWebServer=True)
File "C:\Xbmcsc~1\script~1\textur~1\textur~1.py", line 1866, in sendJSON
return json.loads(data) if data != "" else ""
File "C:\Xbmc Scripts\Scripts Python\Python33\lib\json\__init__.py", line 318, in loads
return _default_decoder.decode(s)
File "C:\Xbmc Scripts\Scripts Python\Python33\lib\json\decoder.py", line 343, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Xbmc Scripts\Scripts Python\Python33\lib\json\decoder.py", line 361, in raw_decode
raise ValueError(errmsg("Expecting value", s, err.value)) from None
ValueError: Expecting value: line 1 column 1 (char 0)

Many thanks
Reply
  •   
  • 1
  • 79
  • 80
  • 81(current)
  • 82
  • 83
  • 179
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



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