* slightly improved release {group} matching

This commit is contained in:
Reinhard Pointner 2012-06-28 02:36:32 +00:00
parent 90705fd66f
commit 3e197b2263
3 changed files with 30 additions and 9 deletions

View File

@ -48,8 +48,19 @@ public class ReleaseInfo {
public String getReleaseGroup(File file) throws IOException {
// check parent and itself for group names
return matchLast(getReleaseGroupPattern(false), releaseGroupResource.get(), file.getParent(), file.getName());
// check file and folder for release group names
String[] groups = releaseGroupResource.get();
String[] files = new String[] { file.getParentFile().getName(), file.getName() };
// try case-sensitive match
String match = matchLast(getReleaseGroupPattern(true), groups, files);
// try case-insensitive match as fallback
if (match == null) {
match = matchLast(getReleaseGroupPattern(false), groups, files);
}
return match;
}

View File

@ -1,10 +1,7 @@
(?-i:CLASSiC)
(?-i:DOCU)
(?-i:CLASSIC|CLASSiC)
(?-i:ENGLISH)
(?-i:FIXED)
(?-i:FRENCH)
(?-i:GERMAN)
(?-i:iNT)
(?-i:LIMITED|LiMiTED)
(?-i:SPANISH)
(?-i:SWEDISH|SWEDiSH)
@ -45,6 +42,7 @@ DC
Demonoid
Director's.Cut
Directors.Cut
docu
Dual.Audio
dubbed
DVDXvID
@ -55,6 +53,7 @@ Extended.Version
ExtraScene
ExtraTorrent
Final.Cut
FIXED
Fra
FRE
GER
@ -62,6 +61,7 @@ Hard.Subbed
HDRip
Hindi
HQ
iNT
iNTERNAL
iPod
ISO

View File

@ -37,6 +37,7 @@ ALLiANCE
ALLZINE
AMiABLE
AN0NYM0US
Anarchy
aNBc
ANBU
Ani-Kraze
@ -185,6 +186,7 @@ DUQA
DutchReleaseTeam
DvF
DVL
dvsky
EBi
EbP
ECHiZEN
@ -206,6 +208,7 @@ eots
EPiK
ESiR
ESPiSE
etach
ETHOS
ETM
ETRG
@ -380,7 +383,6 @@ Larceny
LCHD
LEVERAGE
LEViTY
LIMITED
LiPAN
LMAO
LoD
@ -394,6 +396,7 @@ LTT
LUSO
M794
MACHD
macro
MAGiCAL
MAGiCViBE
MAiN
@ -402,6 +405,7 @@ MARiNES
MAXSPEED
MC
MCR
med
MEDiAMANiACS
MEDiEVAL
MELiTE
@ -483,6 +487,7 @@ PELLUCiD
Penumbra
PerfectionHD
PFa
phase
PhoenixRG
piepHD
PiLAF
@ -530,8 +535,8 @@ rabomil
RANDi
RAP
Razor1911
Reaperza
REAVERS
RED
Redµx
REFiNED
RELOADED
@ -589,6 +594,7 @@ SiTV
SKALiWAGZ
SLM
SLO
SLOMO
SMoKeR
Sneak
SNUGGLER
@ -598,12 +604,14 @@ SoW
SpaceHD
SPARKS
SPOOKY
sprinter
SSF
Stealthmaster
stieg
Stranded
streetwars
STV
Subject16
SuBoXoNe
SUNSPOT
SURFER
@ -613,6 +621,7 @@ Swesub
SYS
t00ng0d
Taka
tantrum
TARGET
TASTE
TASTETV
@ -634,12 +643,14 @@ TiMPE
TiMTY
TiTANS
TjHD
tla
TLF
TM
TN
TOKUS
TOPAZ
TorrenTGui
tpz
trentalent
TRiPS
TrollHD
@ -690,7 +701,6 @@ WAF
WANKAZ
WASTE
WAVEY
WEST
WHATELSE
WHiiZz
WiDE