Skip to content

Commit

Permalink
fix(source): avoid Shots to be guessed as Showtime and TS
Browse files Browse the repository at this point in the history
Close #709
Close #710
  • Loading branch information
Toilal committed Nov 4, 2021
1 parent f1d8f61 commit de85403
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
3 changes: 2 additions & 1 deletion guessit/rules/properties/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ def demote_other(match, other): # pylint: disable=unused-argument
value={'source': 'Camera', 'other': 'Rip'})
rebulk.regex(*build_source_pattern('HD-?CAM', suffix=optional(rip_suffix)),
value={'source': 'HD Camera', 'other': 'Rip'})
# For TS, we remove 'streaming_service.suffix' tag to avoid "Shots" being guessed as Showtime and TS.
rebulk.regex(*build_source_pattern('TELESYNC', 'TS', suffix=optional(rip_suffix)),
value={'source': 'Telesync', 'other': 'Rip'})
value={'source': 'Telesync', 'other': 'Rip'}, tags=['video-codec-prefix'], overrides=["tags"])
rebulk.regex(*build_source_pattern('HD-?TELESYNC', 'HD-?TS', suffix=optional(rip_suffix)),
value={'source': 'HD Telesync', 'other': 'Rip'})
rebulk.regex(*build_source_pattern('WORKPRINT', 'WP'), value='Workprint')
Expand Down
31 changes: 31 additions & 0 deletions guessit/test/episodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4725,3 +4725,34 @@
container: mkv
mimetype: video/x-matroska
type: episode

? Mom.S06E08.Jell-O.Shots.and.the.Truth.About.Santa.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv
: title: Mom
season: 6
episode: 8
episode_title: Jell-O Shots and the Truth About Santa
screen_size: 1080p
streaming_service: Amazon Prime
source: Web
audio_codec: Dolby Digital Plus
audio_channels: '5.1'
video_codec: H.264
release_group: NTb
container: mkv
mimetype: video/x-matroska
type: episode

? Archer.2009.S12E05.Shots.720p.HULU.WEB-DL.DDP5.1.H.264-NOGRP
: title: Archer
year: 2009
season: 12
episode: 5
episode_title: Shots
screen_size: 720p
streaming_service: Hulu
source: Web
audio_codec: Dolby Digital Plus
audio_channels: '5.1'
video_codec: H.264
release_group: NOGRP
type: episode
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
with io.open(os.path.join(here, 'CHANGELOG.md'), encoding='utf-8') as f:
changelog = f.read()

install_requires = ['rebulk>=3', 'babelfish', 'python-dateutil', 'importlib-resources']
install_requires = ['rebulk>=3.1.0', 'babelfish', 'python-dateutil', 'importlib-resources']

setup_requires = ['pytest-runner']

Expand Down

0 comments on commit de85403

Please sign in to comment.