diff --git a/HISTORY.rst b/HISTORY.rst index cbd2845..e317844 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -86,6 +86,7 @@ History - 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. 2.1.4 (2017-06-01) ------------------ diff --git a/docs/properties.rst b/docs/properties.rst index 06971ae..87ce77f 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``, ``IMAX``, ``Remastered``, ``Special``, ``Limited``, ``Theatrical``, ``Uncensored``, - ``Uncut``, ``Unrated`` + ``Extended``, ``Festival``, ``IMAX``, ``Remastered``, ``Special``, ``Limited``, ``Theatrical``, ``Ultimate``, + ``Uncensored``, ``Uncut``, ``Unrated`` - **film** diff --git a/guessit/rules/properties/edition.py b/guessit/rules/properties/edition.py index 214d3fb..f3cd8ab 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' @@ -39,5 +39,7 @@ def edition(): 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('ultimate-edition', value='Ultimate') + rebulk.regex("ultimate-collector'?s?-edition", value=['Ultimate', 'Collector']) return rebulk diff --git a/guessit/test/movies.yml b/guessit/test/movies.yml index fe782bc..5327952 100644 --- a/guessit/test/movies.yml +++ b/guessit/test/movies.yml @@ -1323,3 +1323,22 @@ 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 diff --git a/guessit/test/rules/edition.yml b/guessit/test/rules/edition.yml index c5e6c27..3ca942b 100644 --- a/guessit/test/rules/edition.yml +++ b/guessit/test/rules/edition.yml @@ -36,4 +36,18 @@ ? IMAX ? IMAX Edition -: edition: IMAX \ No newline at end of file +: 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]