Merge branch 'main' into dev

This commit is contained in:
JackDandy 2023-03-08 23:37:48 +00:00
commit bd610ca2eb
8 changed files with 18 additions and 12 deletions

View file

@ -17,6 +17,11 @@
* Refactor `timestamp_near` to `SGDatetime.timestamp_near` * Refactor `timestamp_near` to `SGDatetime.timestamp_near`
### 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) ### 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

@ -509,7 +509,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:
@ -1079,7 +1080,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.warning(f'Unable to look up show on {sickgear.TVInfoAPI(show_obj.tvid).name},' logger.warning(f'Unable to look up show on {sickgear.TVInfoAPI(show_obj.tvid).name},'
f' not downloading images: {ex(e)}') f' not downloading images: {ex(e)}')

View file

@ -125,7 +125,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.error(f'Unable to find show with id {show_id} on {sickgear.TVInfoAPI(show_obj.tvid).name},' logger.error(f'Unable to find show with id {show_id} on {sickgear.TVInfoAPI(show_obj.tvid).name},'
f' skipping it') f' skipping it')
@ -286,7 +286,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.error(f'Unable to find show with id {show_obj.prodid} on tvdb, skipping it') logger.error(f'Unable to find show with id {show_obj.prodid} on tvdb, skipping it')
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

@ -250,7 +250,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.error(f'Unable to find show with id {show_obj.prodid} ' logger.error(f'Unable to find show with id {show_obj.prodid} '
f'on {sickgear.TVInfoAPI(show_obj.tvid).name}, skipping it') f'on {sickgear.TVInfoAPI(show_obj.tvid).name}, skipping it')
@ -410,7 +410,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

@ -199,7 +199,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

@ -200,7 +200,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.error(f'Unable to find show with id {show_id} on {sickgear.TVInfoAPI(show_obj.tvid).name},' logger.error(f'Unable to find show with id {show_id} on {sickgear.TVInfoAPI(show_obj.tvid).name},'
f' skipping it') f' skipping it')
@ -222,7 +222,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: