kodi-community-addons / script.module.thetvdb Goto Github PK
View Code? Open in Web Editor NEWKodi python module to access the new thetvdb api v2
License: Apache License 2.0
Kodi python module to access the new thetvdb api v2
License: Apache License 2.0
21:48:09.578 T:123145405247488 ERROR: script.module.thetvdb --> Exception in get_data --> ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='api.thetvdb.com', port=443): Read timed out. (read timeout=20)",),)
21:48:38.865 T:123145400418304 NOTICE: Skin Helper Widgets --> Backgroundservice stopped
21:48:42.705 T:123145403637760 WARNING: DARWINOSX: underflow (0 vs 4096 bytes)
21:48:50.263 T:123145405247488 ERROR: script.module.thetvdb --> Exception in get_data --> ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='api.thetvdb.com', port=443): Read timed out. (read timeout=20)",),)
21:48:54.834 T:123145391218688 ERROR: CCurlFile::Stat - Failed: Timeout was reached(28) for http://thetvdb.com/banners/episodes/305719/5603948.jpg
21:49:54.639 T:123145405247488 ERROR: script.module.thetvdb --> Exception in get_data --> ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='api.thetvdb.com', port=443): Read timed out. (read timeout=20)",),)
When Swiching the Language in Kodi the Addon still get the Old Content, its because the Variable
KODI_LANGUAGE isn't used on simplecache hash
It Would be Great to be able to set the Language.
Im writing an Plugin where you can "Sugest an good Serie" the Serie Suggestion is Posted in a Forum
The Forum is a German Forum, it would be great to have German Description independent what Language he is using in Kodi
Like :
search_series(query="", prefer_localized="de")
I've getting this error frequently (but not always) from script.module.thetvdb when updating PVR artwork in script.module.metadatautils. An example from the kodi log (looking up TV Show Cold River Cash):
2022-07-29 10:04:50.804 T:1792 INFO : script.module.metadatautils --> pvrart lookup for title: cold river cash - TVDB result: 276670
2022-07-29 10:04:50.943 T:1792 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'TypeError'>
Error Contents: string indices must be integers
Traceback (most recent call last):
File "C:\Users\mickr\AppData\Roaming\Kodi\addons\script.skin.helper.service\resources\lib\context_pvr.py", line 28, in
metadatautils.pvr_artwork_options(title, channel, genre)
File "C:\Users\mickr\AppData\Roaming\Kodi\addons\script.module.metadatautils\lib\metadatautils.py", line 152, in pvr_artwork_options
return self.pvrart.pvr_artwork_options(title, channel, genre)
File "C:\Users\mickr\AppData\Roaming\Kodi\addons\script.module.metadatautils\lib\helpers\pvrartwork.py", line 267, in pvr_artwork_options
self.get_pvr_artwork(title=title, channel=channel, genre=genre, ignore_cache=True, manual_select=True)
File "C:\Users\mickr\AppData\Roaming\Kodi\addons\script.module.metadatautils\lib\helpers\pvrartwork.py", line 153, in get_pvr_artwork
details = extend_dict(details, self._mutils.thetvdb.get_series(tvdb_match))
File "C:\Users\mickr\AppData\Roaming\Kodi\addons\script.module.simplecache\lib\simplecache.py", line 304, in decorated
result = func(*args, **kwargs)
File "C:\Users\mickr\AppData\Roaming\Kodi\addons\script.module.thetvdb\lib\thetvdb.py", line 165, in get_series
return self._map_series_data(seriesinfo)
File "C:\Users\mickr\AppData\Roaming\Kodi\addons\script.module.thetvdb\lib\thetvdb.py", line 555, in _map_series_data
result["cast.%s.tvdbname" % count] = item["name"]
TypeError: string indices must be integers
-->End of Python script error report<--
2022-07-29 10:04:51.173 T:1792 INFO : script.module.thetvdb --> Exited
2022-07-29 10:04:51.173 T:1792 INFO : script.module.metadatautils --> Exited
Because I'm primarily interested in the artwork, I have created a workaround for error by commenting out the following lines 552-557 in lib\thetvdb.py:
#if cast:
#for count, item in enumerate(cast):
#if count < 4:
#result["cast.%s.tvdbname" % count] = item["name"]
#result["cast.%s.tvdbrole" % count] = item["role"]
#result["cast.%s.tvdbthumb" % count] = "https://artworks.thetvdb.com/banners/%s" % item["image"]
Started seeing the following error using Kodi 18/Leia nightly builds on Win64:
22:34:40.957 T:12236 DEBUG: script.tv.show.next.aired --> Traceback (most recent call last):
File "C:\Users\Mario\AppData\Roaming\Kodi\addons\script.tv.show.next.aired\resources\lib\main_module.py", line 36, in __init__
getattr(self, action)(action_param)
File "C:\Users\Mario\AppData\Roaming\Kodi\addons\script.tv.show.next.aired\resources\lib\main_module.py", line 285, in main
eps_list = self.get_nextaired_listing(include_last_episode=want_yesterday)
File "C:\Users\Mario\AppData\Roaming\Kodi\addons\script.tv.show.next.aired\resources\lib\main_module.py", line 303, in get_nextaired_listing
single_episode_per_show=False, include_last_episode=include_last_episode)
File "C:\Users\Mario\AppData\Roaming\Kodi\addons\script.module.thetvdb\lib\thetvdb.py", line 450, in get_kodi_unaired_episodes
episodes.append(self.get_last_episode_for_series(serieid))
File "C:\Users\Mario\AppData\Roaming\Kodi\addons\script.module.simplecache\lib\simplecache.py", line 284, in decorated
result = func(*args, **kwargs)
File "C:\Users\Mario\AppData\Roaming\Kodi\addons\script.module.thetvdb\lib\thetvdb.py", line 250, in get_last_episode_for_series
return self.get_episode(highest_eps[1])
File "C:\Users\Mario\AppData\Roaming\Kodi\addons\script.module.simplecache\lib\simplecache.py", line 284, in decorated
result = func(*args, **kwargs)
File "C:\Users\Mario\AppData\Roaming\Kodi\addons\script.module.thetvdb\lib\thetvdb.py", line 154, in get_episode
episode = self._map_episode_data(episode, seriesdetails)
File "C:\Users\Mario\AppData\Roaming\Kodi\addons\script.module.thetvdb\lib\thetvdb.py", line 479, in _map_episode_data
result["airdate"] = self._get_local_date(episode_details["firstAired"])
File "C:\Users\Mario\AppData\Roaming\Kodi\addons\script.module.thetvdb\lib\thetvdb.py", line 744, in _get_local_date
_log_msg("Exception in _get_local_date: %s" % exc)
NameError: global name '_log_msg' is not defined
22:34:40.957 T:12236 WARNING: script.tv.show.next.aired --> Exception in resources.lib.main_module ! --> global name '_log_msg' is not defined
22:34:40.957 T:12236 DEBUG: script.tv.show.next.aired --> MainModule exited
22:34:40.958 T:12236 DEBUG: Skin Helper Simplecache --> Closed
22:34:40.958 T:12236 DEBUG: script.module.thetvdb --> Exited
22:34:40.961 T:12236 INFO: CPythonInvoker(74, C:\Users\Mario\AppData\Roaming\Kodi\addons\script.tv.show.next.aired\default.py): script successfully run
22:34:40.974 T:12236 INFO: Python script stopped
22:34:40.974 T:12236 DEBUG: Thread LanguageInvoker 12236 terminating
Now I am by NO means a python coder - but I was able to get things "working" again with the following (bad I am sure) hack...
Changed line 744 of script.module.thetvdb\lib\thetvdb.py
from
_log_msg("Exception in _get_local_date: %s" % exc)
to
return datestr
obviously I am sure that this doesn't fix anything just skips logging an error and avoiding whatever was throwing the exception when trying to log the well exception :-)
Searching Series with other Language Name doens't work with Kodi=English
title="Alles was zählt"
tvdb.search_series(title,prefer_localized=True)
Setting the Interface too German does work. I think similiar Problem would exist between other languages
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.