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
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 180
  •   
[RELEASE] Texture Cache Maintenance utility
#91
i was fooling arround with this utility,
and tried the command qa and qax
when doing qa movies i got 2 movies where there where missing mpaa rating.
so i tried a qax movies.
after that 2 more movies where added to the database.
it created from 1 the movies that uses blu-ray folder structure
16:13:37 T:6088 ERROR: InputStream: Error opening, smb://192.168.2.200/Movies/The Wiz (1978)/BDMV/MovieObject.bdmv
16:13:37 T:4876 ERROR: InputStream: Error opening, smb://192.168.2.200/Movies/The Wiz (1978)/BDMV/BACKUP/index.bdmv
as 2 seperate movies.
LibreElec Kodi | Aeon MQ ?
Reply
#92
Was "The Wiz" one of the two movies that had missing mpaa?

Could you add "extrajson.movies = file" to your properties file, then run
Code:
./texturecache.py Jd movies "The Wiz"
and paste the output. Also, can you run the same for any other BDMV movie you may have.

I'm guessing that the JSON rescan directory method may need to start at the parent level for BDMVs (and maybe VOBs too).
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
#93
yes the Wizz was 1 of the 2 with the missing mpaa
the other 1 was Hackers

Code:
PS C:\Users\TRaSH> python .\texturecache.py Jd movies "The Wiz"
[
  {
    "movieid": 291,
    "title": "The Wiz",
    "art": {
      "fanart": "image://http://slurm.trakt.us/images/fanart_movies/10817.jpg/",
      "poster": "image://http://slurm.trakt.us/images/posters_movies/10817.jpg/"
    },
    "file": "smb://192.168.2.200/Movies/The Wiz (1978)/BDMV/index.bdmv",
    "label": "The Wiz"
  }
]
PS C:\Users\TRaSH>

Code:
PS C:\Users\TRaSH> python .\texturecache.py Jd movies "Life of PI"
[
  {
    "movieid": 247,
    "title": "Life of Pi",
    "art": {
      "fanart": "image://http://trakt.us/images/fanart_movies/202137.2.jpg/",
      "poster": "image://http://trakt.us/images/posters_movies/202137.2.jpg/"
    },
    "file": "smb://192.168.2.200/Movies/Life of Pi (2012)/BDMV/index.bdmv",
    "label": "Life of Pi"
  }
]
PS C:\Users\TRaSH>

Code:
PS C:\Users\TRaSH> python .\texturecache.py Jd movies "Hackers"
[
  {
    "movieid": 290,
    "title": "Hackers",
    "art": {
      "fanart": "image://smb://192.168.2.200/Movies/Hackers (1995)/Hackers (1995)-fanart.jpg/",
      "poster": "image://smb://192.168.2.200/Movies/Hackers (1995)/Hackers (1995)-poster.jpg/"
    },
    "file": "smb://192.168.2.200/Movies/Hackers (1995)/Hackers (1995).mkv",
    "label": "Hackers"
  }
]
PS C:\Users\TRaSH>
LibreElec Kodi | Aeon MQ ?
Reply
#94
(2013-04-07, 18:02)TRaSH Wrote: yes the Wizz was 1 of the 2 with the missing mpaa
the other 1 was Hackers

Could you try the new version I just uploaded (v.0.4.3 - run "texturecache.py update"), I've added a check for BDMV and VIDEO_TS so that the parent folder will be scanned instead. Let me know if that helps.

Other additions in v0.4.3: qa re-factor with addition of extensible rules, workaround for root directory rescan bug.

See changelog for full 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
#95
Code:
PS C:\Users\TRaSH> python .\texturecache.py qa movies
Movie [Hackers                                           ]: Missing mpaa
Movie [The Wiz                                           ]: Missing mpaa

       Loading: 00:00:00.03
       Parsing: 00:00:00.00
