mdhiggins / sickbeard_mp4_automator

Automatically convert video files to a standardized format with metadata tagging to create a beautiful and uniform media library
MIT License
1.52k stars 201 forks source link

Tagging doesn't seem to work with TVDB #1687

Closed morpheus2n2 closed 11 months ago

morpheus2n2 commented 11 months ago

For some reason when I try to tag a file, if it can not auto detect when I choose the option to look up on TVDB it never work I will always get a error "Error processing file D:\Downloads\To Convert\House S01E01 Pilot BluRay-1080p.mkv. Traceback (most recent call last): File "D:\Plexbackend\Converter\manual.py", line 352, in walkDir processFile(filepath, mp, info=info, relativePath=relative, silent=silent, tag=tag, tagOnly=tagOnly, optionsOnly=optionsOnly, tmdbid=tmdbid, tvdbid=tvdbid, imdbid=imdbid, processedList=processedList, processedArchive=processedArchive) File "D:\Plexbackend\Converter\manual.py", line 268, in processFile tagdata = getInfo(inputfile, mp.settings, silent=silent, tag=tag or tagOnly, tmdbid=tmdbid, tvdbid=tvdbid, imdbid=imdbid, season=season, episode=episode, language=language, original=original) File "D:\Plexbackend\Converter\manual.py", line 149, in getInfo return Metadata(MediaType.TV, tvdbid=tvdbid, season=season, episode=episode, language=language, logger=log, original=original) File "D:\Plexbackend\Converter\resources\metadata.py", line 107, in init self.externalids = seriesquery.external_ids(language=self.language) File "C:\Users\morph\AppData\Local\Programs\Python\Python39\lib\site-packages\tmdbsimple\tv.py", line 180, in external_ids response = self._GET(path, kwargs) File "C:\Users\morph\AppData\Local\Programs\Python\Python39\lib\site-packages\tmdbsimple\base.py", line 109, in _GET return self._request('GET', path, params=params) File "C:\Users\morph\AppData\Local\Programs\Python\Python39\lib\site-packages\tmdbsimple\base.py", line 104, in _request response.raise_for_status() File "C:\Users\morph\AppData\Roaming\Python\Python39\site-packages\requests\models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 504 Server Error: Gateway Time-out for url: https://api.themoviedb.org/3/tv/1408/external_ids?language=en&api_key=45e408d2851e968e6e4d0353ce621c66"

If I use TMDB this is hit and miss 80% of the time it works but a lot of the time it dosn't

mdhiggins commented 11 months ago

Difference between TVDB And TMDB is probably placebo since this script doesn't actually use TVDB at all, it just supports TVDB IDs through TMDB, all database requests are through TMDB, though it does take 1 extra API request to resolve TVDB ID to TMDB ID

Finally, this might be a problem on your end, the 504 is a time out error, you're failing to connect but the URL produced works fine

https://api.themoviedb.org/3/tv/1408/external_ids?language=en&api_key=45e408d2851e968e6e4d0353ce621c66

{
  "id": 1408,
  "imdb_id": "tt0412142",
  "freebase_mid": "/m/04p5cr",
  "freebase_id": null,
  "tvdb_id": 73255,
  "tvrage_id": 3908,
  "wikidata_id": "Q23558",
  "facebook_id": "House",
  "instagram_id": null,
  "twitter_id": "housetv"
}

Either way not a script problem, either API is timing out due to issues on TMDB's end or on your connections end

morpheus2n2 commented 11 months ago

Ahh ok that makes sense, I though it used both TVDB and TMDB, but cos it uses just TMDB it makes it easier for me to get the id's :D