From ab1da599cf250a6cf0987770974dcbe82ab87ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Alvergnat?= Date: Sun, 14 Oct 2018 22:38:43 +0200 Subject: [PATCH] Remove Bonus and Extras from episode_details Close #558 --- HISTORY.rst | 3 ++- docs/properties.rst | 2 +- guessit/rules/properties/episodes.py | 4 +--- guessit/test/episodes.yml | 4 +--- guessit/test/movies.yml | 25 +++++++++++++++++++++++++ 5 files changed, 30 insertions(+), 8 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 2922451..ffbb11a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,8 @@ History 3.0.1 (unreleased) ------------------ -- Nothing changed yet. +- Removed `Extras` and `Bonus` values from `episode_details` property as those tags may also appear in movies. +- Add support for Python 3.7 3.0.0 (2018-05-22) diff --git a/docs/properties.rst b/docs/properties.rst index 69f0f1f..a328de5 100644 --- a/docs/properties.rst +++ b/docs/properties.rst @@ -122,7 +122,7 @@ Episode properties Some details about the episode. - - ``Bonus``, ``Extras``, ``Final``, ``Pilot``, ``Special``, ``Unaired`` + - ``Final``, ``Pilot``, ``Special``, ``Unaired`` - **episode_format** diff --git a/guessit/rules/properties/episodes.py b/guessit/rules/properties/episodes.py index 13a92e3..1e40d68 100644 --- a/guessit/rules/properties/episodes.py +++ b/guessit/rules/properties/episodes.py @@ -190,11 +190,9 @@ def episodes(config): r'(?P\d+)').repeater('*') # episode_details property - for episode_detail in ('Special', 'Bonus', 'Pilot', 'Unaired', 'Final'): + for episode_detail in ('Special', 'Pilot', 'Unaired', 'Final'): rebulk.string(episode_detail, value=episode_detail, name='episode_details', disabled=lambda context: is_disabled(context, 'episode_details')) - rebulk.regex(r'Extras?', 'Omake', name='episode_details', value='Extras', - disabled=lambda context: is_disabled(context, 'episode_details')) def validate_roman(match): """ diff --git a/guessit/test/episodes.yml b/guessit/test/episodes.yml index 97320c8..a79ee7f 100644 --- a/guessit/test/episodes.yml +++ b/guessit/test/episodes.yml @@ -204,7 +204,6 @@ episode_title: Extras - Bad Karma source: DVD other: Rip - episode_details: Extras video_codec: Xvid ? series/Freaks And Geeks/Season 1/Episode 4 - Kim Kelly Is My Friend-eng(1).srt @@ -308,9 +307,8 @@ : title: Futurama season: 3 part: 3 - other: Bonus - episode_title: Deleted Scenes source: DVD + other: Bonus ? Ben.and.Kate.S01E02.720p.HDTV.X264-DIMENSION.mkv : title: Ben and Kate diff --git a/guessit/test/movies.yml b/guessit/test/movies.yml index 33d5d18..644b4d2 100644 --- a/guessit/test/movies.yml +++ b/guessit/test/movies.yml @@ -1719,3 +1719,28 @@ language: [en, de, it] release_group: STANDARD type: movie + +? Ant-Man.and.the.Wasp.2018.Digital.Extras.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv +: title: Ant-Man and the Wasp + year: 2018 + alternative_title: Digital Extras + screen_size: 1080p + streaming_service: Amazon Prime + source: Web + audio_codec: Dolby Digital Plus + audio_channels: '5.1' + video_codec: H.264 + release_group: NTG + type: movie + +? Ant-Man.and.the.Wasp.2018.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv +: title: Ant-Man and the Wasp + year: 2018 + screen_size: 1080p + streaming_service: Amazon Prime + source: Web + audio_codec: Dolby Digital Plus + audio_channels: '5.1' + video_codec: H.264 + release_group: NTG + type: movie \ No newline at end of file