Skip to content

Commit

Permalink
Merge pull request #474 from guessit-io/feature/edition-and-other-add…
Browse files Browse the repository at this point in the history
…itions

Add IMAX and Upscaled detections
  • Loading branch information
ratoaq2 committed Jul 16, 2017
2 parents c8d3fac + 6d63341 commit 08bdc0e
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 6 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ History
- Added `Dolby Vision` as new `other` possible value.
- Added `BT.2020` as new `other` possible value.
- Added `12-bit` as new `color_depth` possible value.
- Added `IMAX` as new `edition` possible value.
- Added `Upscaled` as new `other` possible value.
- Added `Ultimate` as new `edition` possible value.
- Added `Fan` as new `edition` possible value.

2.1.4 (2017-06-01)
------------------
Expand Down
8 changes: 4 additions & 4 deletions docs/properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ Other properties
Edition of the movie.

- ``Alternative Cut``, ``Collector``, ``Criterion``, ``Deluxe``, ``Director's Cut``, ``Director's Definitive Cut``,
``Extended``, ``Festival``, ``Remastered``, ``Special``, ``Limited``, ``Theatrical``, ``Uncensored``, ``Uncut``,
``Unrated``
``Extended``, ``Fan``, ``Festival``, ``IMAX``, ``Remastered``, ``Special``, ``Limited``, ``Theatrical``,
``Ultimate``, ``Uncensored``, ``Uncut``, ``Unrated``


- **film**
Expand Down Expand Up @@ -295,6 +295,6 @@ Other properties
``Line Dubbed``, ``Line Audio``, ``Mic Dubbed``, ``Micro HD``, ``Mux``, ``NTSC``, ``Open Matte``,
``Original Aspect Ratio``, ``Original Video``, ``PAL``, ``Preair``, ``Proper``, ``PS Vita``, ``Read NFO``,
``Region 5``, ``Region C``, ``Reencoded``, ``Remux``, ``Retail``, ``Rip``, ``Screener``, ``SECAM``,
``Standard Dynamic Range``, ``Straight to Video``, ``Sync Fixed``, ``Trailer``, ``Ultra HD``, ``West Coast Feed``,
``Widescreen``, ``XXX``
``Standard Dynamic Range``, ``Straight to Video``, ``Sync Fixed``, ``Trailer``, ``Ultra HD``, ``Upscaled``,
``West Coast Feed``, ``Widescreen``, ``XXX``

8 changes: 6 additions & 2 deletions guessit/rules/properties/edition.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def edition():
rebulk = Rebulk().regex_defaults(flags=re.IGNORECASE, abbreviations=[dash]).string_defaults(ignore_case=True)
rebulk.defaults(name='edition', validator=seps_surround)

rebulk.regex('collector', 'collector-edition', 'edition-collector', value='Collector')
rebulk.regex('collector', "collector'?s?-edition", 'edition-collector', value='Collector')
rebulk.regex('special-edition', 'edition-special', value='Special',
conflict_solver=lambda match, other: other
if other.name == 'episode_details' and other.value == 'Special'
Expand All @@ -38,6 +38,10 @@ def edition():
for value in ('Remastered', 'Uncensored', 'Uncut', 'Unrated'):
rebulk.string(value, value=value, tags=['has-neighbor', 'release-group-prefix'])
rebulk.string('Festival', value='Festival', tags=['has-neighbor-before', 'has-neighbor-after'])

rebulk.regex('imax', 'imax-edition', value='IMAX')
rebulk.regex('fan-edit(?:ion)?', 'fan-collection', value='Fan')
rebulk.regex('ultimate-edition', value='Ultimate')
rebulk.regex("ultimate-collector'?s?-edition", value=['Ultimate', 'Collector'])
rebulk.regex('ultimate-fan-edit(?:ion)?', 'ultimate-fan-collection', value=['Ultimate', 'Fan'])

return rebulk
1 change: 1 addition & 0 deletions guessit/rules/properties/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def validate_complete(match):
tags=['streaming_service.prefix', 'streaming_service.suffix'])
rebulk.regex('Ultra-?(?:HD)?', 'UHD', value='Ultra HD', validator=None,
tags=['streaming_service.prefix', 'streaming_service.suffix'])
rebulk.regex('Upscaled?', value='Upscaled')

for value in ('Complete', 'Classic', 'Bonus', 'Trailer', 'Retail',
'Colorized', 'Internal'):
Expand Down
68 changes: 68 additions & 0 deletions guessit/test/movies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1279,3 +1279,71 @@
release_group: Hn1Dr2
container: mkv
type: movie

? Interstelar.2014.IMAX.RUS.BDRip.x264.-HELLYWOOD.mkv
: title: Interstelar
year: 2014
edition: IMAX
language: ru
source: Blu-ray
other: Rip
video_codec: H.264
release_group: HELLYWOOD
container: mkv
type: movie

? The.Dark.Knight.IMAX.EDITION.HQ.BluRay.1080p.x264.AC3.Hindi.Eng.ETRG
: title: The Dark Knight
edition: IMAX
other: High Quality
source: Blu-ray
screen_size: 1080p
video_codec: H.264
audio_codec: Dolby Digital
language: [hindi, english]
release_group: ETRG
type: movie

? The.Martian.2015.4K.UHD.UPSCALED-ETRG
: title: The Martian
year: 2015
screen_size: 2160p
other: [Ultra HD, Upscaled]
release_group: ETRG
type: movie

? Delibal 2015 720p Upscale DVDRip x264 DD5.1 AC3
: title: Delibal
year: 2015
screen_size: 720p
other: [Upscaled, Rip]
source: DVD
video_codec: H.264
audio_codec: Dolby Digital
audio_channels: '5.1'
type: movie

? Casablanca [Ultimate Collector's Edition].1942.BRRip.XviD-VLiS
: title: Casablanca
edition: [Ultimate, Collector]
year: 1942
source: Blu-ray
other: [Reencoded, Rip]
video_codec: Xvid
release_group: VLiS
type: movie

? Batman V Superman Dawn of Justice 2016 Extended Cut Ultimate Edition HDRip x264 AC3-DaDDy
: title: Batman V Superman Dawn of Justice
year: 2016
edition: [Extended, Ultimate]
other: [HD, Rip]
video_codec: H.264
audio_codec: Dolby Digital
release_group: DaDDy
type: movie

? Stargate SG1 Ultimate Fan Collection
: title: Stargate SG1
edition: [Ultimate, Fan]
type: movie
28 changes: 28 additions & 0 deletions guessit/test/rules/edition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,31 @@

? ddc
: edition: Director's Definitive Cut

? IMAX
? IMAX Edition
: edition: IMAX

? ultimate edition
? -ultimate
: edition: Ultimate

? ultimate collector edition
? ultimate collector's edition
? ultimate collectors edition
? -collectors edition
? -ultimate edition
: edition: [Ultimate, Collector]

? ultimate collectors edition dc
: edition: [Ultimate, Collector, Director's Cut]

? fan edit
? fan edition
? fan collection
: edition: Fan

? ultimate fan edit
? ultimate fan edition
? ultimate fan collection
: edition: [Ultimate, Fan]
5 changes: 5 additions & 0 deletions guessit/test/rules/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,8 @@
? -BT.20200
? -BT.2021
: other: BT.2020

? Upscaled
? Upscale
: other: Upscaled

0 comments on commit 08bdc0e

Please sign in to comment.