This commit is contained in:
Louis Vézina 2020-02-24 19:22:18 -05:00
parent df0f4dd92d
commit c96ca8fe16
1 changed files with 6 additions and 8 deletions

View File

@ -165,10 +165,9 @@ class Series(Resource):
item.update({"DT_RowId": 'row_' + str(item['sonarrSeriesId'])})
# Parse audio language
if item['audio_language']:
item.update({"audio_language": {"name": item['audio_language'],
"code2": alpha2_from_language(item['audio_language']),
"code3": alpha3_from_language(item['audio_language'])}})
"code2": alpha2_from_language(item['audio_language']) or None,
"code3": alpha3_from_language(item['audio_language']) or None}})
# Parse desired languages
if item['languages'] and item['languages'] != 'None':
@ -555,10 +554,9 @@ class Movies(Resource):
item.update({"DT_RowId": 'row_' + str(item['radarrId'])})
# Parse audio language
if item['audio_language']:
item.update({"audio_language": {"name": item['audio_language'],
"code2": alpha2_from_language(item['audio_language']),
"code3": alpha3_from_language(item['audio_language'])}})
"code2": alpha2_from_language(item['audio_language']) or None,
"code3": alpha3_from_language(item['audio_language']) or None}})
# Parse desired languages
if item['languages'] and item['languages'] != 'None':