Skip to content

Commit

Permalink
Fixed exception raised when get_episodesFiles_from_sonarr_api() doesn…
Browse files Browse the repository at this point in the history
…'t return proper content. #2188
  • Loading branch information
morpheus65535 committed Jul 4, 2023
1 parent da7879a commit cfc8a91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bazarr/sonarr/sync/episodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def sync_episodes(series_id=None, send_event=True):
episodeFiles = get_episodesFiles_from_sonarr_api(url=url_sonarr(), apikey_sonarr=apikey_sonarr,
series_id=seriesId['id'])
for episode in episodes:
if episode['hasFile']:
if episodeFiles and episode['hasFile']:
item = [x for x in episodeFiles if x['id'] == episode['episodeFileId']]
if item:
episode['episodeFile'] = item[0]
Expand Down

0 comments on commit cfc8a91

Please sign in to comment.