I'm getting an error when mdblistarr is updating my Sonarr records.
Error:
Traceback (most recent call last): File "/usr/src/app/mdblistrr/cron.py", line 65, in post_sonarr_payload if season['statistics']['percentOfEpisodes'] == 100: KeyError: 'statistics'
Looks like the issue is occuring when running mdblistarr/mdblistrr/cron.py post_sonarr_payload():
if show.get('seasons'):
for season in show['seasons']:
if season['statistics']['percentOfEpisodes'] == 100:
# At least one season is downloaded 100%
exists = True
Not sure why, but there could be cases where a season doesn't have statistics populated as retrieving show['seasons'] did not error.
Probably needs to use .get('statistics'), or wrap it in a try/except block?
I'm getting an error when mdblistarr is updating my Sonarr records.
Error:
Traceback (most recent call last): File "/usr/src/app/mdblistrr/cron.py", line 65, in post_sonarr_payload if season['statistics']['percentOfEpisodes'] == 100: KeyError: 'statistics'
Looks like the issue is occuring when running mdblistarr/mdblistrr/cron.py post_sonarr_payload():
Not sure why, but there could be cases where a season doesn't have statistics populated as retrieving show['seasons'] did not error.
Probably needs to use .get('statistics'), or wrap it in a try/except block?