Fixes #433 and #516: Detecting sample, proof, obfuscated and repost as other properties

This commit is contained in:
Rato
2018-03-03 13:27:21 +01:00
parent 07f4e239c5
commit 9f90bc326c
5 changed files with 274 additions and 7 deletions
+4
View File
@@ -115,6 +115,10 @@ History
- Added `Digital Master` as new `source` possible value.
- Added several new values for `streaming_service`.
- Added new options `--includes` and `--excludes`.
- Added `Sample` as new `other` possible value.
- Added `Obfuscated` as new `other` possible value.
- Added `Proof` as new `other` possible value.
- Added `Repost` as new `other` possible value.
2.1.4 (2017-06-01)
------------------
+5 -5
View File
@@ -339,9 +339,9 @@ Other properties
- ``3D``, ``Audio Fixed``, ``Bonus``, ``BT.2020``, ``Classic``, ``Colorized``, ``Complete``, ``Converted``,
``Documentary``, ``Dolby Vision``, ``Dual Audio``, ``East Coast Feed``, ``Fan Subtitled``, ``Fast Subtitled``,
``Full HD``, ``Hardcoded Subtitles``, ``HD``, ``HDR10``, ``High Frame Rate``, ``High Quality``, ``High Resolution``,
``Internal``, ``Line Dubbed``, ``Line Audio``, ``Mic Dubbed``, ``Micro HD``, ``Mux``, ``NTSC``, ``Open Matte``,
``Original Aspect Ratio``, ``Original Video``, ``PAL``, ``Preair``, ``Proper``, ``PS Vita``, ``Read NFO``,
``Region 5``, ``Region C``, ``Reencoded``, ``Remux``, ``Retail``, ``Rip``, ``Screener``, ``SECAM``,
``Standard Dynamic Range``, ``Straight to Video``, ``Sync Fixed``, ``Trailer``, ``Ultra HD``, ``Upscaled``,
``West Coast Feed``, ``Widescreen``, ``XXX``
``Internal``, ``Line Dubbed``, ``Line Audio``, ``Mic Dubbed``, ``Micro HD``, ``Mux``, ``NTSC``, ``Obfuscated``,
``Open Matte``, ``Original Aspect Ratio``, ``Original Video``, ``PAL``, ``Preair``, ``Proof``, ``Proper``,
``PS Vita``, ``Read NFO``, ``Region 5``, ``Region C``, ``Reencoded``, ``Remux``, ``Repost``, ``Retail``, ``Rip``,
``Sample``, ``Screener``, ``SECAM``, ``Standard Dynamic Range``, ``Straight to Video``, ``Sync Fixed``, ``Trailer``,
``Ultra HD``, ``Upscaled``, ``West Coast Feed``, ``Widescreen``, ``XXX``
+25 -1
View File
@@ -117,9 +117,14 @@ def other():
rebulk.regex('Dolby-?Vision', value='Dolby Vision', tags='uhdbluray-neighbor')
rebulk.regex('BT-?2020', value='BT.2020', tags='uhdbluray-neighbor')
rebulk.string('Sample', value='Sample', tags=['at-end', 'not-a-release-group'])
rebulk.string('Proof', value='Proof', tags=['at-end', 'not-a-release-group'])
rebulk.string('Obfuscated', 'Scrambled', value='Obfuscated', tags=['at-end', 'not-a-release-group'])
rebulk.string('xpost', 'postbot', 'asrequested', value='Repost', tags='not-a-release-group')
rebulk.rules(RenameAnotherToOther, ValidateHasNeighbor, ValidateHasNeighborAfter, ValidateHasNeighborBefore,
ValidateScreenerRule, ValidateMuxRule, ValidateHardcodedSubs, ValidateStreamingServiceNeighbor,
ProperCountRule)
ValidateAtEnd, ProperCountRule)
return rebulk
@@ -315,3 +320,22 @@ class ValidateStreamingServiceNeighbor(Rule):
to_remove.append(match)
return to_remove
class ValidateAtEnd(Rule):
"""Validate other which should occur at the end of a filepart."""
priority = 32
consequence = RemoveMatch
def when(self, matches, context):
to_remove = []
for filepart in matches.markers.named('path'):
for match in matches.range(filepart.start, filepart.end,
predicate=lambda m: m.name == 'other' and 'at-end' in m.tags):
if (matches.holes(match.end, filepart.end, predicate=lambda m: m.value.strip(seps)) or
matches.range(match.end, filepart.end, predicate=lambda m: m.name not in (
'other', 'container'))):
to_remove.append(match)
return to_remove
+3 -1
View File
@@ -146,7 +146,9 @@ class DashSeparatedReleaseGroup(Rule):
end = container.start
candidate = matches.ending(end, index=0, predicate=(
lambda m: not m.private and '-' not in m.raw and m.raw.strip() == m.raw))
lambda m: not m.private and not (
m.name == 'other' and 'not-a-release-group' in m.tags
) and '-' not in m.raw and m.raw.strip() == m.raw))
if not candidate:
if at_end:
+237
View File
@@ -4250,3 +4250,240 @@
screen_size: 368p
release_group: Grp
type: episode
? wwiis.most.daring.raids.s01e04.storming.mussolinis.island.1080p.web.h.264-edhd-sample.mkv
: title: wwiis most daring raids
season: 1
episode: 4
episode_title: storming mussolinis island
screen_size: 1080p
source: Web
video_codec: H.264
release_group: edhd
other: Sample
container: mkv
type: episode
? WWIIs.Most.Daring.Raids.S01E04.Storming.Mussolinis.Island.1080p.WEB.h264-EDHD/wwiis.most.daring.raids.s01e04.storming.mussolinis.island.1080p.web.h.264-edhd-sample.mkv
: title: wwiis most daring raids
season: 1
episode: 4
episode_title: Storming Mussolinis Island
screen_size: 1080p
source: Web
video_codec: H.264
release_group: edhd
other: Sample
container: mkv
type: episode
? dcs.legends.of.tomorrow.s02e01.1080p.bluray.x264-rovers.proof
: title: dcs legends of tomorrow
season: 2
episode: 1
screen_size: 1080p
source: Blu-ray
video_codec: H.264
release_group: rovers
other: Proof
type: episode
? dcs.legends.of.tomorrow.s02e01.720p.bluray.x264-demand.sample.mkv
: title: dcs legends of tomorrow
season: 2
episode: 1
screen_size: 720p
source: Blu-ray
video_codec: H.264
release_group: demand
other: Sample
container: mkv
type: episode
? Season 06/e01.1080p.bluray.x264-wavey-obfuscated.mkv
: season: 6
episode: 1
screen_size: 1080p
source: Blu-ray
video_codec: H.264
title: wavey
other: Obfuscated
container: mkv
type: episode
? Hells.Kitchen.US.S17E08.1080p.HEVC.x265-MeGusta-Obfuscated/c48db7d2aeb040e8a920a9fd6effcbf4.mkv
: title: Hells Kitchen
country: US
season: 17
episode: 8
screen_size: 1080p
video_codec: H.265
release_group: MeGusta
other: Obfuscated
uuid: c48db7d2aeb040e8a920a9fd6effcbf4
container: mkv
type: episode
? Blue.Bloods.S08E09.1080p.HEVC.x265-MeGusta-Obfuscated/afaae96ae7a140e0981ced2a79221751.mkv
: title: Blue Bloods
season: 8
episode: 9
screen_size: 1080p
video_codec: H.265
release_group: MeGusta
other: Obfuscated
container: mkv
type: episode
? MacGyver.2016.S02E09.CD-ROM.and.Hoagie.Foil.1080p.AMZN.WEBRip.DDP5.1.x264-NTb-Scrambled/c329b27187d44a94b4a25b21502db552.mkv
: title: MacGyver
year: 2016
season: 2
episode: 9
screen_size: 1080p
streaming_service: Amazon Prime
source: Web
other: [Rip, Obfuscated]
audio_codec: Dolby Digital Plus
audio_channels: '5.1'
video_codec: H.264
release_group: NTb
uuid: c329b27187d44a94b4a25b21502db552
container: mkv
type: episode
? The.Late.Late.Show.with.James.Corden.2017.11.27.Armie.Hammer.Juno.Temple.Charlie.Puth.1080p.AMZN.WEB-DL.DDP2.0.H.264-monkee-Scrambled/42e7e8a48eb7454aaebebcf49705ce41.mkv
: title: The Late Late Show with James Corden
date: 2017-11-27
episode_title: Armie Hammer Juno Temple Charlie Puth
screen_size: 1080p
streaming_service: Amazon Prime
source: Web
audio_codec: Dolby Digital Plus
audio_channels: '2.0'
video_codec: H.264
release_group: monkee
other: Obfuscated
uuid: 42e7e8a48eb7454aaebebcf49705ce41
container: mkv
type: episode
? Educating Greater Manchester S01E07 720p HDTV x264-PLUTONiUM-AsRequested
: title: Educating Greater Manchester
season: 1
episode: 7
screen_size: 720p
source: HDTV
video_codec: H.264
release_group: PLUTONiUM
other: Repost
type: episode
? Im A Celebrity Get Me Out Of Here S17E14 HDTV x264-PLUTONiUM-xpost
: title: Im A Celebrity Get Me Out Of Here
season: 17
episode: 14
source: HDTV
video_codec: H.264
release_group: PLUTONiUM
other: Repost
type: episode
? Tales S01E08 All I Need Method Man Featuring Mary J Blige 720p BET WEBRip AAC2 0 x264-RTN-xpost
: title: Tales
season: 1
episode: 8
episode_title: All I Need Method Man Featuring Mary J Blige
screen_size: 720p
source: Web
other: [Rip, Repost]
audio_codec: AAC
audio_channels: '2.0'
video_codec: H.264
release_group: RTN
type: episode
? This is Us S01E11 Herzensangelegenheiten German DL WS DVDRip x264-CDP-xpost
: options: --exclude country
title: This is Us
season: 1
episode: 11
episode_title: Herzensangelegenheiten
language:
- de
- mul
other:
- Widescreen
- Rip
- Repost
source: DVD
video_codec: H.264
release_group: CDP
type: episode
? The Girlfriend Experience S02E10 1080p WEB H264-STRiFE-postbot
: title: The Girlfriend Experience
season: 2
episode: 10
screen_size: 1080p
source: Web
video_codec: H.264
release_group: STRiFE
other: Repost
type: episode
? The.Girlfriend.Experience.S02E10.1080p.WEB.H264-STRiFE-postbot/90550c1adaf44c47b60d24f59603bb98.mkv
: title: The Girlfriend Experience
season: 2
episode: 10
screen_size: 1080p
source: Web
video_codec: H.264
release_group: STRiFE
other: Repost
uuid: 90550c1adaf44c47b60d24f59603bb98
container: mkv
type: episode
? 24.S01E02.1080p.BluRay.REMUX.AVC.DD.2.0-EPSiLON-xpost/eb518eaf33f641a1a8c6e0973a67aec2.mkv
: title: '24'
season: 1
episode: 2
screen_size: 1080p
source: Blu-ray
other: [Remux, Repost]
video_codec: H.264
audio_codec: Dolby Digital
audio_channels: '2.0'
release_group: EPSiLON
uuid: eb518eaf33f641a1a8c6e0973a67aec2
container: mkv
type: episode
? Educating.Greater.Manchester.S01E02.720p.HDTV.x264-PLUTONiUM-AsRequested/47fbcb2393aa4b5cbbb340d3173ca1a9.mkv
: title: Educating Greater Manchester
season: 1
episode: 2
screen_size: 720p
source: HDTV
video_codec: H.264
release_group: PLUTONiUM
other: Repost
uuid: 47fbcb2393aa4b5cbbb340d3173ca1a9
container: mkv
type: episode
? Stranger.Things.S02E05.Chapter.Five.Dig.Dug.720p.NF.WEBRip.DD5.1.x264-PSYPHER-AsRequested-Obfuscated
: title: Stranger Things
season: 2
episode: 5
episode_title: Chapter Five Dig Dug
screen_size: 720p
streaming_service: Netflix
source: Web
other: [Rip, Repost, Obfuscated]
audio_codec: Dolby Digital
audio_channels: '5.1'
video_codec: H.264
release_group: PSYPHER
type: episode