Commit 2825d75d authored by echel0n's avatar echel0n
Browse files

fixed "Invalid image type series for series provider"

fixed "string indices must be integers" when attempting to retrieve series provider season images
fixed "cannot serialize (type int)" when attempting to write series metadata nfo
parent 1c10f554
This diff is collapsed.
......@@ -490,7 +490,7 @@ class MetadataProvider(object):
# use the default banner name
banner_path = self.get_banner_path(show_obj)
banner_data = self._retrieve_show_image('series', show_obj, which)
banner_data = self._retrieve_show_image('banner', show_obj, which)
if not banner_data:
sickrage.app.log.debug("No show banner image was retrieved, unable to write banner")
......@@ -544,7 +544,7 @@ class MetadataProvider(object):
# use the default season all banner name
banner_path = self.get_season_all_banner_path(show_obj)
banner_data = self._retrieve_show_image('series', show_obj, which)
banner_data = self._retrieve_show_image('banner', show_obj, which)
if not banner_data:
sickrage.app.log.debug("No show banner image was retrieved, unable to write season all banner")
......@@ -636,9 +636,9 @@ class MetadataProvider(object):
try:
# Give us just the normal poster-style season graphics
series_provider_language = show_obj.lang or sickrage.app.config.general.series_provider_default_language
image_data = show_obj.series_provider.images(show_obj.series_id, language=series_provider_language, key_type='poster', season=season)
if image_data:
return image_data[which]['filename']
image_urls = show_obj.series_provider.images(show_obj.series_id, language=series_provider_language, key_type='poster', season=season)
if len(image_urls):
return image_urls[which]['image']
sickrage.app.log.debug("{}: No season {} poster images on {} to download found".format(show_obj.series_id, season, show_obj.series_provider.name))
except (KeyError, IndexError):
......@@ -657,9 +657,9 @@ class MetadataProvider(object):
series_provider_language = show_obj.lang or sickrage.app.config.general.series_provider_default_language
# Give us just the normal season graphics
image_data = show_obj.series_provider.images(show_obj.series_id, language=series_provider_language, key_type='banner', season=season)
if image_data:
return image_data[which]['filename']
image_urls = show_obj.series_provider.images(show_obj.series_id, language=series_provider_language, key_type='banner', season=season)
if len(image_urls):
return image_urls[which]['image']
sickrage.app.log.debug("{}: No season {} banner images on {} to download found".format(show_obj.series_id, season, show_obj.series_provider.name))
except (KeyError, IndexError):
......
......@@ -266,7 +266,7 @@ class KODI_12PlusMetadata(MetadataProvider):
if getattr(series_episode_info, 'rating', None):
rating = SubElement(episode, "rating")
rating.text = series_episode_info['rating']
rating.text = str(series_episode_info['rating'])
for person in series_info['people']:
if 'name' not in person or not person['name'].strip():
......
......@@ -168,7 +168,7 @@ class Mede8erMetadata(MediaBrowserMetadata):
if getattr(series_info, 'runtime', None):
Runtime = SubElement(tv_node, "runtime")
Runtime.text = series_info['runtime']
Runtime.text = str(series_info['runtime'])
cast = SubElement(tv_node, "cast")
for person in series_info['people']:
......
......@@ -294,7 +294,7 @@ class MediaBrowserMetadata(MetadataProvider):
if getattr(series_info, 'rating', None):
Rating = SubElement(tv_node, "Rating")
Rating.text = series_info['rating']
Rating.text = str(series_info['rating'])
if getattr(series_info, 'firstAired', None):
try:
......@@ -310,7 +310,7 @@ class MediaBrowserMetadata(MetadataProvider):
RunningTime.text = series_info['runtime']
Runtime = SubElement(tv_node, "Runtime")
Runtime.text = series_info['runtime']
Runtime.text = str(series_info['runtime'])
if getattr(series_info, 'imdbid', None):
imdb_id = SubElement(tv_node, "IMDB_ID")
......@@ -439,7 +439,7 @@ class MediaBrowserMetadata(MetadataProvider):
if not ep_obj.related_episodes:
if getattr(series_episode_info, 'rating', None):
Rating = SubElement(episode, "Rating")
Rating.text = series_episode_info['rating']
Rating.text = str(series_episode_info['rating'])
if getattr(series_info, 'imdb_id', None):
IMDB_ID = SubElement(episode, "IMDB_ID")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment