Skip to content

Commit

Permalink
Fatal crash fix if 'ja' only for posters language
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroQI committed Jul 29, 2018
1 parent 57ba3e5 commit c6c03bc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions Contents/Code/TheTVDBv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ def GetMetadata(media, movie, error_log, lang, metadata_source, AniDBid, TVDBid,
Log.Info('language_posters: {}'.format(language_posters))
Log.Info('==========================')
for language in language_posters:
try:
if not language=='ja': bannerTypes = Dict(common.LoadFile(filename='images_{}.json'.format(language), relativeDirectory="TheTVDB/json/"+TVDBid, url=(TVDB_SERIES_IMG_INFO_URL % TVDBid), cache=0, headers={'Content-type': 'application/json', 'Accept-Language': language}), 'data', default={})
try: bannerTypes = Dict(common.LoadFile(filename='images_{}.json'.format(language), relativeDirectory="TheTVDB/json/"+TVDBid, url=(TVDB_SERIES_IMG_INFO_URL % TVDBid), cache=0, headers={'Content-type': 'application/json', 'Accept-Language': language}), 'data', default={})
except: Log.Info("Invalid image JSON from url: " + TVDB_SERIES_IMG_INFO_URL % TVDBid)
else: #JSON format = {"fanart", "poster", "season", "seasonwide", "series"}
metanames = {'fanart': "art", 'poster': "posters", 'series': "banners", 'season': "seasons", 'seasonwide': 'seasonwide'}#
Expand Down
1 change: 0 additions & 1 deletion Contents/Code/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,6 @@ def UpdateMeta(metadata, media, movie, MetaSources, mappingList):
elif not Dict(count, field) and Prefs[field]!="None" and source_list: Log.Info("[#] {field:<29} Sources: {sources:<60} Inside: {source_list} Values: {values}".format(field=field, sources='' if field==season else Prefs[field], source_list=source_list, values=Dict(MetaSources, source, field)))

#if field=='posters': metadata.thumbs.validate_keys(meta_new.keys())


if not movie:
import AnimeLists
Expand Down

1 comment on commit c6c03bc

@ZeroQI
Copy link
Owner Author

@ZeroQI ZeroQI commented on c6c03bc Jul 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.