mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 21:53:37 +00:00
Merge pull request #494 from JackDandy/feature/ChangeFirstMatchEpColour
Change displayShow page episode colours when a minimum quality is met…
This commit is contained in:
commit
8d0131281f
2 changed files with 22 additions and 25 deletions
|
@ -27,6 +27,7 @@
|
||||||
* Fix post processing season pack folders
|
* Fix post processing season pack folders
|
||||||
* Fix saving torrent provider option "Seed until ratio" after recent refactor
|
* Fix saving torrent provider option "Seed until ratio" after recent refactor
|
||||||
* Change white text in light theme on Manage / Episode Status Management page to black for better readability
|
* Change white text in light theme on Manage / Episode Status Management page to black for better readability
|
||||||
|
* Change displayShow page episode colours when a minimum quality is met with "End upgrade on first match"
|
||||||
* Add SceneTime torrent provider
|
* Add SceneTime torrent provider
|
||||||
* Change TtN provider to parse new layout
|
* Change TtN provider to parse new layout
|
||||||
* Improve recognition of SD quality
|
* Improve recognition of SD quality
|
||||||
|
|
|
@ -1310,37 +1310,33 @@ class TVShow(object):
|
||||||
|
|
||||||
def getOverview(self, epStatus):
|
def getOverview(self, epStatus):
|
||||||
|
|
||||||
if epStatus == WANTED:
|
if ARCHIVED == epStatus:
|
||||||
|
return Overview.GOOD
|
||||||
|
if WANTED == epStatus:
|
||||||
return Overview.WANTED
|
return Overview.WANTED
|
||||||
elif epStatus in (UNAIRED, UNKNOWN):
|
if epStatus in (SKIPPED, IGNORED):
|
||||||
return Overview.UNAIRED
|
|
||||||
elif epStatus in (SKIPPED, IGNORED):
|
|
||||||
return Overview.SKIPPED
|
return Overview.SKIPPED
|
||||||
elif epStatus == ARCHIVED:
|
if epStatus in (UNAIRED, UNKNOWN):
|
||||||
return Overview.GOOD
|
return Overview.UNAIRED
|
||||||
elif epStatus in Quality.DOWNLOADED + Quality.SNATCHED + Quality.SNATCHED_PROPER + Quality.FAILED + Quality.SNATCHED_BEST:
|
if epStatus in Quality.DOWNLOADED + Quality.SNATCHED + Quality.SNATCHED_PROPER + Quality.FAILED + Quality.SNATCHED_BEST:
|
||||||
|
|
||||||
anyQualities, bestQualities = Quality.splitQuality(self.quality) # @UnusedVariable
|
status, quality = Quality.splitCompositeStatus(epStatus)
|
||||||
if bestQualities:
|
if FAILED == status:
|
||||||
maxBestQuality = max(bestQualities)
|
|
||||||
else:
|
|
||||||
maxBestQuality = None
|
|
||||||
|
|
||||||
epStatus, curQuality = Quality.splitCompositeStatus(epStatus)
|
|
||||||
|
|
||||||
if epStatus == FAILED:
|
|
||||||
return Overview.WANTED
|
return Overview.WANTED
|
||||||
elif epStatus in (SNATCHED, SNATCHED_PROPER, SNATCHED_BEST):
|
if status in (SNATCHED, SNATCHED_PROPER, SNATCHED_BEST):
|
||||||
return Overview.SNATCHED
|
return Overview.SNATCHED
|
||||||
# if they don't want re-downloads then we call it good if they have anything
|
|
||||||
elif maxBestQuality == None:
|
void, best_qualities = Quality.splitQuality(self.quality)
|
||||||
|
# if re-downloads aren't wanted then mark it "good" if there is anything
|
||||||
|
if not len(best_qualities):
|
||||||
|
return Overview.GOOD
|
||||||
|
|
||||||
|
min_best, max_best = min(best_qualities), max(best_qualities)
|
||||||
|
if quality >= max_best \
|
||||||
|
or (self.archive_firstmatch and
|
||||||
|
(quality in best_qualities or (None is not min_best and quality > min_best))):
|
||||||
return Overview.GOOD
|
return Overview.GOOD
|
||||||
# if they have one but it's not the best they want then mark it as qual
|
|
||||||
elif curQuality < maxBestQuality:
|
|
||||||
return Overview.QUAL
|
return Overview.QUAL
|
||||||
# if it's >= maxBestQuality then it's good
|
|
||||||
else:
|
|
||||||
return Overview.GOOD
|
|
||||||
|
|
||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
d = dict(self.__dict__)
|
d = dict(self.__dict__)
|
||||||
|
|
Loading…
Reference in a new issue