Change meta providers to new TVInfoAPI get_show to make sure language is used.

This commit is contained in:
Prinz23 2023-03-08 22:42:05 +01:00 committed by JackDandy
parent 93af172f2e
commit 1955313edc
8 changed files with 19 additions and 13 deletions

View file

@ -1,4 +1,9 @@
### 3.27.11 (2023-03-06 23:40:00 UTC) ### 3.27.12 (2023-03-08 23:30:00 UTC)
* Change meta providers to new TVInfoAPI get_show to make sure language is used
### 3.27.11 (2023-03-06 23:40:00 UTC)
* Fix "Change File Date" not using timestamp of episode if available * Fix "Change File Date" not using timestamp of episode if available

View file

@ -521,7 +521,8 @@ class GenericMetadata(object):
t = sickgear.TVInfoAPI(TVINFO_TVDB).setup(**tvinfo_config) t = sickgear.TVInfoAPI(TVINFO_TVDB).setup(**tvinfo_config)
ep_info = t[cur_ep_obj.show_obj.prodid][cur_ep_obj.season][cur_ep_obj.episode] ep_info = t.get_show(cur_ep_obj.show_obj.prodid, language=show_lang)[
cur_ep_obj.season][cur_ep_obj.episode]
except (BaseTVinfoEpisodenotfound, BaseTVinfoSeasonnotfound, TypeError): except (BaseTVinfoEpisodenotfound, BaseTVinfoSeasonnotfound, TypeError):
ep_info = None ep_info = None
else: else:
@ -1095,7 +1096,7 @@ class GenericMetadata(object):
tvinfo_config['language'] = show_obj.lang tvinfo_config['language'] = show_obj.lang
t = sickgear.TVInfoAPI(show_obj.tvid).setup(**tvinfo_config) t = sickgear.TVInfoAPI(show_obj.tvid).setup(**tvinfo_config)
tvinfo_obj_show = t[show_obj.prodid] tvinfo_obj_show = t.get_show(show_obj.prodid, language=show_obj.lang)
except (BaseTVinfoError, IOError) as e: except (BaseTVinfoError, IOError) as e:
logger.log(u'Unable to look up show on ' + sickgear.TVInfoAPI( logger.log(u'Unable to look up show on ' + sickgear.TVInfoAPI(
show_obj.tvid).name + ', not downloading images: ' + ex(e), logger.WARNING) show_obj.tvid).name + ', not downloading images: ' + ex(e), logger.WARNING)

View file

@ -127,7 +127,7 @@ class KODIMetadata(generic.GenericMetadata):
tv_node = etree.Element('tvshow') tv_node = etree.Element('tvshow')
try: try:
show_info = t[int(show_ID)] show_info = t.get_show(show_obj.prodid, language=show_obj.lang)
except BaseTVinfoShownotfound as e: except BaseTVinfoShownotfound as e:
logger.log('Unable to find show with id %s on %s, skipping it' % (show_ID, sickgear.TVInfoAPI( logger.log('Unable to find show with id %s on %s, skipping it' % (show_ID, sickgear.TVInfoAPI(
show_obj.tvid).name), logger.ERROR) show_obj.tvid).name), logger.ERROR)
@ -290,7 +290,7 @@ class KODIMetadata(generic.GenericMetadata):
try: try:
t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config) t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config)
show_info = t[ep_obj.show_obj.prodid] show_info = t.get_show(ep_obj.show_obj.prodid, language=ep_obj.show_obj.lang)
except BaseTVinfoShownotfound as e: except BaseTVinfoShownotfound as e:
raise exceptions_helper.ShowNotFoundException(ex(e)) raise exceptions_helper.ShowNotFoundException(ex(e))
except BaseTVinfoError as e: except BaseTVinfoError as e:

View file

@ -125,7 +125,7 @@ class Mede8erMetadata(mediabrowser.MediaBrowserMetadata):
tv_node.attrib['isTV'] = 'true' tv_node.attrib['isTV'] = 'true'
try: try:
show_info = t[int(show_obj.prodid)] show_info = t.get_show(show_obj.prodid, language=show_obj.lang)
except BaseTVinfoShownotfound as e: except BaseTVinfoShownotfound as e:
logger.log(u'Unable to find show with id ' + str(show_obj.prodid) + ' on tvdb, skipping it', logger.ERROR) logger.log(u'Unable to find show with id ' + str(show_obj.prodid) + ' on tvdb, skipping it', logger.ERROR)
raise e raise e
@ -237,7 +237,7 @@ class Mede8erMetadata(mediabrowser.MediaBrowserMetadata):
tvinfo_config['dvdorder'] = True tvinfo_config['dvdorder'] = True
t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config) t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config)
show_info = t[ep_obj.show_obj.prodid] show_info = t.get_show(ep_obj.show_obj.prodid, language=ep_obj.show_obj.lang)
except BaseTVinfoShownotfound as e: except BaseTVinfoShownotfound as e:
raise exceptions_helper.ShowNotFoundException(ex(e)) raise exceptions_helper.ShowNotFoundException(ex(e))
except BaseTVinfoError as e: except BaseTVinfoError as e:

