Add support for SD mkv container.

This commit is contained in:
JackDandy 2016-04-07 19:18:00 +01:00
parent 5507dd21c7
commit 60a97ca397
3 changed files with 10 additions and 2 deletions

View file

@ -1,4 +1,9 @@
### 0.11.10 (2016-03-17 19:00:00 UTC)
### 0.11.11 (2016-04-05 19:20:00 UTC)
* Add support for SD mkv container
### 0.11.10 (2016-03-17 19:00:00 UTC)
* Fix dbs that should not have been imported to work

View file

@ -271,7 +271,7 @@ class Quality:
@staticmethod
def assumeQuality(name):
if name.lower().endswith(('.avi', '.mp4')):
if name.lower().endswith(('.avi', '.mp4', '.mkv')):
return Quality.SDTV
elif name.lower().endswith('.ts'):
return Quality.RAWHDTV

View file

@ -12,6 +12,9 @@ class QualityTests(unittest.TestCase):
# TODO: repack / proper ? air-by-date ? season rip? multi-ep?
def test_SDTV(self):
self.assertEqual(common.Quality.compositeStatus(common.DOWNLOADED, common.Quality.SDTV),
common.Quality.statusFromName('Test.Show.S01E02-GROUP.mkv'))
self.assertEqual(common.Quality.SDTV, common.Quality.nameQuality("Test.Show.S01E02.PDTV.XViD-GROUP"))
self.assertEqual(common.Quality.SDTV, common.Quality.nameQuality("Test.Show.S01E02.PDTV.x264-GROUP"))
self.assertEqual(common.Quality.SDTV, common.Quality.nameQuality("Test.Show.S01E02.HDTV.XViD-GROUP"))