From 2536c4b7d8f0e3e13ed9402a989b6d66947df2ba Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sat, 30 Dec 2017 17:08:34 +0000 Subject: [PATCH] Fix marking episode as to upgrade. --- CHANGES.md | 7 ++++++- sickbeard/common.py | 17 ++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9a3d9eeb..653bf606 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.13.8 (2017-12-27 15:45:00 UTC) +### 0.13.9 (2018-01-02 15:45:00 UTC) + +* Fix marking episode as to upgrade + + +### 0.13.8 (2017-12-27 15:45:00 UTC) * Fix HD4Free provider diff --git a/sickbeard/common.py b/sickbeard/common.py index d4806c0b..ea3bf97d 100644 --- a/sickbeard/common.py +++ b/sickbeard/common.py @@ -392,25 +392,20 @@ class wantedQualities(dict): for q in Quality.qualityStrings: if 0 >= q: continue + wanted = [i for i in upgrade_qualities if q < i] if q not in upgrade_qualities and q in initial_qualities: # quality is only in initial_qualities - self[qualities][q] = {self.bothlists: False, - self.wantedlist: [i for i in upgrade_qualities if q < i], self.upgradelist: False} + self[qualities][q] = {self.bothlists: False, self.wantedlist: wanted, self.upgradelist: False} elif q in upgrade_qualities and q in initial_qualities: # quality is in initial_qualities and upgrade_qualities - self[qualities][q] = {self.bothlists: True, - self.wantedlist: [i for i in upgrade_qualities if q < i], self.upgradelist: True} + self[qualities][q] = {self.bothlists: True, self.wantedlist: wanted, self.upgradelist: True} elif q in upgrade_qualities: # quality is only in upgrade_qualities - self[qualities][q] = {self.bothlists: False, - self.wantedlist: [i for i in upgrade_qualities if q < i], self.upgradelist: True} + self[qualities][q] = {self.bothlists: False, self.wantedlist: wanted, self.upgradelist: True} else: # quality is not in any selected quality for the show - only_upgrade = q >= max_initial_quality - self[qualities][q] = {self.bothlists: False, - self.wantedlist: - [i for i in (initial_qualities, upgrade_qualities)[only_upgrade] if q < i], - self.upgradelist: only_upgrade} + self[qualities][q] = {self.bothlists: False, self.wantedlist: wanted, + self.upgradelist: (q >= max_initial_quality) and any(upgrade_qualities)} def __getitem__(self, k): if k not in self: