1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-17 23:05:03 -05:00

* should work a little bit better like this

This commit is contained in:
Reinhard Pointner 2012-07-08 13:13:18 +00:00
parent 861d557e92
commit e184a70e44

View File

@ -38,18 +38,15 @@ def groups = input.groupBy{ f ->
if (fn =~ "(?i:$tvs - .+)" || parseEpisodeNumber(fn, true) || parseDate(fn)) {
println "Exclude Movie: $mov"
mov = null
} else if (detectMovie(f, true)) {
// probably a movie, but maybe not
if (fn =~ /(19|20)\d{2}/ || !(tvs =~ "(?i:$mov.name)")) {
println "Exclude Series: $tvs"
tvs = null
} else if (fn =~ "(?i:$tvs)" && parseEpisodeNumber(fn.after(tvs), false)) {
println "Exclude Movie: $mov"
mov = null
} else if (fn =~ "(?i:$mov.name)" && !parseEpisodeNumber(fn.after(mov.name), false)) {
println "Exclude Series: $tvs"
tvs = null
}
} else if (detectMovie(f, true) && (fn =~ /(19|20)\d{2}/ || !(tvs =~ "(?i:$mov.name)"))) {
println "Exclude Series: $tvs"
tvs = null
} else if (fn =~ "(?i:$tvs)" && parseEpisodeNumber(fn.after(tvs), false)) {
println "Exclude Movie: $mov"
mov = null
} else if (fn =~ "(?i:$mov.name)" && !parseEpisodeNumber(fn.after(mov.name), false)) {
println "Exclude Series: $tvs"
tvs = null
}
}