Skip to content

Commit

Permalink
fix: use absolute episode number to reference the episode
Browse files Browse the repository at this point in the history
  • Loading branch information
chkpwd committed Oct 27, 2024
1 parent 1da3ef1 commit c9d489e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/sonarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def get_sonarr_episodes(series_id: int):
"season": item.season_number,
"monitored": item.monitored,
"episode_number": item.episode_number,
"absolute_episode_number": item.absolute_episode_number
})
except Exception as e:
logging.error("Exception when calling EpisodeApi->list_episode: %s\n" % e)
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
create_plex_collection(fillers=fillers_from_api)

for episode in sonarr_episodes_id:
if episode["episode_number"] not in fillers_from_api:
if episode["absolute_episode_number"] not in fillers_from_api:
episodes_to_monitor.append(episode.get("id"))

logging.debug("Non-Filler Episodes: %s", episodes_to_monitor)
Expand Down

0 comments on commit c9d489e

Please sign in to comment.