Skip to content

Commit

Permalink
Ensure invalid sonarr queue items are just skipped over - fixes Boerd…
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Jul 18, 2022
1 parent cfc5c69 commit 25f49cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions varken/sonarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def get_queue(self):

while response.totalRecords > response.page * response.pageSize:
page = response.page + 1
params = {'pageSize': pageSize, 'page': page, 'includeSeries': True, 'includeEpisode': True}
params = {'pageSize': pageSize, 'page': page, 'includeSeries': True, 'includeEpisode': True,
'includeUnknownSeriesItems': True}
req = self.session.prepare_request(Request('GET', self.server.url + endpoint, params=params))
get = connection_handler(self.session, req, self.server.verify_ssl)
if not get:
Expand All @@ -140,8 +141,8 @@ def get_queue(self):

for queueItem in download_queue:
tvShow = SonarrTVShow(**queueItem.series)
episode = SonarrEpisode(**queueItem.episode)
try:
episode = SonarrEpisode(**queueItem.episode)
sxe = f"S{episode.seasonNumber:0>2}E{episode.episodeNumber:0>2}"
except TypeError as e:
self.logger.error('TypeError has occurred : %s while processing the sonarr queue. \
Expand Down

0 comments on commit 25f49cb

Please sign in to comment.