From 9f7b6cda11ccf9c2692fa8925742a18e4c65d869 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Fri, 24 Jul 2015 14:55:49 +0100 Subject: [PATCH] Change accept SD titles that contain audio quality. --- CHANGES.md | 1 + sickbeard/common.py | 2 +- tests/common_tests.py | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d9fce0ac..a37a3315 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -106,6 +106,7 @@ * Change to only show option "End upgrade on first match" on edit show page if quality custom is selected * Change label "Show is grouped in" in edit show page to "Show is in group" and move the section higher * Fix post processing of anime with version tags +* Change accept SD titles that contain audio quality [develop changelog] * Update Requests library 2.7.0 (ab1f493) to 2.7.0 (8b5e457) diff --git a/sickbeard/common.py b/sickbeard/common.py index f95e8a1e..41c32c12 100644 --- a/sickbeard/common.py +++ b/sickbeard/common.py @@ -205,7 +205,7 @@ class Quality: else: return Quality.UNKNOWN - if checkName(['(pdtv|hdtv|dsr|tvrip).(xvid|x264|h.?264)'], all) and not checkName(['(720|1080)[pi]'], all) \ + if checkName(['(pdtv|hdtv|dsr|tvrip).((aac|ac3|dd).?\d\.?\d.)*(xvid|x264|h.?264)'], all) and not checkName(['(720|1080)[pi]'], all) \ and not checkName(['hr.ws.pdtv.(x264|h.?264)'], any): return Quality.SDTV elif checkName(['web.?dl|web.?rip', 'xvid|x264|h.?264'], all) and not checkName(['(720|1080)[pi]'], all): diff --git a/tests/common_tests.py b/tests/common_tests.py index a0999561..b03e845c 100644 --- a/tests/common_tests.py +++ b/tests/common_tests.py @@ -28,6 +28,10 @@ class QualityTests(unittest.TestCase): self.assertEqual(common.Quality.SDTV, common.Quality.nameQuality("Test.Show.S01E02 WEB-DL H 264-GROUP")) self.assertEqual(common.Quality.SDTV, common.Quality.nameQuality("Test.Show.S01E02_WEB-DL_H_264-GROUP")) self.assertEqual(common.Quality.SDTV, common.Quality.nameQuality("Test.Show.S01E02.WEB-DL.AAC2.0.H264-GROUP")) + self.assertEqual(common.Quality.SDTV, common.Quality.nameQuality("Test.Show.S01E02.HDTV.AAC.2.0.x264-GROUP")) + self.assertEqual(common.Quality.SDTV, common.Quality.nameQuality("Test.Show.S01E02.HDTV.DD5.1.XViD-GROUP")) + self.assertEqual(common.Quality.SDTV, common.Quality.nameQuality("Test.Show.S01E02.HDTV.DD7.1.h.264-GROUP")) + self.assertEqual(common.Quality.SDTV, common.Quality.nameQuality("Test.Show.S01E02.WEB-DL.DD5.1.h.264-GROUP")) def test_SDDVD(self): self.assertEqual(common.Quality.SDDVD, common.Quality.nameQuality("Test.Show.S01E02.DVDRiP.XViD-GROUP"))