* 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 { public String getReleaseGroup(File file) throws IOException {
// check parent and itself for group names // check file and folder for release group names
return matchLast(getReleaseGroupPattern(false), releaseGroupResource.get(), file.getParent(), file.getName()); 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:CLASSIC|CLASSiC)
(?-i:DOCU)
(?-i:ENGLISH) (?-i:ENGLISH)
(?-i:FIXED)
(?-i:FRENCH) (?-i:FRENCH)
(?-i:GERMAN) (?-i:GERMAN)
(?-i:iNT)
(?-i:LIMITED|LiMiTED) (?-i:LIMITED|LiMiTED)
(?-i:SPANISH) (?-i:SPANISH)
(?-i:SWEDISH|SWEDiSH) (?-i:SWEDISH|SWEDiSH)
@ -45,6 +42,7 @@ DC
Demonoid Demonoid
Director's.Cut Director's.Cut
Directors.Cut Directors.Cut
docu
Dual.Audio Dual.Audio
dubbed dubbed
DVDXvID DVDXvID
@ -55,6 +53,7 @@ Extended.Version
ExtraScene ExtraScene
ExtraTorrent ExtraTorrent
Final.Cut Final.Cut
FIXED
Fra Fra
FRE FRE
GER GER
@ -62,6 +61,7 @@ Hard.Subbed
HDRip HDRip
Hindi Hindi
HQ HQ
iNT
iNTERNAL iNTERNAL
iPod iPod
ISO ISO

View File

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