diff --git a/guessit/rules/properties/source.py b/guessit/rules/properties/source.py index 610729f9..4ee40f05 100644 --- a/guessit/rules/properties/source.py +++ b/guessit/rules/properties/source.py @@ -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, diff --git a/guessit/test/movies.yml b/guessit/test/movies.yml index 12f0c57f..83bfc9d0 100644 --- a/guessit/test/movies.yml +++ b/guessit/test/movies.yml @@ -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