TOTAL RUNTIME: 00:00:00.04
PS C:\Users\TRaSH> python .\texturecache.py qax movies
Movie [Hackers                                           ]: Missing mpaa
Movie [The Wiz                                           ]: Missing mpaa

Rescanning directory: smb://192.168.2.200/Movies/Hackers (1995)...
Traceback (most recent call last):
  File ".\texturecache.py", line 2396, in <module>
    main(sys.argv[1:])
  File ".\texturecache.py", line 2359, in main
    jsonQuery("qa", argv[1], rescan=True)
  File ".\texturecache.py", line 1380, in jsonQuery
    qaData(mediatype, jcomms, database, data, title_name, id_name, rescan)
  File ".\texturecache.py", line 1724, in qaData
    jcomms.rescanDirectories(workItems)
  File ".\texturecache.py", line 825, in rescanDirectories
    self.sendJSON(REQUEST, "libRescan", callback=self.jsonWaitForScanFinished, checkResult=False)
  File ".\texturecache.py", line 727, in sendJSON
    raise socket.error("Socket IO timeout exceeded")
socket.error: Socket IO timeout exceeded
PS C:\Users\TRaSH>
LibreElec Kodi | Aeon MQ ?
Reply
#96
You'll need to manually re-scan (Update library in GUI) as its now removed Hackers from the library.

Do you get a timeout if you try qax a second time? ie. is this timeout consistently reproducible?

