Skip to content

Commit f82ee12

Browse files
authored
Merge pull request #197 from Drazzilb08/dev
Version update 1.2.4
2 parents 6ee1a3a + 2f79865 commit f82ee12

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.3
1+
1.2.4

modules/upgradinatorr.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ def filter_media(media_dict, checked_tag_id, ignore_tag_id, count, season_monito
6464
if episode['monitored']:
6565
monitored_count += 1
6666
# Change monitoring of season depending on how many unmonitored episodes there are
67-
monitored_percentage = monitored_count / len(season['episode_data'])
67+
if len(season["episode_data"]) > 0:
68+
monitored_percentage = monitored_count / len(season['episode_data'])
69+
else:
70+
logger.debug(f"Skipping {item['title']} ({item['year']}), Season {i} unmonitored. Reason: No episodes in season.")
71+
continue
6872
if monitored_percentage < season_monitored_threshold:
6973
item['seasons'][i]['monitored'] = False
7074
logger.debug(f"{item['title']}, Season {i} unmonitored. Reason: monitored percentage {monitored_percentage} less than season_monitored_threshold {season_monitored_threshold}")

0 commit comments

Comments
 (0)