View file

@ -254,7 +254,7 @@ class MediaBrowserMetadata(generic.GenericMetadata):
tv_node = etree.Element("Series") tv_node = etree.Element("Series")
try: try:
show_info = t[int(show_obj.prodid)] show_info = t.get_show(show_obj.prodid, language=show_obj.lang)
except BaseTVinfoShownotfound as e: except BaseTVinfoShownotfound as e:
logger.log("Unable to find show with id %s on %s, skipping it" % logger.log("Unable to find show with id %s on %s, skipping it" %
(show_obj.prodid, sickgear.TVInfoAPI(show_obj.tvid).name), logger.ERROR) (show_obj.prodid, sickgear.TVInfoAPI(show_obj.tvid).name), logger.ERROR)
@ -415,7 +415,7 @@ class MediaBrowserMetadata(generic.GenericMetadata):
t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config) t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config)
show_info = t[ep_obj.show_obj.prodid] show_info = t.get_show(ep_obj.show_obj.prodid, language=ep_obj.show_obj.lang)
except BaseTVinfoShownotfound as e: except BaseTVinfoShownotfound as e:
raise exceptions_helper.ShowNotFoundException(ex(e)) raise exceptions_helper.ShowNotFoundException(ex(e))
except BaseTVinfoError as e: except BaseTVinfoError as e:

View file

@ -201,7 +201,7 @@ class TIVOMetadata(generic.GenericMetadata):
tvinfo_config['dvdorder'] = True tvinfo_config['dvdorder'] = True
t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config) t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config)
show_info = t[ep_obj.show_obj.prodid] show_info = t.get_show(ep_obj.show_obj.prodid, language=ep_obj.show_obj.lang)
except BaseTVinfoShownotfound as e: except BaseTVinfoShownotfound as e:
raise exceptions_helper.ShowNotFoundException(ex(e)) raise exceptions_helper.ShowNotFoundException(ex(e))
except BaseTVinfoError as e: except BaseTVinfoError as e:

View file

@ -203,7 +203,7 @@ class WDTVMetadata(generic.GenericMetadata):
tvinfo_config['dvdorder'] = True tvinfo_config['dvdorder'] = True
t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config) t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config)
show_info = t[ep_obj.show_obj.prodid] show_info = t.get_show(ep_obj.show_obj.prodid, language=ep_obj.show_obj.lang)
except BaseTVinfoShownotfound as e: except BaseTVinfoShownotfound as e:
raise exceptions_helper.ShowNotFoundException(ex(e)) raise exceptions_helper.ShowNotFoundException(ex(e))
except BaseTVinfoError as e: except BaseTVinfoError as e:

View file

@ -121,7 +121,7 @@ class XBMC12PlusMetadata(generic.GenericMetadata):
tv_node = etree.Element('tvshow') tv_node = etree.Element('tvshow')
try: try:
show_info = t[int(show_id)] show_info = t.get_show(show_id, language=show_lang)
except BaseTVinfoShownotfound as e: except BaseTVinfoShownotfound as e:
logger.log('Unable to find show with id %s on %s, skipping it' % logger.log('Unable to find show with id %s on %s, skipping it' %
(show_id, sickgear.TVInfoAPI(show_obj.tvid).name), logger.ERROR) (show_id, sickgear.TVInfoAPI(show_obj.tvid).name), logger.ERROR)
@ -223,7 +223,7 @@ class XBMC12PlusMetadata(generic.GenericMetadata):
try: try:
t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config) t = sickgear.TVInfoAPI(ep_obj.show_obj.tvid).setup(**tvinfo_config)
show_info = t[ep_obj.show_obj.prodid] show_info = t.get_show(ep_obj.show_obj.prodid, language=ep_obj.show_obj.lang)
except BaseTVinfoShownotfound as e: except BaseTVinfoShownotfound as e:
raise exceptions_helper.ShowNotFoundException(ex(e)) raise exceptions_helper.ShowNotFoundException(ex(e))
except BaseTVinfoError as e: except BaseTVinfoError as e: