diff --git a/HISTORY.rst b/HISTORY.rst index 68c19805..769ba647 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -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) ------------------ diff --git a/docs/properties.rst b/docs/properties.rst index 5ef13535..fb4d9f41 100644 --- a/docs/properties.rst +++ b/docs/properties.rst @@ -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** @@ -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`` diff --git a/guessit/rules/properties/edition.py b/guessit/rules/properties/edition.py index 2199d5d6..d5905c6f 100644 --- a/guessit/rules/properties/edition.py +++ b/guessit/rules/properties/edition.py @@ -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' @@ -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 diff --git a/guessit/rules/properties/other.py b/guessit/rules/properties/other.py index 71722b4f..b2dd0c31 100644 --- a/guessit/rules/properties/other.py +++ b/guessit/rules/properties/other.py @@ -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'): diff --git a/guessit/test/movies.yml b/guessit/test/movies.yml index 81941722..989025e1 100644 --- a/guessit/test/movies.yml +++ b/guessit/test/movies.yml @@ -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 diff --git a/guessit/test/rules/edition.yml b/guessit/test/rules/edition.yml index 670b1075..4b7fd986 100644 --- a/guessit/test/rules/edition.yml +++ b/guessit/test/rules/edition.yml @@ -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] diff --git a/guessit/test/rules/other.yml b/guessit/test/rules/other.yml index 825100dd..113b6d81 100644 --- a/guessit/test/rules/other.yml +++ b/guessit/test/rules/other.yml @@ -165,3 +165,8 @@ ? -BT.20200 ? -BT.2021 : other: BT.2020 + +? Upscaled +? Upscale +: other: Upscaled +