Skip to content

Commit

Permalink
Fix for #384: Detect Digital Master source
Browse files Browse the repository at this point in the history
  • Loading branch information
ratoaq2 committed Dec 2, 2017
1 parent 774454b commit 16fd9ee
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 3 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Expand Up @@ -109,6 +109,7 @@ History
- Added `Vorbis` as new `audio_codec` possible value.
- Added `PCM` as new `audio_codec` possible value.
- Added `LPCM` as new `audio_codec` possible value.
- Added `Digital Master` as new `source` possible value.

2.1.4 (2017-06-01)
------------------
Expand Down
6 changes: 3 additions & 3 deletions docs/properties.rst
Expand Up @@ -140,9 +140,9 @@ Video properties

Source of the release

- ``Analogue HDTV``, ``Blu-ray``, ``Camera``, ``Digital TV``, ``DVD``, ``HD Camera``, ``HD Telecine``,
``HD Telesync``, ``HD-DVD``, ``HDTV``, ``Pay-per-view``, ``Satellite``, ``Telecine``, ``Telesync``, ``TV``,
``Ultra HD Blu-ray``, ``Ultra HDTV``, ``VHS``, ``Video on Demand``, ``Web``, ``Workprint``
- ``Analogue HDTV``, ``Blu-ray``, ``Camera``, ``Digital Master``, ``Digital TV``, ``DVD``, ``HD Camera``,
``HD Telecine``, ``HD Telesync``, ``HD-DVD``, ``HDTV``, ``Pay-per-view``, ``Satellite``, ``Telecine``, ``Telesync``,
``TV``, ``Ultra HD Blu-ray``, ``Ultra HDTV``, ``VHS``, ``Video on Demand``, ``Web``, ``Workprint``


- **screen_size**
Expand Down
2 changes: 2 additions & 0 deletions guessit/rules/properties/source.py
Expand Up @@ -67,6 +67,8 @@ def demote_other(match, other): # pylint: disable=unused-argument
value={'source': 'Digital TV', 'other': 'Rip'})
rebulk.regex(*build_source_pattern('DVD', suffix=rip_optional_suffix),
value={'source': 'DVD', 'other': 'Rip'})
rebulk.regex(*build_source_pattern('DM', suffix=rip_optional_suffix),
value={'source': 'Digital Master', 'other': 'Rip'})
rebulk.regex(*build_source_pattern('VIDEO-?TS', 'DVD-?R(?:$|(?!E))', # 'DVD-?R(?:$|^E)' => DVD-Real ...
'DVD-?9', 'DVD-?5'), value='DVD')

Expand Down
60 changes: 60 additions & 0 deletions guessit/test/episodes.yml
Expand Up @@ -4420,3 +4420,63 @@
# release_group: OZM
type: episode

? The.Prisoners.S01E03.1080p.DM.AAC2.0.x264-BTN
: title: The Prisoners
season: 1
episode: 3
screen_size: 1080p
source: Digital Master
audio_codec: AAC
audio_channels: '2.0'
video_codec: H.264
release_group: BTN
type: episode

? Panorama.S2013E25.Broken.by.Battle.1080p.DM.AAC2.0.x264-BTN
: title: Panorama
season: 2013
episode: 25
episode_title: Broken by Battle
screen_size: 1080p
source: Digital Master
audio_codec: AAC
audio_channels: '2.0'
video_codec: H.264
release_group: BTN
type: episode

? Our.World.S2014E11.Chinas.Model.Army.720p.DM.AAC2.0.x264-BTN
: title: Our World
season: 2014
episode: 11
episode_title: Chinas Model Army
screen_size: 720p
source: Digital Master
audio_codec: AAC
audio_channels: '2.0'
video_codec: H.264
release_group: BTN
type: episode

? Storyville.S2016E08.My.Nazi.Legacy.1080p.DM.x264-BTN
: title: Storyville
season: 2016
episode: 8
episode_title: My Nazi Legacy
screen_size: 1080p
source: Digital Master
video_codec: H.264
release_group: BTN
type: episode

? Comedians.in.Cars.Getting.Coffee.S07E01.1080p.DM.FLAC2.0.x264-NTb
: title: Comedians in Cars Getting Coffee
season: 7
episode: 1
screen_size: 1080p
source: Digital Master
audio_codec: FLAC
audio_channels: '2.0'
video_codec: H.264
release_group: NTb
type: episode
11 changes: 11 additions & 0 deletions guessit/test/movies.yml
Expand Up @@ -1611,3 +1611,14 @@
release_group: Scarface45
container: avi
type: movie

? Tears.of.Steel.2012.2160p.DMRip.Eng.HDCLUB.mkv
: title: Tears of Steel
year: 2012
screen_size: 2160p
source: Digital Master
other: Rip
language: english
release_group: HDCLUB
container: mkv
type: movie
8 changes: 8 additions & 0 deletions guessit/test/rules/source.yml
Expand Up @@ -313,3 +313,11 @@
? BDRip.[4K-2160p-UHD]
: source: Ultra HD Blu-ray
other: Rip

? DM
: source: Digital Master

? DMRIP
? DM-RIP
: source: Digital Master
other: Rip

0 comments on commit 16fd9ee

Please sign in to comment.