Skip to content

Commit

Permalink
feat(source): add support for LDRip and Laserdisc
Browse files Browse the repository at this point in the history
  • Loading branch information
plotski committed Dec 9, 2024
1 parent b145ae2 commit bb38185
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions guessit/rules/properties/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ def demote_other(match, other): # pylint: disable=unused-argument
rebulk.regex(*build_source_pattern('VIDEO-?TS', 'DVD-?R(?:$|(?!E))', # 'DVD-?R(?:$|^E)' => DVD-Real ...
'DVD-?9', 'DVD-?5'), value='DVD')

# LD also means "Line Dubbed", so we only interpret this as Laserdisc with a Rip suffix.
rebulk.regex(*build_source_pattern('LD', suffix=rip_suffix),
value={'source': 'LD', 'other': 'Rip'})
rebulk.regex(*build_source_pattern('laserdisc', suffix=optional(rip_suffix)),
value={'source': 'LD', 'other': 'Rip'})

rebulk.regex(*build_source_pattern('HD-?TV', suffix=optional(rip_suffix)), conflict_solver=demote_other,
value={'source': 'HDTV', 'other': 'Rip'})
rebulk.regex(*build_source_pattern('TV-?HD', suffix=rip_suffix), conflict_solver=demote_other,
Expand Down
15 changes: 15 additions & 0 deletions guessit/test/movies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,21 @@
release_group: MANTESH
type: movie

? Some.Title.1983.LDRip.x264
: title: Some Title
year: 1983
source: LD
other: Rip
video_codec: H.264
type: movie

? Some.Title.1983.Laserdisc.x264
: title: Some Title
year: 1983
source: LD
video_codec: H.264
type: movie

? Family.Katta.2016.1080p.WEB-DL.H263.DD5.1.ESub-DDR
: title: Family Katta
year: 2016
Expand Down

0 comments on commit bb38185

Please sign in to comment.