test
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name
|
||||
@@ -1 +0,0 @@
|
||||
Not a configuration file
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"expected_title": ["The 100", "OSS 117"],
|
||||
"yaml": false
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
expected_title:
|
||||
- The 100
|
||||
- OSS 117
|
||||
yaml: True
|
||||
@@ -1,4 +0,0 @@
|
||||
expected_title:
|
||||
- The 100
|
||||
- OSS 117
|
||||
yaml: True
|
||||
@@ -1,335 +0,0 @@
|
||||
? vorbis
|
||||
: options: --exclude audio_codec
|
||||
-audio_codec: Vorbis
|
||||
|
||||
? DTS-ES
|
||||
: options: --exclude audio_profile
|
||||
audio_codec: DTS
|
||||
-audio_profile: Extended Surround
|
||||
|
||||
? DTS.ES
|
||||
: options: --include audio_codec
|
||||
audio_codec: DTS
|
||||
-audio_profile: Extended Surround
|
||||
|
||||
? 5.1
|
||||
? 5ch
|
||||
? 6ch
|
||||
: options: --exclude audio_channels
|
||||
-audio_channels: '5.1'
|
||||
|
||||
? Movie Title-x01-Other Title.mkv
|
||||
? Movie Title-x01-Other Title
|
||||
? directory/Movie Title-x01-Other Title/file.mkv
|
||||
: options: --exclude bonus
|
||||
-bonus: 1
|
||||
-bonus_title: Other Title
|
||||
|
||||
? Title-x02-Bonus Title.mkv
|
||||
: options: --include bonus
|
||||
bonus: 2
|
||||
-bonus_title: Other Title
|
||||
|
||||
? cd 1of3
|
||||
: options: --exclude cd
|
||||
-cd: 1
|
||||
-cd_count: 3
|
||||
|
||||
? This.is.Us
|
||||
: options: --exclude country
|
||||
title: This is Us
|
||||
-country: US
|
||||
|
||||
? 2015.01.31
|
||||
: options: --exclude date
|
||||
year: 2015
|
||||
-date: 2015-01-31
|
||||
|
||||
? Something 2 mar 2013)
|
||||
: options: --exclude date
|
||||
-date: 2013-03-02
|
||||
|
||||
? 2012 2009 S01E02 2015 # If no year is marked, the second one is guessed.
|
||||
: options: --exclude year
|
||||
-year: 2009
|
||||
|
||||
? Director's cut
|
||||
: options: --exclude edition
|
||||
-edition: Director's Cut
|
||||
|
||||
? 2x5
|
||||
? 2X5
|
||||
? 02x05
|
||||
? 2X05
|
||||
? 02x5
|
||||
? S02E05
|
||||
? s02e05
|
||||
? s02e5
|
||||
? s2e05
|
||||
? s02ep05
|
||||
? s2EP5
|
||||
: options: --exclude season
|
||||
-season: 2
|
||||
-episode: 5
|
||||
|
||||
? 2x6
|
||||
? 2X6
|
||||
? 02x06
|
||||
? 2X06
|
||||
? 02x6
|
||||
? S02E06
|
||||
? s02e06
|
||||
? s02e6
|
||||
? s2e06
|
||||
? s02ep06
|
||||
? s2EP6
|
||||
: options: --exclude episode
|
||||
-season: 2
|
||||
-episode: 6
|
||||
|
||||
? serie Season 2 other
|
||||
: options: --exclude season
|
||||
-season: 2
|
||||
|
||||
? Some Dummy Directory/S02 Some Series/E01-Episode title.mkv
|
||||
: options: --exclude episode_title
|
||||
-episode_title: Episode title
|
||||
season: 2
|
||||
episode: 1
|
||||
|
||||
? Another Dummy Directory/S02 Some Series/E01-Episode title.mkv
|
||||
: options: --include season --include episode
|
||||
-episode_title: Episode title
|
||||
season: 2
|
||||
episode: 1
|
||||
|
||||
# pattern contains season and episode: it wont work enabling only one
|
||||
? Some Series S03E01E02
|
||||
: options: --include episode
|
||||
-season: 3
|
||||
-episode: [1, 2]
|
||||
|
||||
# pattern contains season and episode: it wont work enabling only one
|
||||
? Another Series S04E01E02
|
||||
: options: --include season
|
||||
-season: 4
|
||||
-episode: [1, 2]
|
||||
|
||||
? Show.Name.Season.4.Episode.1
|
||||
: options: --include episode
|
||||
-season: 4
|
||||
episode: 1
|
||||
|
||||
? Another.Show.Name.Season.4.Episode.1
|
||||
: options: --include season
|
||||
season: 4
|
||||
-episode: 1
|
||||
|
||||
? Some Series S01 02 03
|
||||
: options: --exclude season
|
||||
-season: [1, 2, 3]
|
||||
|
||||
? Some Series E01 02 04
|
||||
: options: --exclude episode
|
||||
-episode: [1, 2, 4]
|
||||
|
||||
? A very special episode s06 special
|
||||
: options: -t episode --exclude episode_details
|
||||
season: 6
|
||||
-episode_details: Special
|
||||
|
||||
? S01D02.3-5-GROUP
|
||||
: options: --exclude disc
|
||||
-season: 1
|
||||
-disc: [2, 3, 4, 5]
|
||||
-episode: [2, 3, 4, 5]
|
||||
|
||||
? S01D02&4-6&8
|
||||
: options: --exclude season
|
||||
-season: 1
|
||||
-disc: [2, 4, 5, 6, 8]
|
||||
-episode: [2, 4, 5, 6, 8]
|
||||
|
||||
? Film Title-f01-Series Title.mkv
|
||||
: options: --exclude film
|
||||
-film: 1
|
||||
-film_title: Film Title
|
||||
|
||||
? Another Film Title-f01-Series Title.mkv
|
||||
: options: --exclude film_title
|
||||
film: 1
|
||||
-film_title: Film Title
|
||||
|
||||
? English
|
||||
? .ENG.
|
||||
: options: --exclude language
|
||||
-language: English
|
||||
|
||||
? SubFrench
|
||||
? SubFr
|
||||
? STFr
|
||||
: options: --exclude subtitle_language
|
||||
-language: French
|
||||
-subtitle_language: French
|
||||
|
||||
? ST.FR
|
||||
: options: --exclude subtitle_language
|
||||
language: French
|
||||
-subtitle_language: French
|
||||
|
||||
? ENG.-.sub.FR
|
||||
? ENG.-.FR Sub
|
||||
: options: --include language
|
||||
language: [English, French]
|
||||
-subtitle_language: French
|
||||
|
||||
? ENG.-.SubFR
|
||||
: options: --include language
|
||||
language: English
|
||||
-subtitle_language: French
|
||||
|
||||
? ENG.-.FRSUB
|
||||
? ENG.-.FRSUBS
|
||||
? ENG.-.FR-SUBS
|
||||
: options: --include subtitle_language
|
||||
-language: English
|
||||
subtitle_language: French
|
||||
|
||||
? DVD.Real.XViD
|
||||
? DVD.fix.XViD
|
||||
: options: --exclude other
|
||||
-other: Fix
|
||||
-proper_count: 1
|
||||
|
||||
? Part 3
|
||||
? Part III
|
||||
? Part Three
|
||||
? Part Trois
|
||||
? Part3
|
||||
: options: --exclude part
|
||||
-part: 3
|
||||
|
||||
? Some.Title.XViD-by.Artik[SEDG].avi
|
||||
: options: --exclude release_group
|
||||
-release_group: Artik[SEDG]
|
||||
|
||||
? "[ABC] Some.Title.avi"
|
||||
? some/folder/[ABC]Some.Title.avi
|
||||
: options: --exclude release_group
|
||||
-release_group: ABC
|
||||
|
||||
? 360p
|
||||
? 360px
|
||||
? "360"
|
||||
? +500x360
|
||||
: options: --exclude screen_size
|
||||
-screen_size: 360p
|
||||
|
||||
? 640x360
|
||||
: options: --exclude aspect_ratio
|
||||
screen_size: 360p
|
||||
-aspect_ratio: 1.778
|
||||
|
||||
? 8196x4320
|
||||
: options: --exclude screen_size
|
||||
-screen_size: 4320p
|
||||
-aspect_ratio: 1.897
|
||||
|
||||
? 4.3gb
|
||||
: options: --exclude size
|
||||
-size: 4.3GB
|
||||
|
||||
? VhS_rip
|
||||
? VHS.RIP
|
||||
: options: --exclude source
|
||||
-source: VHS
|
||||
-other: Rip
|
||||
|
||||
? DVD.RIP
|
||||
: options: --include other
|
||||
-source: DVD
|
||||
-other: Rip
|
||||
|
||||
? Title Only.avi
|
||||
: options: --exclude title
|
||||
-title: Title Only
|
||||
|
||||
? h265
|
||||
? x265
|
||||
? h.265
|
||||
? x.265
|
||||
? hevc
|
||||
: options: --exclude video_codec
|
||||
-video_codec: H.265
|
||||
|
||||
? hevc10
|
||||
: options: --include color_depth
|
||||
-video_codec: H.265
|
||||
-color_depth: 10-bit
|
||||
|
||||
? HEVC-YUV420P10
|
||||
: options: --include color_depth
|
||||
-video_codec: H.265
|
||||
color_depth: 10-bit
|
||||
|
||||
? h265-HP
|
||||
: options: --exclude video_profile
|
||||
video_codec: H.265
|
||||
-video_profile: High
|
||||
|
||||
? House.of.Cards.2013.S02E03.1080p.NF.WEBRip.DD5.1.x264-NTb.mkv
|
||||
? House.of.Cards.2013.S02E03.1080p.Netflix.WEBRip.DD5.1.x264-NTb.mkv
|
||||
: options: --exclude streaming_service
|
||||
-streaming_service: Netflix
|
||||
|
||||
? wawa.co.uk
|
||||
: options: --exclude website
|
||||
-website: wawa.co.uk
|
||||
|
||||
? movie.mp4
|
||||
: options: --exclude mimetype
|
||||
-mimetype: video/mp4
|
||||
|
||||
? another movie.mkv
|
||||
: options: --exclude container
|
||||
-container: mkv
|
||||
|
||||
? series s02e01
|
||||
: options: --exclude type
|
||||
-type: episode
|
||||
|
||||
? series s02e01
|
||||
: options: --exclude type
|
||||
-type: episode
|
||||
|
||||
? Hotel.Hell.S01E01.720p.DD5.1.448kbps-ALANiS
|
||||
: options: --exclude audio_bit_rate
|
||||
-audio_bit_rate: 448Kbps
|
||||
|
||||
? Katy Perry - Pepsi & Billboard Summer Beats Concert Series 2012 1080i HDTV 20 Mbps DD2.0 MPEG2-TrollHD.ts
|
||||
: options: --exclude video_bit_rate
|
||||
-video_bit_rate: 20Mbps
|
||||
|
||||
? "[Figmentos] Monster 34 - At the End of Darkness [781219F1].mkv"
|
||||
: options: --exclude crc32
|
||||
-crc32: 781219F1
|
||||
|
||||
? 1080p25
|
||||
: options: --exclude frame_rate
|
||||
screen_size: 1080p
|
||||
-frame_rate: 25fps
|
||||
|
||||
? 1080p25
|
||||
: options: --exclude screen_size
|
||||
-screen_size: 1080p
|
||||
-frame_rate: 25fps
|
||||
|
||||
? 1080p25
|
||||
: options: --include frame_rate
|
||||
-screen_size: 1080p
|
||||
-frame_rate: 25fps
|
||||
|
||||
? 1080p 30fps
|
||||
: options: --exclude screen_size
|
||||
-screen_size: 1080p
|
||||
frame_rate: 30fps
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name
|
||||
@@ -1,134 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use $ marker to check inputs that should not match results.
|
||||
|
||||
|
||||
? +MP3
|
||||
? +lame
|
||||
? +lame3.12
|
||||
? +lame3.100
|
||||
: audio_codec: MP3
|
||||
|
||||
? +MP2
|
||||
: audio_codec: MP2
|
||||
|
||||
? +DolbyDigital
|
||||
? +DD
|
||||
? +Dolby Digital
|
||||
? +AC3
|
||||
: audio_codec: Dolby Digital
|
||||
|
||||
? +DDP
|
||||
? +DD+
|
||||
? +EAC3
|
||||
: audio_codec: Dolby Digital Plus
|
||||
|
||||
? +DolbyAtmos
|
||||
? +Dolby Atmos
|
||||
? +Atmos
|
||||
? -Atmosphere
|
||||
: audio_codec: Dolby Atmos
|
||||
|
||||
? +AAC
|
||||
: audio_codec: AAC
|
||||
|
||||
? +Flac
|
||||
: audio_codec: FLAC
|
||||
|
||||
? +DTS
|
||||
: audio_codec: DTS
|
||||
|
||||
? +True-HD
|
||||
? +trueHD
|
||||
: audio_codec: Dolby TrueHD
|
||||
|
||||
? +True-HD51
|
||||
? +trueHD51
|
||||
: audio_codec: Dolby TrueHD
|
||||
audio_channels: '5.1'
|
||||
|
||||
? +DTSHD
|
||||
? +DTS HD
|
||||
? +DTS-HD
|
||||
: audio_codec: DTS-HD
|
||||
|
||||
? +DTS-HDma
|
||||
? +DTSMA
|
||||
: audio_codec: DTS-HD
|
||||
audio_profile: Master Audio
|
||||
|
||||
? +AC3-hq
|
||||
: audio_codec: Dolby Digital
|
||||
audio_profile: High Quality
|
||||
|
||||
? +AAC-HE
|
||||
: audio_codec: AAC
|
||||
audio_profile: High Efficiency
|
||||
|
||||
? +AAC-LC
|
||||
: audio_codec: AAC
|
||||
audio_profile: Low Complexity
|
||||
|
||||
? +AAC2.0
|
||||
? +AAC20
|
||||
: audio_codec: AAC
|
||||
audio_channels: '2.0'
|
||||
|
||||
? +7.1
|
||||
? +7ch
|
||||
? +8ch
|
||||
: audio_channels: '7.1'
|
||||
|
||||
? +5.1
|
||||
? +5ch
|
||||
? +6ch
|
||||
: audio_channels: '5.1'
|
||||
|
||||
? +2ch
|
||||
? +2.0
|
||||
? +stereo
|
||||
: audio_channels: '2.0'
|
||||
|
||||
? +1ch
|
||||
? +mono
|
||||
: audio_channels: '1.0'
|
||||
|
||||
? DD5.1
|
||||
? DD51
|
||||
: audio_codec: Dolby Digital
|
||||
audio_channels: '5.1'
|
||||
|
||||
? -51
|
||||
: audio_channels: '5.1'
|
||||
|
||||
? DTS-HD.HRA
|
||||
? DTSHD.HRA
|
||||
? DTS-HD.HR
|
||||
? DTSHD.HR
|
||||
? -HRA
|
||||
? -HR
|
||||
: audio_codec: DTS-HD
|
||||
audio_profile: High Resolution Audio
|
||||
|
||||
? DTSES
|
||||
? DTS-ES
|
||||
? -ES
|
||||
: audio_codec: DTS
|
||||
audio_profile: Extended Surround
|
||||
|
||||
? DD-EX
|
||||
? DDEX
|
||||
? -EX
|
||||
: audio_codec: Dolby Digital
|
||||
audio_profile: EX
|
||||
|
||||
? OPUS
|
||||
: audio_codec: Opus
|
||||
|
||||
? Vorbis
|
||||
: audio_codec: Vorbis
|
||||
|
||||
? PCM
|
||||
: audio_codec: PCM
|
||||
|
||||
? LPCM
|
||||
: audio_codec: LPCM
|
||||
@@ -1,9 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? Movie Title-x01-Other Title.mkv
|
||||
? Movie Title-x01-Other Title
|
||||
? directory/Movie Title-x01-Other Title/file.mkv
|
||||
: title: Movie Title
|
||||
bonus_title: Other Title
|
||||
bonus: 1
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? cd 1of3
|
||||
: cd: 1
|
||||
cd_count: 3
|
||||
|
||||
? Some.Title-DVDRIP-x264-CDP
|
||||
: cd: !!null
|
||||
release_group: CDP
|
||||
video_codec: H.264
|
||||
@@ -1,467 +0,0 @@
|
||||
? is
|
||||
: title: is
|
||||
|
||||
? it
|
||||
: title: it
|
||||
|
||||
? am
|
||||
: title: am
|
||||
|
||||
? mad
|
||||
: title: mad
|
||||
|
||||
? men
|
||||
: title: men
|
||||
|
||||
? man
|
||||
: title: man
|
||||
|
||||
? run
|
||||
: title: run
|
||||
|
||||
? sin
|
||||
: title: sin
|
||||
|
||||
? st
|
||||
: title: st
|
||||
|
||||
? to
|
||||
: title: to
|
||||
|
||||
? 'no'
|
||||
: title: 'no'
|
||||
|
||||
? non
|
||||
: title: non
|
||||
|
||||
? war
|
||||
: title: war
|
||||
|
||||
? min
|
||||
: title: min
|
||||
|
||||
? new
|
||||
: title: new
|
||||
|
||||
? car
|
||||
: title: car
|
||||
|
||||
? day
|
||||
: title: day
|
||||
|
||||
? bad
|
||||
: title: bad
|
||||
|
||||
? bat
|
||||
: title: bat
|
||||
|
||||
? fan
|
||||
: title: fan
|
||||
|
||||
? fry
|
||||
: title: fry
|
||||
|
||||
? cop
|
||||
: title: cop
|
||||
|
||||
? zen
|
||||
: title: zen
|
||||
|
||||
? gay
|
||||
: title: gay
|
||||
|
||||
? fat
|
||||
: title: fat
|
||||
|
||||
? one
|
||||
: title: one
|
||||
|
||||
? cherokee
|
||||
: title: cherokee
|
||||
|
||||
? got
|
||||
: title: got
|
||||
|
||||
? an
|
||||
: title: an
|
||||
|
||||
? as
|
||||
: title: as
|
||||
|
||||
? cat
|
||||
: title: cat
|
||||
|
||||
? her
|
||||
: title: her
|
||||
|
||||
? be
|
||||
: title: be
|
||||
|
||||
? hat
|
||||
: title: hat
|
||||
|
||||
? sun
|
||||
: title: sun
|
||||
|
||||
? may
|
||||
: title: may
|
||||
|
||||
? my
|
||||
: title: my
|
||||
|
||||
? mr
|
||||
: title: mr
|
||||
|
||||
? rum
|
||||
: title: rum
|
||||
|
||||
? pi
|
||||
: title: pi
|
||||
|
||||
? bb
|
||||
: title: bb
|
||||
|
||||
? bt
|
||||
: title: bt
|
||||
|
||||
? tv
|
||||
: title: tv
|
||||
|
||||
? aw
|
||||
: title: aw
|
||||
|
||||
? by
|
||||
: title: by
|
||||
|
||||
? md
|
||||
: other: Mic Dubbed
|
||||
|
||||
? mp
|
||||
: title: mp
|
||||
|
||||
? cd
|
||||
: title: cd
|
||||
|
||||
? in
|
||||
: title: in
|
||||
|
||||
? ad
|
||||
: title: ad
|
||||
|
||||
? ice
|
||||
: title: ice
|
||||
|
||||
? ay
|
||||
: title: ay
|
||||
|
||||
? at
|
||||
: title: at
|
||||
|
||||
? star
|
||||
: title: star
|
||||
|
||||
? so
|
||||
: title: so
|
||||
|
||||
? he
|
||||
: title: he
|
||||
|
||||
? do
|
||||
: title: do
|
||||
|
||||
? ax
|
||||
: title: ax
|
||||
|
||||
? mx
|
||||
: title: mx
|
||||
|
||||
? bas
|
||||
: title: bas
|
||||
|
||||
? de
|
||||
: title: de
|
||||
|
||||
? le
|
||||
: title: le
|
||||
|
||||
? son
|
||||
: title: son
|
||||
|
||||
? ne
|
||||
: title: ne
|
||||
|
||||
? ca
|
||||
: title: ca
|
||||
|
||||
? ce
|
||||
: title: ce
|
||||
|
||||
? et
|
||||
: title: et
|
||||
|
||||
? que
|
||||
: title: que
|
||||
|
||||
? mal
|
||||
: title: mal
|
||||
|
||||
? est
|
||||
: title: est
|
||||
|
||||
? vol
|
||||
: title: vol
|
||||
|
||||
? or
|
||||
: title: or
|
||||
|
||||
? mon
|
||||
: title: mon
|
||||
|
||||
? se
|
||||
: title: se
|
||||
|
||||
? je
|
||||
: title: je
|
||||
|
||||
? tu
|
||||
: title: tu
|
||||
|
||||
? me
|
||||
: title: me
|
||||
|
||||
? ma
|
||||
: title: ma
|
||||
|
||||
? va
|
||||
: title: va
|
||||
|
||||
? au
|
||||
: country: AU
|
||||
|
||||
? lu
|
||||
: title: lu
|
||||
|
||||
? wa
|
||||
: title: wa
|
||||
|
||||
? ga
|
||||
: title: ga
|
||||
|
||||
? ao
|
||||
: title: ao
|
||||
|
||||
? la
|
||||
: title: la
|
||||
|
||||
? el
|
||||
: title: el
|
||||
|
||||
? del
|
||||
: title: del
|
||||
|
||||
? por
|
||||
: title: por
|
||||
|
||||
? mar
|
||||
: title: mar
|
||||
|
||||
? al
|
||||
: title: al
|
||||
|
||||
? un
|
||||
: title: un
|
||||
|
||||
? ind
|
||||
: title: ind
|
||||
|
||||
? arw
|
||||
: title: arw
|
||||
|
||||
? ts
|
||||
: source: Telesync
|
||||
|
||||
? ii
|
||||
: title: ii
|
||||
|
||||
? bin
|
||||
: title: bin
|
||||
|
||||
? chan
|
||||
: title: chan
|
||||
|
||||
? ss
|
||||
: title: ss
|
||||
|
||||
? san
|
||||
: title: san
|
||||
|
||||
? oss
|
||||
: title: oss
|
||||
|
||||
? iii
|
||||
: title: iii
|
||||
|
||||
? vi
|
||||
: title: vi
|
||||
|
||||
? ben
|
||||
: title: ben
|
||||
|
||||
? da
|
||||
: title: da
|
||||
|
||||
? lt
|
||||
: title: lt
|
||||
|
||||
? ch
|
||||
: title: ch
|
||||
|
||||
? sr
|
||||
: title: sr
|
||||
|
||||
? ps
|
||||
: title: ps
|
||||
|
||||
? cx
|
||||
: title: cx
|
||||
|
||||
? vo
|
||||
: title: vo
|
||||
|
||||
? mkv
|
||||
: container: mkv
|
||||
|
||||
? avi
|
||||
: container: avi
|
||||
|
||||
? dmd
|
||||
: title: dmd
|
||||
|
||||
? the
|
||||
: title: the
|
||||
|
||||
? dis
|
||||
: title: dis
|
||||
|
||||
? cut
|
||||
: title: cut
|
||||
|
||||
? stv
|
||||
: title: stv
|
||||
|
||||
? des
|
||||
: title: des
|
||||
|
||||
? dia
|
||||
: title: dia
|
||||
|
||||
? and
|
||||
: title: and
|
||||
|
||||
? cab
|
||||
: title: cab
|
||||
|
||||
? sub
|
||||
: title: sub
|
||||
|
||||
? mia
|
||||
: title: mia
|
||||
|
||||
? rim
|
||||
: title: rim
|
||||
|
||||
? las
|
||||
: title: las
|
||||
|
||||
? une
|
||||
: title: une
|
||||
|
||||
? par
|
||||
: title: par
|
||||
|
||||
? srt
|
||||
: container: srt
|
||||
|
||||
? ano
|
||||
: title: ano
|
||||
|
||||
? toy
|
||||
: title: toy
|
||||
|
||||
? job
|
||||
: title: job
|
||||
|
||||
? gag
|
||||
: title: gag
|
||||
|
||||
? reel
|
||||
: title: reel
|
||||
|
||||
? www
|
||||
: title: www
|
||||
|
||||
? for
|
||||
: title: for
|
||||
|
||||
? ayu
|
||||
: title: ayu
|
||||
|
||||
? csi
|
||||
: title: csi
|
||||
|
||||
? ren
|
||||
: title: ren
|
||||
|
||||
? moi
|
||||
: title: moi
|
||||
|
||||
? sur
|
||||
: title: sur
|
||||
|
||||
? fer
|
||||
: title: fer
|
||||
|
||||
? fun
|
||||
: title: fun
|
||||
|
||||
? two
|
||||
: title: two
|
||||
|
||||
? big
|
||||
: title: big
|
||||
|
||||
? psy
|
||||
: title: psy
|
||||
|
||||
? air
|
||||
: title: air
|
||||
|
||||
? brazil
|
||||
: title: brazil
|
||||
|
||||
? jordan
|
||||
: title: jordan
|
||||
|
||||
? bs
|
||||
: title: bs
|
||||
|
||||
? kz
|
||||
: title: kz
|
||||
|
||||
? gt
|
||||
: title: gt
|
||||
|
||||
? im
|
||||
: title: im
|
||||
|
||||
? pt
|
||||
: language: pt
|
||||
|
||||
? scr
|
||||
: title: scr
|
||||
|
||||
? sd
|
||||
: title: sd
|
||||
|
||||
? hr
|
||||
: other: High Resolution
|
||||
@@ -1,13 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use $ marker to check inputs that should not match results.
|
||||
? Us.this.is.title
|
||||
? this.is.title.US
|
||||
: country: US
|
||||
title: this is title
|
||||
|
||||
? This.is.Us
|
||||
: title: This is Us
|
||||
|
||||
? This.Is.Us
|
||||
: options: --no-default-config
|
||||
title: This Is Us
|
||||
@@ -1,50 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? +09.03.08
|
||||
? +09.03.2008
|
||||
? +2008.03.09
|
||||
: date: 2008-03-09
|
||||
|
||||
? +31.01.15
|
||||
? +31.01.2015
|
||||
? +15.01.31
|
||||
? +2015.01.31
|
||||
: date: 2015-01-31
|
||||
|
||||
? +01.02.03
|
||||
: date: 2003-02-01
|
||||
|
||||
? +01.02.03
|
||||
: options: --date-year-first
|
||||
date: 2001-02-03
|
||||
|
||||
? +01.02.03
|
||||
: options: --date-day-first
|
||||
date: 2003-02-01
|
||||
|
||||
? 1919
|
||||
? 2030
|
||||
: !!map {}
|
||||
|
||||
? 2029
|
||||
: year: 2029
|
||||
|
||||
? (1920)
|
||||
: year: 1920
|
||||
|
||||
? 2012
|
||||
: year: 2012
|
||||
|
||||
? 2011 2013 (2012) (2015) # first marked year is guessed.
|
||||
: title: "2011 2013"
|
||||
year: 2012
|
||||
|
||||
? 2012 2009 S01E02 2015 # If no year is marked, the second one is guessed.
|
||||
: title: "2012"
|
||||
year: 2009
|
||||
episode_title: "2015"
|
||||
|
||||
? Something 2 mar 2013)
|
||||
: title: Something
|
||||
date: 2013-03-02
|
||||
type: episode
|
||||
@@ -1,63 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? Director's cut
|
||||
? Edition Director's cut
|
||||
: edition: Director's Cut
|
||||
|
||||
? Collector
|
||||
? Collector Edition
|
||||
? Edition Collector
|
||||
: edition: Collector
|
||||
|
||||
? Special Edition
|
||||
? Edition Special
|
||||
? -Special
|
||||
: edition: Special
|
||||
|
||||
? Criterion Edition
|
||||
? Edition Criterion
|
||||
? CC
|
||||
? -Criterion
|
||||
: edition: Criterion
|
||||
|
||||
? Deluxe
|
||||
? Deluxe Edition
|
||||
? Edition Deluxe
|
||||
: edition: Deluxe
|
||||
|
||||
? Super Movie Alternate XViD
|
||||
? Super Movie Alternative XViD
|
||||
? Super Movie Alternate Cut XViD
|
||||
? Super Movie Alternative Cut XViD
|
||||
: edition: Alternative Cut
|
||||
|
||||
? ddc
|
||||
: edition: Director's Definitive Cut
|
||||
|
||||
? IMAX
|
||||
? IMAX Edition
|
||||
: edition: IMAX
|
||||
|
||||
? ultimate edition
|
||||
? -ultimate
|
||||
: edition: Ultimate
|
||||
|
||||
? ultimate collector edition
|
||||
? ultimate collector's edition
|
||||
? ultimate collectors edition
|
||||
? -collectors edition
|
||||
? -ultimate edition
|
||||
: edition: [Ultimate, Collector]
|
||||
|
||||
? ultimate collectors edition dc
|
||||
: edition: [Ultimate, Collector, Director's Cut]
|
||||
|
||||
? fan edit
|
||||
? fan edition
|
||||
? fan collection
|
||||
: edition: Fan
|
||||
|
||||
? ultimate fan edit
|
||||
? ultimate fan edition
|
||||
? ultimate fan collection
|
||||
: edition: [Ultimate, Fan]
|
||||
@@ -1,331 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use $ marker to check inputs that should not match results.
|
||||
? +2x5
|
||||
? +2X5
|
||||
? +02x05
|
||||
? +2X05
|
||||
? +02x5
|
||||
? S02E05
|
||||
? s02e05
|
||||
? s02e5
|
||||
? s2e05
|
||||
? s02ep05
|
||||
? s2EP5
|
||||
? -s03e05
|
||||
? -s02e06
|
||||
? -3x05
|
||||
? -2x06
|
||||
: season: 2
|
||||
episode: 5
|
||||
|
||||
? "+0102"
|
||||
? "+102"
|
||||
: season: 1
|
||||
episode: 2
|
||||
|
||||
? "0102 S03E04"
|
||||
? "S03E04 102"
|
||||
: season: 3
|
||||
episode: 4
|
||||
|
||||
? +serie Saison 2 other
|
||||
? +serie Season 2 other
|
||||
? +serie Saisons 2 other
|
||||
? +serie Seasons 2 other
|
||||
? +serie Season Two other
|
||||
? +serie Season II other
|
||||
: season: 2
|
||||
|
||||
? Some Series.S02E01.Episode.title.mkv
|
||||
? Some Series/Season 02/E01-Episode title.mkv
|
||||
? Some Series/Season 02/Some Series-E01-Episode title.mkv
|
||||
? Some Dummy Directory/Season 02/Some Series-E01-Episode title.mkv
|
||||
? -Some Dummy Directory/Season 02/E01-Episode title.mkv
|
||||
? Some Series/Unsafe Season 02/Some Series-E01-Episode title.mkv
|
||||
? -Some Series/Unsafe Season 02/E01-Episode title.mkv
|
||||
? Some Series/Season 02/E01-Episode title.mkv
|
||||
? Some Series/ Season 02/E01-Episode title.mkv
|
||||
? Some Dummy Directory/Some Series S02/E01-Episode title.mkv
|
||||
? Some Dummy Directory/S02 Some Series/E01-Episode title.mkv
|
||||
: title: Some Series
|
||||
episode_title: Episode title
|
||||
season: 2
|
||||
episode: 1
|
||||
|
||||
? Some Series.S02E01.mkv
|
||||
? Some Series/Season 02/E01.mkv
|
||||
? Some Series/Season 02/Some Series-E01.mkv
|
||||
? Some Dummy Directory/Season 02/Some Series-E01.mkv
|
||||
? -Some Dummy Directory/Season 02/E01.mkv
|
||||
? Some Series/Unsafe Season 02/Some Series-E01.mkv
|
||||
? -Some Series/Unsafe Season 02/E01.mkv
|
||||
? Some Series/Season 02/E01.mkv
|
||||
? Some Series/ Season 02/E01.mkv
|
||||
? Some Dummy Directory/Some Series S02/E01-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.mkv
|
||||
: title: Some Series
|
||||
season: 2
|
||||
episode: 1
|
||||
|
||||
? Some Series S03E01E02
|
||||
: title: Some Series
|
||||
season: 3
|
||||
episode: [1, 2]
|
||||
|
||||
? Some Series S01S02S03
|
||||
? Some Series S01-02-03
|
||||
? Some Series S01 S02 S03
|
||||
? Some Series S01 02 03
|
||||
: title: Some Series
|
||||
season: [1, 2, 3]
|
||||
|
||||
? Some Series E01E02E03
|
||||
? Some Series E01-02-03
|
||||
? Some Series E01-03
|
||||
? Some Series E01 E02 E03
|
||||
? Some Series E01 02 03
|
||||
: title: Some Series
|
||||
episode: [1, 2, 3]
|
||||
|
||||
? Some Series E01E02E04
|
||||
? Some Series E01 E02 E04
|
||||
? Some Series E01 02 04
|
||||
: title: Some Series
|
||||
episode: [1, 2, 4]
|
||||
|
||||
? Some Series E01-02-04
|
||||
? Some Series E01-04
|
||||
? Some Series E01-04
|
||||
: title: Some Series
|
||||
episode: [1, 2, 3, 4]
|
||||
|
||||
? Some Series E01-02-E04
|
||||
: title: Some Series
|
||||
episode: [1, 2, 3, 4]
|
||||
|
||||
? Episode 3
|
||||
? -Episode III
|
||||
: episode: 3
|
||||
|
||||
? Episode 3
|
||||
? Episode III
|
||||
: options: -t episode
|
||||
episode: 3
|
||||
|
||||
? -A very special movie
|
||||
: episode_details: Special
|
||||
|
||||
? -A very special episode
|
||||
: options: -t episode
|
||||
episode_details: Special
|
||||
|
||||
? A very special episode s06 special
|
||||
: options: -t episode
|
||||
title: A very special episode
|
||||
episode_details: Special
|
||||
|
||||
? 12 Monkeys\Season 01\Episode 05\12 Monkeys - S01E05 - The Night Room.mkv
|
||||
: container: mkv
|
||||
title: 12 Monkeys
|
||||
episode: 5
|
||||
season: 1
|
||||
|
||||
? S03E02.X.1080p
|
||||
: episode: 2
|
||||
screen_size: 1080p
|
||||
season: 3
|
||||
|
||||
? Something 1 x 2-FlexGet
|
||||
: options: -t episode
|
||||
title: Something
|
||||
season: 1
|
||||
episode: 2
|
||||
episode_title: FlexGet
|
||||
|
||||
? Show.Name.-.Season.1.to.3.-.Mp4.1080p
|
||||
? Show.Name.-.Season.1~3.-.Mp4.1080p
|
||||
? Show.Name.-.Saison.1.a.3.-.Mp4.1080p
|
||||
: container: mp4
|
||||
screen_size: 1080p
|
||||
season:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
title: Show Name
|
||||
|
||||
? Show.Name.Season.1.3&5.HDTV.XviD-GoodGroup[SomeTrash]
|
||||
? Show.Name.Season.1.3 and 5.HDTV.XviD-GoodGroup[SomeTrash]
|
||||
: source: HDTV
|
||||
release_group: GoodGroup[SomeTrash]
|
||||
season:
|
||||
- 1
|
||||
- 3
|
||||
- 5
|
||||
title: Show Name
|
||||
type: episode
|
||||
video_codec: Xvid
|
||||
|
||||
? Show.Name.Season.1.2.3-5.HDTV.XviD-GoodGroup[SomeTrash]
|
||||
? Show.Name.Season.1.2.3~5.HDTV.XviD-GoodGroup[SomeTrash]
|
||||
? Show.Name.Season.1.2.3 to 5.HDTV.XviD-GoodGroup[SomeTrash]
|
||||
: source: HDTV
|
||||
release_group: GoodGroup[SomeTrash]
|
||||
season:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
title: Show Name
|
||||
type: episode
|
||||
video_codec: Xvid
|
||||
|
||||
? The.Get.Down.S01EP01.FRENCH.720p.WEBRIP.XVID-STR
|
||||
: episode: 1
|
||||
source: Web
|
||||
other: Rip
|
||||
language: fr
|
||||
release_group: STR
|
||||
screen_size: 720p
|
||||
season: 1
|
||||
title: The Get Down
|
||||
type: episode
|
||||
video_codec: Xvid
|
||||
|
||||
? My.Name.Is.Earl.S01E01-S01E21.SWE-SUB
|
||||
: episode:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
- 10
|
||||
- 11
|
||||
- 12
|
||||
- 13
|
||||
- 14
|
||||
- 15
|
||||
- 16
|
||||
- 17
|
||||
- 18
|
||||
- 19
|
||||
- 20
|
||||
- 21
|
||||
season: 1
|
||||
subtitle_language: sv
|
||||
title: My Name Is Earl
|
||||
type: episode
|
||||
|
||||
? Show.Name.Season.4.Episodes.1-12
|
||||
: episode:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
- 10
|
||||
- 11
|
||||
- 12
|
||||
season: 4
|
||||
title: Show Name
|
||||
type: episode
|
||||
|
||||
? show name s01.to.s04
|
||||
: season:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
title: show name
|
||||
type: episode
|
||||
|
||||
? epi
|
||||
: options: -t episode
|
||||
title: epi
|
||||
|
||||
? Episode20
|
||||
? Episode 20
|
||||
: episode: 20
|
||||
|
||||
? Episode50
|
||||
? Episode 50
|
||||
: episode: 50
|
||||
|
||||
? Episode51
|
||||
? Episode 51
|
||||
: episode: 51
|
||||
|
||||
? Episode70
|
||||
? Episode 70
|
||||
: episode: 70
|
||||
|
||||
? Episode71
|
||||
? Episode 71
|
||||
: episode: 71
|
||||
|
||||
? S01D02.3-5-GROUP
|
||||
: disc: [2, 3, 4, 5]
|
||||
|
||||
? S01D02&4-6&8
|
||||
: disc: [2, 4, 5, 6, 8]
|
||||
|
||||
? Something.4x05-06
|
||||
? Something - 4x05-06
|
||||
? Something:4x05-06
|
||||
? Something 4x05-06
|
||||
? Something-4x05-06
|
||||
: title: Something
|
||||
season: 4
|
||||
episode:
|
||||
- 5
|
||||
- 6
|
||||
|
||||
? Something.4x05-06
|
||||
? Something - 4x05-06
|
||||
? Something:4x05-06
|
||||
? Something 4x05-06
|
||||
? Something-4x05-06
|
||||
: options: -T something
|
||||
title: something
|
||||
season: 4
|
||||
episode:
|
||||
- 5
|
||||
- 6
|
||||
|
||||
? Colony 23/S01E01.Some.title.mkv
|
||||
: title: Colony 23
|
||||
season: 1
|
||||
episode: 1
|
||||
episode_title: Some title
|
||||
|
||||
? Show.Name.E02.2010.mkv
|
||||
: options: -t episode
|
||||
title: Show Name
|
||||
year: 2010
|
||||
episode: 2
|
||||
|
||||
? Show.Name.E02.S2010.mkv
|
||||
: options: -t episode
|
||||
title: Show Name
|
||||
year: 2010
|
||||
season: 2010
|
||||
episode: 2
|
||||
|
||||
|
||||
? Show.Name.E02.2010.mkv
|
||||
: title: Show Name
|
||||
year: 2010
|
||||
episode: 2
|
||||
|
||||
? Show.Name.E02.S2010.mkv
|
||||
: title: Show Name
|
||||
year: 2010
|
||||
season: 2010
|
||||
episode: 2
|
||||
@@ -1,9 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? Film Title-f01-Series Title.mkv
|
||||
? Film Title-f01-Series Title
|
||||
? directory/Film Title-f01-Series Title/file.mkv
|
||||
: title: Series Title
|
||||
film_title: Film Title
|
||||
film: 1
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? +English
|
||||
? .ENG.
|
||||
: language: English
|
||||
|
||||
? +French
|
||||
: language: French
|
||||
|
||||
? +SubFrench
|
||||
? +SubFr
|
||||
? +STFr
|
||||
? ST.FR
|
||||
: subtitle_language: French
|
||||
|
||||
? +ENG.-.sub.FR
|
||||
? ENG.-.FR Sub
|
||||
? +ENG.-.SubFR
|
||||
? +ENG.-.FRSUB
|
||||
? +ENG.-.FRSUBS
|
||||
? +ENG.-.FR-SUBS
|
||||
: language: English
|
||||
subtitle_language: French
|
||||
|
||||
? "{Fr-Eng}.St{Fr-Eng}"
|
||||
? "Le.Prestige[x264.{Fr-Eng}.St{Fr-Eng}.Chaps].mkv"
|
||||
: language: [French, English]
|
||||
subtitle_language: [French, English]
|
||||
|
||||
? +ENG.-.sub.SWE
|
||||
? ENG.-.SWE Sub
|
||||
? +ENG.-.SubSWE
|
||||
? +ENG.-.SWESUB
|
||||
? +ENG.-.sub.SV
|
||||
? ENG.-.SV Sub
|
||||
? +ENG.-.SubSV
|
||||
? +ENG.-.SVSUB
|
||||
: language: English
|
||||
subtitle_language: Swedish
|
||||
|
||||
? The English Patient (1996)
|
||||
: title: The English Patient
|
||||
-language: english
|
||||
|
||||
? French.Kiss.1995.1080p
|
||||
: title: French Kiss
|
||||
-language: french
|
||||
@@ -1,169 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? +DVDSCR
|
||||
? +DVDScreener
|
||||
? +DVD-SCR
|
||||
? +DVD Screener
|
||||
? +DVD AnythingElse Screener
|
||||
? -DVD AnythingElse SCR
|
||||
: other: Screener
|
||||
|
||||
? +AudioFix
|
||||
? +AudioFixed
|
||||
? +Audio Fix
|
||||
? +Audio Fixed
|
||||
: other: Audio Fixed
|
||||
|
||||
? +SyncFix
|
||||
? +SyncFixed
|
||||
? +Sync Fix
|
||||
? +Sync Fixed
|
||||
: other: Sync Fixed
|
||||
|
||||
? +DualAudio
|
||||
? +Dual Audio
|
||||
: other: Dual Audio
|
||||
|
||||
? +ws
|
||||
? +WideScreen
|
||||
? +Wide Screen
|
||||
: other: Widescreen
|
||||
|
||||
# Fix must be surround by others properties to be matched.
|
||||
? DVD.fix.XViD
|
||||
? -DVD.Fix
|
||||
? -Fix.XViD
|
||||
: other: Fix
|
||||
-proper_count: 1
|
||||
|
||||
? -DVD.BlablaBla.Fix.Blablabla.XVID
|
||||
? -DVD.BlablaBla.Fix.XVID
|
||||
? -DVD.Fix.Blablabla.XVID
|
||||
: other: Fix
|
||||
-proper_count: 1
|
||||
|
||||
|
||||
? DVD.Real.PROPER.REPACK
|
||||
: other: Proper
|
||||
proper_count: 3
|
||||
|
||||
|
||||
? Proper.720p
|
||||
? +Repack
|
||||
? +Rerip
|
||||
: other: Proper
|
||||
proper_count: 1
|
||||
|
||||
? XViD.Fansub
|
||||
: other: Fan Subtitled
|
||||
|
||||
? XViD.Fastsub
|
||||
: other: Fast Subtitled
|
||||
|
||||
? +Season Complete
|
||||
? -Complete
|
||||
: other: Complete
|
||||
|
||||
? R5
|
||||
: other: Region 5
|
||||
|
||||
? RC
|
||||
: other: Region C
|
||||
|
||||
? PreAir
|
||||
? Pre Air
|
||||
: other: Preair
|
||||
|
||||
? Screener
|
||||
: other: Screener
|
||||
|
||||
? Remux
|
||||
: other: Remux
|
||||
|
||||
? 3D.2019
|
||||
: other: 3D
|
||||
|
||||
? HD
|
||||
: other: HD
|
||||
|
||||
? FHD
|
||||
? FullHD
|
||||
? Full HD
|
||||
: other: Full HD
|
||||
|
||||
? UHD
|
||||
? Ultra
|
||||
? UltraHD
|
||||
? Ultra HD
|
||||
: other: Ultra HD
|
||||
|
||||
? mHD # ??
|
||||
? HDLight
|
||||
: other: Micro HD
|
||||
|
||||
? HQ
|
||||
: other: High Quality
|
||||
|
||||
? hr
|
||||
: other: High Resolution
|
||||
|
||||
? PAL
|
||||
: other: PAL
|
||||
|
||||
? SECAM
|
||||
: other: SECAM
|
||||
|
||||
? NTSC
|
||||
: other: NTSC
|
||||
|
||||
? LDTV
|
||||
: other: Low Definition
|
||||
|
||||
? LD
|
||||
: other: Line Dubbed
|
||||
|
||||
? MD
|
||||
: other: Mic Dubbed
|
||||
|
||||
? -The complete movie
|
||||
: other: Complete
|
||||
|
||||
? +The complete movie
|
||||
: title: The complete movie
|
||||
|
||||
? +AC3-HQ
|
||||
: audio_profile: High Quality
|
||||
|
||||
? Other-HQ
|
||||
: other: High Quality
|
||||
|
||||
? reenc
|
||||
? re-enc
|
||||
? re-encoded
|
||||
? reencoded
|
||||
: other: Reencoded
|
||||
|
||||
? CONVERT XViD
|
||||
: other: Converted
|
||||
|
||||
? +HDRIP # it's a Rip from non specified HD source
|
||||
: other: [HD, Rip]
|
||||
|
||||
? SDR
|
||||
: other: Standard Dynamic Range
|
||||
|
||||
? HDR
|
||||
? HDR10
|
||||
? -HDR100
|
||||
: other: HDR10
|
||||
|
||||
? BT2020
|
||||
? BT.2020
|
||||
? -BT.20200
|
||||
? -BT.2021
|
||||
: other: BT.2020
|
||||
|
||||
? Upscaled
|
||||
? Upscale
|
||||
: other: Upscaled
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? Filename Part 3.mkv
|
||||
? Filename Part III.mkv
|
||||
? Filename Part Three.mkv
|
||||
? Filename Part Trois.mkv
|
||||
: title: Filename
|
||||
part: 3
|
||||
|
||||
? Part 3
|
||||
? Part III
|
||||
? Part Three
|
||||
? Part Trois
|
||||
? Part3
|
||||
: part: 3
|
||||
|
||||
? -Something.Apt.1
|
||||
: part: 1
|
||||
@@ -1,8 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use $ marker to check inputs that should not match results.
|
||||
|
||||
# Prefer information for last path.
|
||||
? Some movie (2000)/Some movie (2001).mkv
|
||||
? Some movie (2001)/Some movie.mkv
|
||||
: year: 2001
|
||||
container: mkv
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, pointless-string-statement
|
||||
|
||||
from rebulk.match import Matches, Match
|
||||
|
||||
from ...rules.processors import StripSeparators
|
||||
|
||||
|
||||
def test_strip_separators():
|
||||
strip_separators = StripSeparators()
|
||||
|
||||
matches = Matches()
|
||||
|
||||
m = Match(3, 11, input_string="pre.ABCDEF.post")
|
||||
|
||||
assert m.raw == '.ABCDEF.'
|
||||
matches.append(m)
|
||||
|
||||
returned_matches = strip_separators.when(matches, None)
|
||||
assert returned_matches == matches
|
||||
|
||||
strip_separators.then(matches, returned_matches, None)
|
||||
|
||||
assert m.raw == 'ABCDEF'
|
||||
|
||||
|
||||
def test_strip_separators_keep_acronyms():
|
||||
strip_separators = StripSeparators()
|
||||
|
||||
matches = Matches()
|
||||
|
||||
m = Match(0, 13, input_string=".S.H.I.E.L.D.")
|
||||
m2 = Match(0, 22, input_string=".Agent.Of.S.H.I.E.L.D.")
|
||||
|
||||
assert m.raw == '.S.H.I.E.L.D.'
|
||||
matches.append(m)
|
||||
matches.append(m2)
|
||||
|
||||
returned_matches = strip_separators.when(matches, None)
|
||||
assert returned_matches == matches
|
||||
|
||||
strip_separators.then(matches, returned_matches, None)
|
||||
|
||||
assert m.raw == '.S.H.I.E.L.D.'
|
||||
assert m2.raw == 'Agent.Of.S.H.I.E.L.D.'
|
||||
@@ -1,71 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? Some.Title.XViD-ReleaseGroup
|
||||
? Some.Title.XViD-ReleaseGroup.mkv
|
||||
: release_group: ReleaseGroup
|
||||
|
||||
? Some.Title.XViD-by.Artik[SEDG].avi
|
||||
: release_group: Artik[SEDG]
|
||||
|
||||
? "[ABC] Some.Title.avi"
|
||||
? some/folder/[ABC]Some.Title.avi
|
||||
: release_group: ABC
|
||||
|
||||
? "[ABC] Some.Title.XViD-GRP.avi"
|
||||
? some/folder/[ABC]Some.Title.XViD-GRP.avi
|
||||
: release_group: GRP
|
||||
|
||||
? "[ABC] Some.Title.S01E02.avi"
|
||||
? some/folder/[ABC]Some.Title.S01E02.avi
|
||||
: release_group: ABC
|
||||
|
||||
? Some.Title.XViD-S2E02.NoReleaseGroup.avi
|
||||
: release_group: !!null
|
||||
|
||||
? Test.S01E01-FooBar-Group
|
||||
: options: -G group -G xxxx
|
||||
episode: 1
|
||||
episode_title: FooBar
|
||||
release_group: Group
|
||||
season: 1
|
||||
title: Test
|
||||
type: episode
|
||||
|
||||
? Test.S01E01-FooBar-Group
|
||||
: options: -G re:gr.?up -G xxxx
|
||||
episode: 1
|
||||
episode_title: FooBar
|
||||
release_group: Group
|
||||
season: 1
|
||||
title: Test
|
||||
type: episode
|
||||
|
||||
? Show.Name.x264-byEMP
|
||||
: title: Show Name
|
||||
video_codec: H.264
|
||||
release_group: byEMP
|
||||
|
||||
? Show.Name.x264-NovaRip
|
||||
: title: Show Name
|
||||
video_codec: H.264
|
||||
release_group: NovaRip
|
||||
|
||||
? Show.Name.x264-PARTiCLE
|
||||
: title: Show Name
|
||||
video_codec: H.264
|
||||
release_group: PARTiCLE
|
||||
|
||||
? Show.Name.x264-POURMOi
|
||||
: title: Show Name
|
||||
video_codec: H.264
|
||||
release_group: POURMOi
|
||||
|
||||
? Show.Name.x264-RipPourBox
|
||||
: title: Show Name
|
||||
video_codec: H.264
|
||||
release_group: RipPourBox
|
||||
|
||||
? Show.Name.x264-RiPRG
|
||||
: title: Show Name
|
||||
video_codec: H.264
|
||||
release_group: RiPRG
|
||||
@@ -1,280 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? +360p
|
||||
? +360px
|
||||
? -360
|
||||
? +500x360
|
||||
? -250x360
|
||||
: screen_size: 360p
|
||||
|
||||
? +640x360
|
||||
? -640x360i
|
||||
? -684x360i
|
||||
: screen_size: 360p
|
||||
aspect_ratio: 1.778
|
||||
|
||||
? +360i
|
||||
: screen_size: 360i
|
||||
|
||||
? +480x360i
|
||||
? -480x360p
|
||||
? -450x360
|
||||
: screen_size: 360i
|
||||
aspect_ratio: 1.333
|
||||
|
||||
? +368p
|
||||
? +368px
|
||||
? -368i
|
||||
? -368
|
||||
? +500x368
|
||||
: screen_size: 368p
|
||||
|
||||
? -490x368
|
||||
? -700x368
|
||||
: screen_size: 368p
|
||||
|
||||
? +492x368p
|
||||
: screen_size:
|
||||
aspect_ratio: 1.337
|
||||
|
||||
? +654x368
|
||||
: screen_size: 368p
|
||||
aspect_ratio: 1.777
|
||||
|
||||
? +698x368
|
||||
: screen_size: 368p
|
||||
aspect_ratio: 1.897
|
||||
|
||||
? +368i
|
||||
: -screen_size: 368i
|
||||
|
||||
? +480p
|
||||
? +480px
|
||||
? -480i
|
||||
? -480
|
||||
? -500x480
|
||||
? -638x480
|
||||
? -920x480
|
||||
: screen_size: 480p
|
||||
|
||||
? +640x480
|
||||
: screen_size: 480p
|
||||
aspect_ratio: 1.333
|
||||
|
||||
? +852x480
|
||||
: screen_size: 480p
|
||||
aspect_ratio: 1.775
|
||||
|
||||
? +910x480
|
||||
: screen_size: 480p
|
||||
aspect_ratio: 1.896
|
||||
|
||||
? +500x480
|
||||
? +500 x 480
|
||||
? +500 * 480
|
||||
? +500x480p
|
||||
? +500X480i
|
||||
: screen_size: 500x480
|
||||
aspect_ratio: 1.042
|
||||
|
||||
? +480i
|
||||
? +852x480i
|
||||
: screen_size: 480i
|
||||
|
||||
? +576p
|
||||
? +576px
|
||||
? -576i
|
||||
? -576
|
||||
? -500x576
|
||||
? -766x576
|
||||
? -1094x576
|
||||
: screen_size: 576p
|
||||
|
||||
? +768x576
|
||||
: screen_size: 576p
|
||||
aspect_ratio: 1.333
|
||||
|
||||
? +1024x576
|
||||
: screen_size: 576p
|
||||
aspect_ratio: 1.778
|
||||
|
||||
? +1092x576
|
||||
: screen_size: 576p
|
||||
aspect_ratio: 1.896
|
||||
|
||||
? +500x576
|
||||
: screen_size: 500x576
|
||||
aspect_ratio: 0.868
|
||||
|
||||
? +576i
|
||||
: screen_size: 576i
|
||||
|
||||
? +720p
|
||||
? +720px
|
||||
? -720i
|
||||
? 720hd
|
||||
? 720pHD
|
||||
? -720
|
||||
? -500x720
|
||||
? -950x720
|
||||
? -1368x720
|
||||
: screen_size: 720p
|
||||
|
||||
? +960x720
|
||||
: screen_size: 720p
|
||||
aspect_ratio: 1.333
|
||||
|
||||
? +1280x720
|
||||
: screen_size: 720p
|
||||
aspect_ratio: 1.778
|
||||
|
||||
? +1366x720
|
||||
: screen_size: 720p
|
||||
aspect_ratio: 1.897
|
||||
|
||||
? +500x720
|
||||
: screen_size: 500x720
|
||||
aspect_ratio: 0.694
|
||||
|
||||
? +900p
|
||||
? +900px
|
||||
? -900i
|
||||
? -900
|
||||
? -500x900
|
||||
? -1198x900
|
||||
? -1710x900
|
||||
: screen_size: 900p
|
||||
|
||||
? +1200x900
|
||||
: screen_size: 900p
|
||||
aspect_ratio: 1.333
|
||||
|
||||
? +1600x900
|
||||
: screen_size: 900p
|
||||
aspect_ratio: 1.778
|
||||
|
||||
? +1708x900
|
||||
: screen_size: 900p
|
||||
aspect_ratio: 1.898
|
||||
|
||||
? +500x900
|
||||
? +500x900p
|
||||
? +500x900i
|
||||
: screen_size: 500x900
|
||||
aspect_ratio: 0.556
|
||||
|
||||
? +900i
|
||||
: screen_size: 900i
|
||||
|
||||
? +1080p
|
||||
? +1080px
|
||||
? +1080hd
|
||||
? +1080pHD
|
||||
? -1080i
|
||||
? -1080
|
||||
? -500x1080
|
||||
? -1438x1080
|
||||
? -2050x1080
|
||||
: screen_size: 1080p
|
||||
|
||||
? +1440x1080
|
||||
: screen_size: 1080p
|
||||
aspect_ratio: 1.333
|
||||
|
||||
? +1920x1080
|
||||
: screen_size: 1080p
|
||||
aspect_ratio: 1.778
|
||||
|
||||
? +2048x1080
|
||||
: screen_size: 1080p
|
||||
aspect_ratio: 1.896
|
||||
|
||||
? +1080i
|
||||
? -1080p
|
||||
: screen_size: 1080i
|
||||
|
||||
? 1440p
|
||||
: screen_size: 1440p
|
||||
|
||||
? +500x1080
|
||||
: screen_size: 500x1080
|
||||
aspect_ratio: 0.463
|
||||
|
||||
? +2160p
|
||||
? +2160px
|
||||
? -2160i
|
||||
? -2160
|
||||
? +4096x2160
|
||||
? +4k
|
||||
? -2878x2160
|
||||
? -4100x2160
|
||||
: screen_size: 2160p
|
||||
|
||||
? +2880x2160
|
||||
: screen_size: 2160p
|
||||
aspect_ratio: 1.333
|
||||
|
||||
? +3840x2160
|
||||
: screen_size: 2160p
|
||||
aspect_ratio: 1.778
|
||||
|
||||
? +4098x2160
|
||||
: screen_size: 2160p
|
||||
aspect_ratio: 1.897
|
||||
|
||||
? +500x2160
|
||||
: screen_size: 500x2160
|
||||
aspect_ratio: 0.231
|
||||
|
||||
? +4320p
|
||||
? +4320px
|
||||
? -4320i
|
||||
? -4320
|
||||
? -5758x2160
|
||||
? -8198x2160
|
||||
: screen_size: 4320p
|
||||
|
||||
? +5760x4320
|
||||
: screen_size: 4320p
|
||||
aspect_ratio: 1.333
|
||||
|
||||
? +7680x4320
|
||||
: screen_size: 4320p
|
||||
aspect_ratio: 1.778
|
||||
|
||||
? +8196x4320
|
||||
: screen_size: 4320p
|
||||
aspect_ratio: 1.897
|
||||
|
||||
? +500x4320
|
||||
: screen_size: 500x4320
|
||||
aspect_ratio: 0.116
|
||||
|
||||
? Test.File.720hd.bluray
|
||||
? Test.File.720p24
|
||||
? Test.File.720p30
|
||||
? Test.File.720p50
|
||||
? Test.File.720p60
|
||||
? Test.File.720p120
|
||||
: screen_size: 720p
|
||||
|
||||
? Test.File.400p
|
||||
: options:
|
||||
advanced_config:
|
||||
screen_size:
|
||||
progressive: ["400"]
|
||||
screen_size: 400p
|
||||
|
||||
? Test.File2.400p
|
||||
: options:
|
||||
advanced_config:
|
||||
screen_size:
|
||||
progressive: ["400"]
|
||||
screen_size: 400p
|
||||
|
||||
? Test.File.720p
|
||||
: options:
|
||||
advanced_config:
|
||||
screen_size:
|
||||
progressive: ["400"]
|
||||
screen_size: 720p
|
||||
@@ -1,8 +0,0 @@
|
||||
? 1.1tb
|
||||
: size: 1.1TB
|
||||
|
||||
? 123mb
|
||||
: size: 123MB
|
||||
|
||||
? 4.3gb
|
||||
: size: 4.3GB
|
||||
@@ -1,323 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? +VHS
|
||||
? -VHSAnythingElse
|
||||
? -SomeVHS stuff
|
||||
? -VH
|
||||
? -VHx
|
||||
: source: VHS
|
||||
-other: Rip
|
||||
|
||||
? +VHSRip
|
||||
? +VHS-Rip
|
||||
? +VhS_rip
|
||||
? +VHS.RIP
|
||||
? -VHS
|
||||
? -VHxRip
|
||||
: source: VHS
|
||||
other: Rip
|
||||
|
||||
? +Cam
|
||||
: source: Camera
|
||||
-other: Rip
|
||||
|
||||
? +CamRip
|
||||
? +CaM Rip
|
||||
? +Cam_Rip
|
||||
? +cam.rip
|
||||
? -Cam
|
||||
: source: Camera
|
||||
other: Rip
|
||||
|
||||
? +HDCam
|
||||
? +HD-Cam
|
||||
: source: HD Camera
|
||||
-other: Rip
|
||||
|
||||
? +HDCamRip
|
||||
? +HD-Cam.rip
|
||||
? -HDCam
|
||||
? -HD-Cam
|
||||
: source: HD Camera
|
||||
other: Rip
|
||||
|
||||
? +Telesync
|
||||
? +TS
|
||||
: source: Telesync
|
||||
-other: Rip
|
||||
|
||||
? +TelesyncRip
|
||||
? +TSRip
|
||||
? -Telesync
|
||||
? -TS
|
||||
: source: Telesync
|
||||
other: Rip
|
||||
|
||||
? +HD TS
|
||||
? -Hd.Ts # ts file extension
|
||||
? -HD.TS # ts file extension
|
||||
? +Hd-Ts
|
||||
: source: HD Telesync
|
||||
-other: Rip
|
||||
|
||||
? +HD TS Rip
|
||||
? +Hd-Ts-Rip
|
||||
? -HD TS
|
||||
? -Hd-Ts
|
||||
: source: HD Telesync
|
||||
other: Rip
|
||||
|
||||
? +Workprint
|
||||
? +workPrint
|
||||
? +WorkPrint
|
||||
? +WP
|
||||
? -Work Print
|
||||
: source: Workprint
|
||||
-other: Rip
|
||||
|
||||
? +Telecine
|
||||
? +teleCine
|
||||
? +TC
|
||||
? -Tele Cine
|
||||
: source: Telecine
|
||||
-other: Rip
|
||||
|
||||
? +Telecine Rip
|
||||
? +teleCine-Rip
|
||||
? +TC-Rip
|
||||
? -Telecine
|
||||
? -TC
|
||||
: source: Telecine
|
||||
other: Rip
|
||||
|
||||
? +HD-TELECINE
|
||||
? +HDTC
|
||||
: source: HD Telecine
|
||||
-other: Rip
|
||||
|
||||
? +HD-TCRip
|
||||
? +HD TELECINE RIP
|
||||
? -HD-TELECINE
|
||||
? -HDTC
|
||||
: source: HD Telecine
|
||||
other: Rip
|
||||
|
||||
? +PPV
|
||||
: source: Pay-per-view
|
||||
-other: Rip
|
||||
|
||||
? +ppv-rip
|
||||
? -PPV
|
||||
: source: Pay-per-view
|
||||
other: Rip
|
||||
|
||||
? -TV
|
||||
? +SDTV
|
||||
? +TV-Dub
|
||||
: source: TV
|
||||
-other: Rip
|
||||
|
||||
? +SDTVRIP
|
||||
? +Rip sd tv
|
||||
? +TvRip
|
||||
? +Rip TV
|
||||
? -TV
|
||||
? -SDTV
|
||||
: source: TV
|
||||
other: Rip
|
||||
|
||||
? +DVB
|
||||
? +pdTV
|
||||
? +Pd Tv
|
||||
: source: Digital TV
|
||||
-other: Rip
|
||||
|
||||
? +DVB-Rip
|
||||
? +DvBRiP
|
||||
? +pdtvRiP
|
||||
? +pd tv RiP
|
||||
? -DVB
|
||||
? -pdTV
|
||||
? -Pd Tv
|
||||
: source: Digital TV
|
||||
other: Rip
|
||||
|
||||
? +DVD
|
||||
? +video ts
|
||||
? +DVDR
|
||||
? +DVD 9
|
||||
? +dvd 5
|
||||
? -dvd ts
|
||||
: source: DVD
|
||||
-source: Telesync
|
||||
-other: Rip
|
||||
|
||||
? +DVD-RIP
|
||||
? -video ts
|
||||
? -DVD
|
||||
? -DVDR
|
||||
? -DVD 9
|
||||
? -dvd 5
|
||||
: source: DVD
|
||||
other: Rip
|
||||
|
||||
? +HDTV
|
||||
: source: HDTV
|
||||
-other: Rip
|
||||
|
||||
? +tv rip hd
|
||||
? +HDtv Rip
|
||||
? -HdRip # it's a Rip from non specified HD source
|
||||
? -HDTV
|
||||
: source: HDTV
|
||||
other: Rip
|
||||
|
||||
? +VOD
|
||||
: source: Video on Demand
|
||||
-other: Rip
|
||||
|
||||
? +VodRip
|
||||
? +vod rip
|
||||
? -VOD
|
||||
: source: Video on Demand
|
||||
other: Rip
|
||||
|
||||
? +webrip
|
||||
? +Web Rip
|
||||
? +webdlrip
|
||||
? +web dl rip
|
||||
? +webcap
|
||||
? +web cap
|
||||
? +webcaprip
|
||||
? +web cap rip
|
||||
: source: Web
|
||||
other: Rip
|
||||
|
||||
? +webdl
|
||||
? +Web DL
|
||||
? +webHD
|
||||
? +WEB hd
|
||||
? +web
|
||||
: source: Web
|
||||
-other: Rip
|
||||
|
||||
? +HDDVD
|
||||
? +hd dvd
|
||||
: source: HD-DVD
|
||||
-other: Rip
|
||||
|
||||
? +hdDvdRip
|
||||
? -HDDVD
|
||||
? -hd dvd
|
||||
: source: HD-DVD
|
||||
other: Rip
|
||||
|
||||
? +BluRay
|
||||
? +BD
|
||||
? +BD5
|
||||
? +BD9
|
||||
? +BD25
|
||||
? +bd50
|
||||
: source: Blu-ray
|
||||
-other: Rip
|
||||
|
||||
? +BR-Scr
|
||||
? +BR.Screener
|
||||
: source: Blu-ray
|
||||
other: [Reencoded, Screener]
|
||||
-language: pt-BR
|
||||
|
||||
? +BR-Rip
|
||||
? +BRRip
|
||||
: source: Blu-ray
|
||||
other: [Reencoded, Rip]
|
||||
-language: pt-BR
|
||||
|
||||
? +BluRay rip
|
||||
? +BDRip
|
||||
? -BluRay
|
||||
? -BD
|
||||
? -BR
|
||||
? -BR rip
|
||||
? -BD5
|
||||
? -BD9
|
||||
? -BD25
|
||||
? -bd50
|
||||
: source: Blu-ray
|
||||
other: Rip
|
||||
|
||||
? XVID.NTSC.DVDR.nfo
|
||||
: source: DVD
|
||||
-other: Rip
|
||||
|
||||
? +AHDTV
|
||||
: source: Analog HDTV
|
||||
-other: Rip
|
||||
|
||||
? +dsr
|
||||
? +dth
|
||||
: source: Satellite
|
||||
-other: Rip
|
||||
|
||||
? +dsrip
|
||||
? +ds rip
|
||||
? +dsrrip
|
||||
? +dsr rip
|
||||
? +satrip
|
||||
? +sat rip
|
||||
? +dthrip
|
||||
? +dth rip
|
||||
? -dsr
|
||||
? -dth
|
||||
: source: Satellite
|
||||
other: Rip
|
||||
|
||||
? +UHDTV
|
||||
: source: Ultra HDTV
|
||||
-other: Rip
|
||||
|
||||
? +UHDRip
|
||||
? +UHDTV Rip
|
||||
? -UHDTV
|
||||
: source: Ultra HDTV
|
||||
other: Rip
|
||||
|
||||
? UHD Bluray
|
||||
? UHD 2160p Bluray
|
||||
? UHD 8bit Bluray
|
||||
? UHD HQ 8bit Bluray
|
||||
? Ultra Bluray
|
||||
? Ultra HD Bluray
|
||||
? Bluray ULTRA
|
||||
? Bluray Ultra HD
|
||||
? Bluray UHD
|
||||
? 4K Bluray
|
||||
? 2160p Bluray
|
||||
? UHD 10bit HDR Bluray
|
||||
? UHD HDR10 Bluray
|
||||
? -HD Bluray
|
||||
? -AMERICAN ULTRA (2015) 1080p Bluray
|
||||
? -American.Ultra.2015.BRRip
|
||||
? -BRRip XviD AC3-ULTRAS
|
||||
? -UHD Proper Bluray
|
||||
: source: Ultra HD Blu-ray
|
||||
|
||||
? UHD.BRRip
|
||||
? UHD.2160p.BRRip
|
||||
? BRRip.2160p.UHD
|
||||
? BRRip.[4K-2160p-UHD]
|
||||
: source: Ultra HD Blu-ray
|
||||
other: [Reencoded, Rip]
|
||||
|
||||
? UHD.2160p.BDRip
|
||||
? BDRip.[4K-2160p-UHD]
|
||||
: source: Ultra HD Blu-ray
|
||||
other: Rip
|
||||
|
||||
? DM
|
||||
: source: Digital Master
|
||||
|
||||
? DMRIP
|
||||
? DM-RIP
|
||||
: source: Digital Master
|
||||
other: Rip
|
||||
@@ -1,43 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? Title Only
|
||||
? -Title XViD 720p Only
|
||||
? sub/folder/Title Only
|
||||
? -sub/folder/Title XViD 720p Only
|
||||
? Title Only.mkv
|
||||
? Title Only.avi
|
||||
: title: Title Only
|
||||
|
||||
? Title Only/title_only.mkv
|
||||
: title: Title Only
|
||||
|
||||
? title_only.mkv
|
||||
: title: title only
|
||||
|
||||
? Some Title/some.title.mkv
|
||||
? some.title/Some.Title.mkv
|
||||
: title: Some Title
|
||||
|
||||
? SOME TITLE/Some.title.mkv
|
||||
? Some.title/SOME TITLE.mkv
|
||||
: title: Some title
|
||||
|
||||
? some title/Some.title.mkv
|
||||
? Some.title/some title.mkv
|
||||
: title: Some title
|
||||
|
||||
? Some other title/Some.Other.title.mkv
|
||||
? Some.Other title/Some other title.mkv
|
||||
: title: Some Other title
|
||||
|
||||
? This T.I.T.L.E. has dots
|
||||
? This.T.I.T.L.E..has.dots
|
||||
: title: This T.I.T.L.E has dots
|
||||
|
||||
? This.T.I.T.L.E..has.dots.S01E02.This E.P.T.I.T.L.E.has.dots
|
||||
: title: This T.I.T.L.E has dots
|
||||
season: 1
|
||||
episode: 2
|
||||
episode_title: This E.P.T.I.T.L.E has dots
|
||||
type: episode
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? rv10
|
||||
? rv13
|
||||
? RV20
|
||||
? Rv30
|
||||
? rv40
|
||||
? -xrv40
|
||||
: video_codec: RealVideo
|
||||
|
||||
? mpeg2
|
||||
? MPEG2
|
||||
? MPEG-2
|
||||
? mpg2
|
||||
? H262
|
||||
? H.262
|
||||
? x262
|
||||
? -mpeg
|
||||
? -xmpeg2
|
||||
? -mpeg2x
|
||||
: video_codec: MPEG-2
|
||||
|
||||
? DivX
|
||||
? -div X
|
||||
? divx
|
||||
? dvdivx
|
||||
? DVDivX
|
||||
: video_codec: DivX
|
||||
|
||||
? XviD
|
||||
? xvid
|
||||
? -x vid
|
||||
: video_codec: Xvid
|
||||
|
||||
? h263
|
||||
? x263
|
||||
? h.263
|
||||
: video_codec: H.263
|
||||
|
||||
? h264
|
||||
? x264
|
||||
? h.264
|
||||
? x.264
|
||||
? AVC
|
||||
? AVCHD
|
||||
? -MPEG-4
|
||||
? -mpeg4
|
||||
? -mpeg
|
||||
? -h 265
|
||||
? -x265
|
||||
: video_codec: H.264
|
||||
|
||||
? h265
|
||||
? x265
|
||||
? h.265
|
||||
? x.265
|
||||
? hevc
|
||||
? -h 264
|
||||
? -x264
|
||||
: video_codec: H.265
|
||||
|
||||
? hevc10
|
||||
? HEVC-YUV420P10
|
||||
: video_codec: H.265
|
||||
color_depth: 10-bit
|
||||
|
||||
? h265-HP
|
||||
: video_codec: H.265
|
||||
video_profile: High
|
||||
|
||||
? H.264-SC
|
||||
: video_codec: H.264
|
||||
video_profile: Scalable Video Coding
|
||||
|
||||
? mpeg4-AVC
|
||||
: video_codec: H.264
|
||||
video_profile: Advanced Video Codec High Definition
|
||||
|
||||
? AVCHD-SC
|
||||
? H.264-AVCHD-SC
|
||||
: video_codec: H.264
|
||||
video_profile:
|
||||
- Scalable Video Coding
|
||||
- Advanced Video Codec High Definition
|
||||
|
||||
? VC1
|
||||
? VC-1
|
||||
: video_codec: VC-1
|
||||
|
||||
? VP7
|
||||
: video_codec: VP7
|
||||
|
||||
? VP8
|
||||
? VP80
|
||||
: video_codec: VP8
|
||||
|
||||
? VP9
|
||||
: video_codec: VP9
|
||||
@@ -1,23 +0,0 @@
|
||||
# Multiple input strings having same expected results can be chained.
|
||||
# Use - marker to check inputs that should not match results.
|
||||
? +tvu.org.ru
|
||||
? -tvu.unsafe.ru
|
||||
: website: tvu.org.ru
|
||||
|
||||
? +www.nimp.na
|
||||
? -somewww.nimp.na
|
||||
? -www.nimp.nawouak
|
||||
? -nimp.na
|
||||
: website: www.nimp.na
|
||||
|
||||
? +wawa.co.uk
|
||||
? -wawa.uk
|
||||
: website: wawa.co.uk
|
||||
|
||||
? -Dark.Net.S01E06.720p.HDTV.x264-BATV
|
||||
-Dark.Net.2015.720p.HDTV.x264-BATV
|
||||
: website: Dark.Net
|
||||
|
||||
? Dark.Net.S01E06.720p.HDTV.x264-BATV
|
||||
Dark.Net.2015.720p.HDTV.x264-BATV
|
||||
: title: Dark Net
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"titles": [
|
||||
"13 Reasons Why",
|
||||
"Star Wars: Episode VII - The Force Awakens",
|
||||
"3%",
|
||||
"The 100",
|
||||
"3 Percent",
|
||||
"This is Us",
|
||||
"Open Season 2",
|
||||
"Game of Thrones",
|
||||
"The X-Files",
|
||||
"11.22.63"
|
||||
],
|
||||
"suggested": [
|
||||
"13 Reasons Why",
|
||||
"Star Wars: Episode VII - The Force Awakens",
|
||||
"The 100",
|
||||
"Open Season 2",
|
||||
"11.22.63"
|
||||
]
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv
|
||||
SecondFile.avi
|
||||
@@ -1,83 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, pointless-string-statement
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
import six
|
||||
|
||||
from ..api import guessit, properties, suggested_expected, GuessitException
|
||||
|
||||
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
||||
|
||||
|
||||
def test_default():
|
||||
ret = guessit('Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv')
|
||||
assert ret and 'title' in ret
|
||||
|
||||
|
||||
def test_forced_unicode():
|
||||
ret = guessit(u'Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv')
|
||||
assert ret and 'title' in ret and isinstance(ret['title'], six.text_type)
|
||||
|
||||
|
||||
def test_forced_binary():
|
||||
ret = guessit(b'Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv')
|
||||
assert ret and 'title' in ret and isinstance(ret['title'], six.binary_type)
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info < (3, 4), reason="Path is not available")
|
||||
def test_pathlike_object():
|
||||
try:
|
||||
from pathlib import Path
|
||||
|
||||
path = Path('Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv')
|
||||
ret = guessit(path)
|
||||
assert ret and 'title' in ret
|
||||
except ImportError: # pragma: no-cover
|
||||
pass
|
||||
|
||||
|
||||
def test_unicode_japanese():
|
||||
ret = guessit('[阿维达].Avida.2006.FRENCH.DVDRiP.XViD-PROD.avi')
|
||||
assert ret and 'title' in ret
|
||||
|
||||
|
||||
def test_unicode_japanese_options():
|
||||
ret = guessit("[阿维达].Avida.2006.FRENCH.DVDRiP.XViD-PROD.avi", options={"expected_title": ["阿维达"]})
|
||||
assert ret and 'title' in ret and ret['title'] == "阿维达"
|
||||
|
||||
|
||||
def test_forced_unicode_japanese_options():
|
||||
ret = guessit(u"[阿维达].Avida.2006.FRENCH.DVDRiP.XViD-PROD.avi", options={"expected_title": [u"阿维达"]})
|
||||
assert ret and 'title' in ret and ret['title'] == u"阿维达"
|
||||
|
||||
# TODO: This doesn't compile on python 3, but should be tested on python 2.
|
||||
"""
|
||||
if six.PY2:
|
||||
def test_forced_binary_japanese_options():
|
||||
ret = guessit(b"[阿维达].Avida.2006.FRENCH.DVDRiP.XViD-PROD.avi", options={"expected_title": [b"阿维达"]})
|
||||
assert ret and 'title' in ret and ret['title'] == b"阿维达"
|
||||
"""
|
||||
|
||||
|
||||
def test_properties():
|
||||
props = properties()
|
||||
assert 'video_codec' in props.keys()
|
||||
|
||||
|
||||
def test_exception():
|
||||
with pytest.raises(GuessitException) as excinfo:
|
||||
guessit(object())
|
||||
assert "An internal error has occured in guessit" in str(excinfo.value)
|
||||
assert "Guessit Exception Report" in str(excinfo.value)
|
||||
assert "Please report at https://github.com/guessit-io/guessit/issues" in str(excinfo.value)
|
||||
|
||||
|
||||
def test_suggested_expected():
|
||||
with open(os.path.join(__location__, 'suggested.json'), 'r') as f:
|
||||
content = json.load(f)
|
||||
actual = suggested_expected(content['titles'])
|
||||
assert actual == content['suggested']
|
||||
@@ -1,74 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, pointless-string-statement
|
||||
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
import six
|
||||
|
||||
from ..api import guessit, properties, GuessitException
|
||||
|
||||
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
||||
|
||||
|
||||
def test_default():
|
||||
ret = guessit('Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv')
|
||||
assert ret and 'title' in ret
|
||||
|
||||
|
||||
def test_forced_unicode():
|
||||
ret = guessit(u'Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv')
|
||||
assert ret and 'title' in ret and isinstance(ret['title'], six.text_type)
|
||||
|
||||
|
||||
def test_forced_binary():
|
||||
ret = guessit(b'Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv')
|
||||
assert ret and 'title' in ret and isinstance(ret['title'], six.binary_type)
|
||||
|
||||
|
||||
def test_unicode_japanese():
|
||||
ret = guessit('[阿维达].Avida.2006.FRENCH.DVDRiP.XViD-PROD.avi')
|
||||
assert ret and 'title' in ret
|
||||
|
||||
|
||||
def test_unicode_japanese_options():
|
||||
ret = guessit("[阿维达].Avida.2006.FRENCH.DVDRiP.XViD-PROD.avi", options={"expected_title": ["阿维达"]})
|
||||
assert ret and 'title' in ret and ret['title'] == "阿维达"
|
||||
|
||||
|
||||
def test_forced_unicode_japanese_options():
|
||||
ret = guessit(u"[阿维达].Avida.2006.FRENCH.DVDRiP.XViD-PROD.avi", options={"expected_title": [u"阿维达"]})
|
||||
assert ret and 'title' in ret and ret['title'] == u"阿维达"
|
||||
|
||||
# TODO: This doesn't compile on python 3, but should be tested on python 2.
|
||||
"""
|
||||
if six.PY2:
|
||||
def test_forced_binary_japanese_options():
|
||||
ret = guessit(b"[阿维达].Avida.2006.FRENCH.DVDRiP.XViD-PROD.avi", options={"expected_title": [b"阿维达"]})
|
||||
assert ret and 'title' in ret and ret['title'] == b"阿维达"
|
||||
"""
|
||||
|
||||
|
||||
def test_ensure_standard_string_class():
|
||||
class CustomStr(str):
|
||||
pass
|
||||
|
||||
ret = guessit(CustomStr('1080p'), options={'advanced': True})
|
||||
assert ret and 'screen_size' in ret and not isinstance(ret['screen_size'].input_string, CustomStr)
|
||||
|
||||
|
||||
def test_properties():
|
||||
props = properties()
|
||||
assert 'video_codec' in props.keys()
|
||||
|
||||
|
||||
def test_exception():
|
||||
with pytest.raises(GuessitException) as excinfo:
|
||||
guessit(object())
|
||||
assert "An internal error has occured in guessit" in str(excinfo.value)
|
||||
assert "Guessit Exception Report" in str(excinfo.value)
|
||||
assert "Please report at https://github.com/guessit-io/guessit/issues" in str(excinfo.value)
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=no-self-use,pointless-statement,missing-docstring,invalid-name,line-too-long
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
from ..api import guessit
|
||||
|
||||
|
||||
def case1():
|
||||
return guessit('Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv')
|
||||
|
||||
|
||||
def case2():
|
||||
return guessit('Movies/Fantastic Mr Fox/Fantastic.Mr.Fox.2009.DVDRip.{x264+LC-AAC.5.1}{Fr-Eng}{Sub.Fr-Eng}-™.[sharethefiles.com].mkv')
|
||||
|
||||
|
||||
def case3():
|
||||
return guessit('Series/dexter/Dexter.5x02.Hello,.Bandit.ENG.-.sub.FR.HDTV.XviD-AlFleNi-TeaM.[tvu.org.ru].avi')
|
||||
|
||||
|
||||
def case4():
|
||||
return guessit('Movies/The Doors (1991)/09.03.08.The.Doors.(1991).BDRip.720p.AC3.X264-HiS@SiLUHD-English.[sharethefiles.com].mkv')
|
||||
|
||||
|
||||
@pytest.mark.benchmark(
|
||||
group="Performance Tests",
|
||||
min_time=1,
|
||||
max_time=2,
|
||||
min_rounds=5,
|
||||
timer=time.time,
|
||||
disable_gc=True,
|
||||
warmup=False
|
||||
)
|
||||
@pytest.mark.skipif(True, reason="Disabled")
|
||||
class TestBenchmark(object):
|
||||
def test_case1(self, benchmark):
|
||||
ret = benchmark(case1)
|
||||
assert ret
|
||||
|
||||
def test_case2(self, benchmark):
|
||||
ret = benchmark(case2)
|
||||
assert ret
|
||||
|
||||
def test_case3(self, benchmark):
|
||||
ret = benchmark(case3)
|
||||
assert ret
|
||||
|
||||
def test_case4(self, benchmark):
|
||||
ret = benchmark(case4)
|
||||
assert ret
|
||||
@@ -1,72 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from ..__main__ import main
|
||||
|
||||
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
||||
|
||||
|
||||
def test_main_no_args():
|
||||
main([])
|
||||
|
||||
|
||||
def test_main():
|
||||
main(['Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv'])
|
||||
|
||||
|
||||
def test_main_unicode():
|
||||
main(['[阿维达].Avida.2006.FRENCH.DVDRiP.XViD-PROD.avi'])
|
||||
|
||||
|
||||
def test_main_forced_unicode():
|
||||
main([u'Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv'])
|
||||
|
||||
|
||||
def test_main_verbose():
|
||||
main(['Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv', '--verbose'])
|
||||
|
||||
|
||||
def test_main_yaml():
|
||||
main(['Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv', '--yaml'])
|
||||
|
||||
|
||||
def test_main_json():
|
||||
main(['Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv', '--json'])
|
||||
|
||||
|
||||
def test_main_show_property():
|
||||
main(['Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv', '-P', 'title'])
|
||||
|
||||
|
||||
def test_main_advanced():
|
||||
main(['Fear.and.Loathing.in.Las.Vegas.FRENCH.ENGLISH.720p.HDDVD.DTS.x264-ESiR.mkv', '-a'])
|
||||
|
||||
|
||||
def test_main_input():
|
||||
main(['--input', os.path.join(__location__, 'test-input-file.txt')])
|
||||
|
||||
|
||||
def test_main_properties():
|
||||
main(['-p'])
|
||||
main(['-p', '--json'])
|
||||
main(['-p', '--yaml'])
|
||||
|
||||
|
||||
def test_main_values():
|
||||
main(['-V'])
|
||||
main(['-V', '--json'])
|
||||
main(['-V', '--yaml'])
|
||||
|
||||
|
||||
def test_main_help():
|
||||
with pytest.raises(SystemExit):
|
||||
main(['--help'])
|
||||
|
||||
|
||||
def test_main_version():
|
||||
main(['--version'])
|
||||
@@ -1,175 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, pointless-string-statement
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from ..options import get_options_file_locations, merge_options, load_config_file, ConfigurationException, \
|
||||
load_config
|
||||
|
||||
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
||||
|
||||
|
||||
def test_config_locations():
|
||||
homedir = '/root'
|
||||
cwd = '/root/cwd'
|
||||
|
||||
locations = get_options_file_locations(homedir, cwd, True)
|
||||
assert len(locations) == 9
|
||||
|
||||
assert '/root/.guessit/options.json' in locations
|
||||
assert '/root/.guessit/options.yml' in locations
|
||||
assert '/root/.guessit/options.yaml' in locations
|
||||
assert '/root/.config/guessit/options.json' in locations
|
||||
assert '/root/.config/guessit/options.yml' in locations
|
||||
assert '/root/.config/guessit/options.yaml' in locations
|
||||
assert '/root/cwd/guessit.options.json' in locations
|
||||
assert '/root/cwd/guessit.options.yml' in locations
|
||||
assert '/root/cwd/guessit.options.yaml' in locations
|
||||
|
||||
|
||||
def test_merge_configurations():
|
||||
c1 = {'param1': True, 'param2': True, 'param3': False}
|
||||
c2 = {'param1': False, 'param2': True, 'param3': False}
|
||||
c3 = {'param1': False, 'param2': True, 'param3': False}
|
||||
|
||||
merged = merge_options(c1, c2, c3)
|
||||
assert not merged['param1']
|
||||
assert merged['param2']
|
||||
assert not merged['param3']
|
||||
|
||||
merged = merge_options(c3, c2, c1)
|
||||
assert merged['param1']
|
||||
assert merged['param2']
|
||||
assert not merged['param3']
|
||||
|
||||
|
||||
def test_merge_configurations_lists():
|
||||
c1 = {'param1': [1], 'param2': True, 'param3': False}
|
||||
c2 = {'param1': [2], 'param2': True, 'param3': False}
|
||||
c3 = {'param1': [3], 'param2': True, 'param3': False}
|
||||
|
||||
merged = merge_options(c1, c2, c3)
|
||||
assert merged['param1'] == [1, 2, 3]
|
||||
assert merged['param2']
|
||||
assert not merged['param3']
|
||||
|
||||
merged = merge_options(c3, c2, c1)
|
||||
assert merged['param1'] == [3, 2, 1]
|
||||
assert merged['param2']
|
||||
assert not merged['param3']
|
||||
|
||||
|
||||
def test_merge_configurations_deep():
|
||||
c1 = {'param1': [1], 'param2': {'d1': [1]}, 'param3': False}
|
||||
c2 = {'param1': [2], 'param2': {'d1': [2]}, 'param3': False}
|
||||
c3 = {'param1': [3], 'param2': {'d3': [3]}, 'param3': False}
|
||||
|
||||
merged = merge_options(c1, c2, c3)
|
||||
assert merged['param1'] == [1, 2, 3]
|
||||
assert merged['param2']['d1'] == [1, 2]
|
||||
assert merged['param2']['d3'] == [3]
|
||||
assert 'd2' not in merged['param2']
|
||||
assert not merged['param3']
|
||||
|
||||
merged = merge_options(c3, c2, c1)
|
||||
assert merged['param1'] == [3, 2, 1]
|
||||
assert merged['param2']
|
||||
assert merged['param2']['d1'] == [2, 1]
|
||||
assert 'd2' not in merged['param2']
|
||||
assert merged['param2']['d3'] == [3]
|
||||
assert not merged['param3']
|
||||
|
||||
|
||||
def test_merge_configurations_pristine_all():
|
||||
c1 = {'param1': [1], 'param2': True, 'param3': False}
|
||||
c2 = {'param1': [2], 'param2': True, 'param3': False, 'pristine': True}
|
||||
c3 = {'param1': [3], 'param2': True, 'param3': False}
|
||||
|
||||
merged = merge_options(c1, c2, c3)
|
||||
assert merged['param1'] == [2, 3]
|
||||
assert merged['param2']
|
||||
assert not merged['param3']
|
||||
|
||||
merged = merge_options(c3, c2, c1)
|
||||
assert merged['param1'] == [2, 1]
|
||||
assert merged['param2']
|
||||
assert not merged['param3']
|
||||
|
||||
|
||||
def test_merge_configurations_pristine_properties():
|
||||
c1 = {'param1': [1], 'param2': False, 'param3': True}
|
||||
c2 = {'param1': [2], 'param2': True, 'param3': False, 'pristine': ['param2', 'param3']}
|
||||
c3 = {'param1': [3], 'param2': True, 'param3': False}
|
||||
|
||||
merged = merge_options(c1, c2, c3)
|
||||
assert merged['param1'] == [1, 2, 3]
|
||||
assert merged['param2']
|
||||
assert not merged['param3']
|
||||
|
||||
|
||||
def test_merge_configurations_pristine_properties_deep():
|
||||
c1 = {'param1': [1], 'param2': {'d1': False}, 'param3': True}
|
||||
c2 = {'param1': [2], 'param2': {'d1': True}, 'param3': False, 'pristine': ['param2', 'param3']}
|
||||
c3 = {'param1': [3], 'param2': {'d1': True}, 'param3': False}
|
||||
|
||||
merged = merge_options(c1, c2, c3)
|
||||
assert merged['param1'] == [1, 2, 3]
|
||||
assert merged['param2']
|
||||
assert not merged['param3']
|
||||
|
||||
|
||||
def test_merge_configurations_pristine_properties2():
|
||||
c1 = {'param1': [1], 'param2': False, 'param3': True}
|
||||
c2 = {'param1': [2], 'param2': True, 'param3': False, 'pristine': ['param1', 'param2', 'param3']}
|
||||
c3 = {'param1': [3], 'param2': True, 'param3': False}
|
||||
|
||||
merged = merge_options(c1, c2, c3)
|
||||
assert merged['param1'] == [2, 3]
|
||||
assert merged['param2']
|
||||
assert not merged['param3']
|
||||
|
||||
|
||||
def test_load_config_file():
|
||||
json_config = load_config_file(os.path.join(__location__, 'config', 'test.json'))
|
||||
yml_config = load_config_file(os.path.join(__location__, 'config', 'test.yml'))
|
||||
yaml_config = load_config_file(os.path.join(__location__, 'config', 'test.yaml'))
|
||||
|
||||
assert json_config['expected_title'] == ['The 100', 'OSS 117']
|
||||
assert yml_config['expected_title'] == ['The 100', 'OSS 117']
|
||||
assert yaml_config['expected_title'] == ['The 100', 'OSS 117']
|
||||
|
||||
assert json_config['yaml'] is False
|
||||
assert yml_config['yaml'] is True
|
||||
assert yaml_config['yaml'] is True
|
||||
|
||||
with pytest.raises(ConfigurationException) as excinfo:
|
||||
load_config_file(os.path.join(__location__, 'config', 'dummy.txt'))
|
||||
|
||||
assert excinfo.match('Configuration file extension is not supported for ".*?dummy.txt" file\\.')
|
||||
|
||||
|
||||
def test_load_config():
|
||||
config = load_config({'no_default_config': True, 'param1': 'test',
|
||||
'config': [os.path.join(__location__, 'config', 'test.yml')]})
|
||||
|
||||
assert not config.get('param1')
|
||||
|
||||
assert config.get('advanced_config') # advanced_config is still loaded from default
|
||||
assert config['expected_title'] == ['The 100', 'OSS 117']
|
||||
assert config['yaml'] is True
|
||||
|
||||
config = load_config({'no_default_config': True, 'param1': 'test'})
|
||||
|
||||
assert not config.get('param1')
|
||||
|
||||
assert 'expected_title' not in config
|
||||
assert 'yaml' not in config
|
||||
|
||||
config = load_config({'no_default_config': True, 'param1': 'test', 'config': ['false']})
|
||||
|
||||
assert not config.get('param1')
|
||||
|
||||
assert 'expected_title' not in config
|
||||
assert 'yaml' not in config
|
||||
@@ -1,297 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name
|
||||
import logging
|
||||
import os
|
||||
# io.open supports encoding= in python 2.7
|
||||
from io import open # pylint: disable=redefined-builtin
|
||||
|
||||
import babelfish
|
||||
import six # pylint:disable=wrong-import-order
|
||||
import yaml # pylint:disable=wrong-import-order
|
||||
from rebulk.remodule import re
|
||||
from rebulk.utils import is_iterable
|
||||
|
||||
from .. import guessit
|
||||
from ..options import parse_options
|
||||
from ..yamlutils import OrderedDictYAMLLoader
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
||||
|
||||
|
||||
class EntryResult(object):
|
||||
def __init__(self, string, negates=False):
|
||||
self.string = string
|
||||
self.negates = negates
|
||||
self.valid = []
|
||||
self.missing = []
|
||||
self.different = []
|
||||
self.extra = []
|
||||
self.others = []
|
||||
|
||||
@property
|
||||
def ok(self):
|
||||
if self.negates:
|
||||
return self.missing or self.different
|
||||
return not self.missing and not self.different and not self.extra and not self.others
|
||||
|
||||
@property
|
||||
def warning(self):
|
||||
if self.negates:
|
||||
return False
|
||||
return not self.missing and not self.different and self.extra
|
||||
|
||||
@property
|
||||
def error(self):
|
||||
if self.negates:
|
||||
return not self.missing and not self.different and not self.others
|
||||
return self.missing or self.different or self.others
|
||||
|
||||
def __repr__(self):
|
||||
if self.ok:
|
||||
return self.string + ': OK!'
|
||||
if self.warning:
|
||||
return '%s%s: WARNING! (valid=%i, extra=%i)' % ('-' if self.negates else '', self.string, len(self.valid),
|
||||
len(self.extra))
|
||||
if self.error:
|
||||
return '%s%s: ERROR! (valid=%i, missing=%i, different=%i, extra=%i, others=%i)' % \
|
||||
('-' if self.negates else '', self.string, len(self.valid), len(self.missing), len(self.different),
|
||||
len(self.extra), len(self.others))
|
||||
|
||||
return '%s%s: UNKOWN! (valid=%i, missing=%i, different=%i, extra=%i, others=%i)' % \
|
||||
('-' if self.negates else '', self.string, len(self.valid), len(self.missing), len(self.different),
|
||||
len(self.extra), len(self.others))
|
||||
|
||||
@property
|
||||
def details(self):
|
||||
ret = []
|
||||
if self.valid:
|
||||
ret.append('valid=' + str(len(self.valid)))
|
||||
for valid in self.valid:
|
||||
ret.append(' ' * 4 + str(valid))
|
||||
if self.missing:
|
||||
ret.append('missing=' + str(len(self.missing)))
|
||||
for missing in self.missing:
|
||||
ret.append(' ' * 4 + str(missing))
|
||||
if self.different:
|
||||
ret.append('different=' + str(len(self.different)))
|
||||
for different in self.different:
|
||||
ret.append(' ' * 4 + str(different))
|
||||
if self.extra:
|
||||
ret.append('extra=' + str(len(self.extra)))
|
||||
for extra in self.extra:
|
||||
ret.append(' ' * 4 + str(extra))
|
||||
if self.others:
|
||||
ret.append('others=' + str(len(self.others)))
|
||||
for other in self.others:
|
||||
ret.append(' ' * 4 + str(other))
|
||||
return ret
|
||||
|
||||
|
||||
class Results(list):
|
||||
def assert_ok(self):
|
||||
errors = [entry for entry in self if entry.error]
|
||||
assert not errors
|
||||
|
||||
|
||||
def files_and_ids(predicate=None):
|
||||
files = []
|
||||
ids = []
|
||||
|
||||
for (dirpath, _, filenames) in os.walk(__location__):
|
||||
if os.path.split(dirpath)[-1] == 'config':
|
||||
continue
|
||||
if dirpath == __location__:
|
||||
dirpath_rel = ''
|
||||
else:
|
||||
dirpath_rel = os.path.relpath(dirpath, __location__)
|
||||
for filename in filenames:
|
||||
name, ext = os.path.splitext(filename)
|
||||
filepath = os.path.join(dirpath_rel, filename)
|
||||
if ext == '.yml' and (not predicate or predicate(filepath)):
|
||||
files.append(filepath)
|
||||
ids.append(os.path.join(dirpath_rel, name))
|
||||
|
||||
return files, ids
|
||||
|
||||
|
||||
class TestYml(object):
|
||||
"""
|
||||
Run tests from yaml files.
|
||||
Multiple input strings having same expected results can be chained.
|
||||
Use $ marker to check inputs that should not match results.
|
||||
"""
|
||||
|
||||
options_re = re.compile(r'^([ +-]+)(.*)')
|
||||
|
||||
def _get_unique_id(self, collection, base_id):
|
||||
ret = base_id
|
||||
i = 2
|
||||
while ret in collection:
|
||||
suffix = "-" + str(i)
|
||||
ret = base_id + suffix
|
||||
i += 1
|
||||
return ret
|
||||
|
||||
def pytest_generate_tests(self, metafunc):
|
||||
if 'yml_test_case' in metafunc.fixturenames:
|
||||
entries = []
|
||||
entry_ids = []
|
||||
entry_set = set()
|
||||
|
||||
for filename, _ in zip(*files_and_ids()):
|
||||
with open(os.path.join(__location__, filename), 'r', encoding='utf-8') as infile:
|
||||
data = yaml.load(infile, OrderedDictYAMLLoader)
|
||||
|
||||
last_expected = None
|
||||
for string, expected in reversed(list(data.items())):
|
||||
if expected is None:
|
||||
data[string] = last_expected
|
||||
else:
|
||||
last_expected = expected
|
||||
|
||||
default = None
|
||||
try:
|
||||
default = data['__default__']
|
||||
del data['__default__']
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
for string, expected in data.items():
|
||||
TestYml.set_default(expected, default)
|
||||
string = TestYml.fix_encoding(string, expected)
|
||||
|
||||
entries.append((filename, string, expected))
|
||||
unique_id = self._get_unique_id(entry_set, '[' + filename + '] ' + str(string))
|
||||
entry_set.add(unique_id)
|
||||
entry_ids.append(unique_id)
|
||||
|
||||
metafunc.parametrize('yml_test_case', entries, ids=entry_ids)
|
||||
|
||||
@staticmethod
|
||||
def set_default(expected, default):
|
||||
if default:
|
||||
for k, v in default.items():
|
||||
if k not in expected:
|
||||
expected[k] = v
|
||||
|
||||
@classmethod
|
||||
def fix_encoding(cls, string, expected):
|
||||
if six.PY2:
|
||||
if isinstance(string, six.text_type):
|
||||
string = string.encode('utf-8')
|
||||
converts = []
|
||||
for k, v in expected.items():
|
||||
if isinstance(v, six.text_type):
|
||||
v = v.encode('utf-8')
|
||||
converts.append((k, v))
|
||||
for k, v in converts:
|
||||
expected[k] = v
|
||||
if not isinstance(string, str):
|
||||
string = str(string)
|
||||
return string
|
||||
|
||||
def test_entry(self, yml_test_case):
|
||||
filename, string, expected = yml_test_case
|
||||
result = self.check_data(filename, string, expected)
|
||||
assert not result.error
|
||||
|
||||
def check_data(self, filename, string, expected):
|
||||
entry = self.check(string, expected)
|
||||
if entry.ok:
|
||||
logger.debug('[%s] %s', filename, entry)
|
||||
elif entry.warning:
|
||||
logger.warning('[%s] %s', filename, entry)
|
||||
elif entry.error:
|
||||
logger.error('[%s] %s', filename, entry)
|
||||
for line in entry.details:
|
||||
logger.error('[%s] %s', filename, ' ' * 4 + line)
|
||||
return entry
|
||||
|
||||
def check(self, string, expected):
|
||||
negates, global_, string = self.parse_token_options(string)
|
||||
|
||||
options = expected.get('options')
|
||||
if options is None:
|
||||
options = {}
|
||||
if not isinstance(options, dict):
|
||||
options = parse_options(options)
|
||||
try:
|
||||
result = guessit(string, options)
|
||||
except Exception as exc:
|
||||
logger.error('[%s] Exception: %s', string, exc)
|
||||
raise exc
|
||||
|
||||
entry = EntryResult(string, negates)
|
||||
|
||||
if global_:
|
||||
self.check_global(string, result, entry)
|
||||
|
||||
self.check_expected(result, expected, entry)
|
||||
|
||||
return entry
|
||||
|
||||
def parse_token_options(self, string):
|
||||
matches = self.options_re.search(string)
|
||||
negates = False
|
||||
global_ = False
|
||||
if matches:
|
||||
string = matches.group(2)
|
||||
for opt in matches.group(1):
|
||||
if '-' in opt:
|
||||
negates = True
|
||||
if '+' in opt:
|
||||
global_ = True
|
||||
return negates, global_, string
|
||||
|
||||
def check_global(self, string, result, entry):
|
||||
global_span = []
|
||||
for result_matches in result.matches.values():
|
||||
for result_match in result_matches:
|
||||
if not global_span:
|
||||
global_span = list(result_match.span)
|
||||
else:
|
||||
if global_span[0] > result_match.span[0]:
|
||||
global_span[0] = result_match.span[0]
|
||||
if global_span[1] < result_match.span[1]:
|
||||
global_span[1] = result_match.span[1]
|
||||
if global_span and global_span[1] - global_span[0] < len(string):
|
||||
entry.others.append("Match is not global")
|
||||
|
||||
def is_same(self, value, expected):
|
||||
values = set(value) if is_iterable(value) else set((value,))
|
||||
expecteds = set(expected) if is_iterable(expected) else set((expected,))
|
||||
if len(values) != len(expecteds):
|
||||
return False
|
||||
if isinstance(next(iter(values)), babelfish.Language):
|
||||
# pylint: disable=no-member
|
||||
expecteds = {babelfish.Language.fromguessit(expected) for expected in expecteds}
|
||||
elif isinstance(next(iter(values)), babelfish.Country):
|
||||
# pylint: disable=no-member
|
||||
expecteds = {babelfish.Country.fromguessit(expected) for expected in expecteds}
|
||||
return values == expecteds
|
||||
|
||||
def check_expected(self, result, expected, entry):
|
||||
if expected:
|
||||
for expected_key, expected_value in expected.items():
|
||||
if expected_key and expected_key != 'options' and expected_value is not None:
|
||||
negates_key, _, result_key = self.parse_token_options(expected_key)
|
||||
if result_key in result.keys():
|
||||
if not self.is_same(result[result_key], expected_value):
|
||||
if negates_key:
|
||||
entry.valid.append((expected_key, expected_value))
|
||||
else:
|
||||
entry.different.append((expected_key, expected_value, result[result_key]))
|
||||
else:
|
||||
if negates_key:
|
||||
entry.different.append((expected_key, expected_value, result[result_key]))
|
||||
else:
|
||||
entry.valid.append((expected_key, expected_value))
|
||||
elif not negates_key:
|
||||
entry.missing.append((expected_key, expected_value))
|
||||
|
||||
for result_key, result_value in result.items():
|
||||
if result_key not in expected.keys():
|
||||
entry.extra.append((result_key, result_value))
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user