Posts: 17,855
Joined: Jan 2011
Reputation:
1,056
Milhouse
Retired Team-Kodi Member
Posts: 17,855
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.
Posts: 2,546
Joined: Dec 2012
Reputation:
225
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.
Posts: 2,546
Joined: Dec 2012
Reputation:
225
Thank you. Worked out great!
Posts: 17,855
Joined: Jan 2011
Reputation:
1,056
Milhouse
Retired Team-Kodi Member
Posts: 17,855
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.
Posts: 117
Joined: Dec 2008
Reputation:
2
2014-12-22, 07:31
(This post was last modified: 2014-12-22, 07:31 by pgjensen.)
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?
Posts: 117
Joined: Dec 2008
Reputation:
2
Thanks! Can't reproduce with one thread. I was using 8. I'll try 2 and then 4 and see if I can reproduce.
Posts: 263
Joined: Nov 2008
Reputation:
1
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