Maybe rescanning a BDMV takes a substantially longer time than a non-BDMV (don't have any here to confirm). If you want to increase the timeout, you can edit line 677 and change timeout=2 to timeout=n where n is some value larger than 2, ie. 10, and see if that works. Maybe I need to add a more conservative timeout value.

If you increase the timeout to 30 seconds, enable the logfile (add "logfile=c:\tc.log" to properties) and perform a qax of your BDMV content, then upload the logfile to pastebin I might get a better idea of how long a BDMV rescan takes. Many thanks.
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
#97
weird somehow it times out now with the same error.
here's the error log

did a second test but i removed the folder where i had the movie hackers in it,
did a update/clean.


error log
Code:
PS C:\Users\TRaSH> python .\texturecache.py qa movies
Movie [The Wiz                                           ]: Missing mpaa

       Loading: 00:00:00.03
       Parsing: 00:00:00.00
TOTAL RUNTIME: 00:00:00.04
PS C:\Users\TRaSH> python .\texturecache.py qax movies
Movie [The Wiz                                           ]: Missing mpaa

Rescanning directory: smb://192.168.2.200/Movies/The Wiz (1978)...
Traceback (most recent call last):
  File ".\texturecache.py", line 2396, in <module>
    main(sys.argv[1:])
  File ".\texturecache.py", line 2359, in main
    jsonQuery("qa", argv[1], rescan=True)
  File ".\texturecache.py", line 1380, in jsonQuery
    qaData(mediatype, jcomms, database, data, title_name, id_name, rescan)
  File ".\texturecache.py", line 1724, in qaData
    jcomms.rescanDirectories(workItems)
  File ".\texturecache.py", line 825, in rescanDirectories
    self.sendJSON(REQUEST, "libRescan", callback=self.jsonWaitForScanFinished, checkResult=False)
  File ".\texturecache.py", line 727, in sendJSON
    raise socket.error("Socket IO timeout exceeded")
socket.error: Socket IO timeout exceeded
PS C:\Users\TRaSH>
LibreElec Kodi | Aeon MQ ?
Reply
#98
Many thanks for the log. Can you describe what is happening in the GUI when the rescan has started - do you see it finding your BDMV movie? The utility is timing out waiting for an update notification to be received from XBMC, which for some reason is never arriving (or at least, not completely). Perhaps enabling debugging in XBMC and uploading the debug log might shed more light on what is going on in XBMC...

If you don't mind a bit more fiddling, could you add the two self.logger.log lines at line 712 so that it looks as follows:
Code:
...
      except socket.error:
        self.logger.log("BUFFER1: %s" % newdata)
        self.logger.log("BUFFER2: %s" % "".join(data))
        if newdata[-1:] == "}" or newdata[-2:] == "}\n":
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
#99
hmm getting another error
Code:
PS C:\Users\TRaSH> python .\texturecache.py qa movies
Traceback (most recent call last):
  File ".\texturecache.py", line 2398, in <module>
    main(sys.argv[1:])
  File ".\texturecache.py", line 2356, in main
    jsonQuery("qa", argv[1])
  File ".\texturecache.py", line 1346, in jsonQuery
    (section_name, title_name, id_name, data) = jcomms.getData(action, mediatype, filter, extraFields)
  File ".\texturecache.py", line 1035, in getData
    return (SECTION, TITLE, IDENTIFIER, self.sendJSON(REQUEST, "lib%s" % mediatype.capitalize()))
  File ".\texturecache.py", line 712, in sendJSON
    self.logger.log("BUFFER1: %s" % newdata)
  File ".\texturecache.py", line 380, in log
    self.LOGFILE.write("%s:%-10s: %s\n" % (datetime.datetime.now(), t, data.encode("utf-8")))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1053: ordinal not in range(128)
LibreElec Kodi | Aeon MQ ?
Reply
Gah, I hate unicode... Smile

Can you try updating to v0.4.4, I've added some extra logging and hopefully unicode friendly logging...
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 for your work!

Can you please add dds-file support to the script? All dds are now identified as orphaned!

http://wiki.xbmc.org/index.php?title=Thu...DS_artwork
Reply
Ah yes, of course. I don't have any DDS files on my Pi anymore (disabled by default long ago).

Could you do me a quick favour and produce a small database extract of some of your jpg/dds files, for example "./texturecache.py s "somemoviename"" and paste the results here so I know what filenames are being used (both original and then dds equivalent). I'm assuming the DDS files use the same hash as the cached image, but with lowercase ".dds" extension instead of ",jpg". The database will confirm this. Thanks.

I can get this up in the next few hours, but was holding back on the next release until I had some feedback on this timeout issue although maybe I'll just move on and see if it crops up again in future.

Edit: Ignore the request, I've managed to create some dds files on my system so can now reproduce...
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
v0.4.5 updated

* Added DDS suppoort for r, R, p and P options.

* Added logfile.verbose to control amount of information written to logfile. Default no. Significant amounts of data will be output when enabled.

* Added singlethread.urls property, to force download of content on a single thread. Use this for sites that appear to disallow multiple requests from the same address - fanart.tv seems to do this for me (clearart/clearlogos etc.).

eg. singlethread.urls = assets.fanart.tv, some.othersite.com

would result in all content requests for files matching any of the above patterns to be performed sequentially on a single thread. This thread will be in addition to any other threads.

* Added ascan [path], vscan [path], aclean, vclean, directory path and sources [media] options. Update, clean and interrogate a remote media library from the command line.
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
Any chances of adding CD art images to music albums cache preload?
AFAIK these images (cdart.png) are downloaded by CDArt Manager AddOn straight to the folder where the audio files of the music album are, and then they are cached from there by the skins that support that feature, but the images links are never loaded into the music DB.
Reply
(2013-04-09, 03:21)charrua Wrote: Any chances of adding CD art images to music albums cache preload?
AFAIK these images (cdart.png) are downloaded by CDArt Manager AddOn straight to the folder where the audio files of the music album are, and then they are cached from there by the skins that support that feature, but the images links are never loaded into the music DB.

Are these artwork types supported by JSON, as the JSON API only describes fanart and thumbnail as valid artwork for Albums.

What happens if you add the cdart type (whatever type that is) to "extrajson.albums" and run "Jd albums <albumname>" where albumname is an album with cdart - do you get a valid response, or an error (invalid parameter)?
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
  •   
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 180
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



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