From d906bcc049c3f000b3ed41ab43fc382ac3d46e46 Mon Sep 17 00:00:00 2001 From: Nils Vogels Date: Sat, 3 May 2014 00:37:41 +0200 Subject: [PATCH] Attempt to get quality from snatched episode status Backport from midgetspy --- sickbeard/postProcessor.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sickbeard/postProcessor.py b/sickbeard/postProcessor.py index 1d93cb81..2c2429d7 100644 --- a/sickbeard/postProcessor.py +++ b/sickbeard/postProcessor.py @@ -681,7 +681,14 @@ class PostProcessor(object): ep_quality] + ", using that", logger.DEBUG) return ep_quality - # if we didn't get a quality from one of the names above, try assuming from each of the names + # Try getting quality from the episode (snatched) status + if ep_obj.status in common.Quality.SNATCHED + common.Quality.SNATCHED_PROPER: + oldStatus, ep_quality = common.Quality.splitCompositeStatus(ep_obj.status) # @UnusedVariable + if ep_quality != common.Quality.UNKNOWN: + self._log(u"The old status had a quality in it, using that: " + common.Quality.qualityStrings[ep_quality], logger.DEBUG) + return ep_quality + + # Try guessing quality from the file name ep_quality = common.Quality.assumeQuality(self.file_name) self._log( u"Guessing quality for name " + self.file_name + u", got " + common.Quality.qualityStrings[ep_quality],