* function for disk folder detection

* more default excludes for utorrent-postprocess
* blacklist genre folders
This commit is contained in:
Reinhard Pointner 2012-08-05 01:55:14 +00:00
parent 4deaa297fc
commit 999f53a6d3
3 changed files with 17 additions and 3 deletions

View File

@ -1,6 +1,10 @@
// File selector methods // File selector methods
import static groovy.io.FileType.* import static groovy.io.FileType.*
// MediaDetection
import net.sourceforge.filebot.media.*
File.metaClass.resolve = { Object name -> new File(delegate, name.toString()) } File.metaClass.resolve = { Object name -> new File(delegate, name.toString()) }
File.metaClass.getAt = { String name -> new File(delegate, name) } File.metaClass.getAt = { String name -> new File(delegate, name) }
File.metaClass.listFiles = { c -> delegate.isDirectory() ? delegate.listFiles().findAll(c) : []} File.metaClass.listFiles = { c -> delegate.isDirectory() ? delegate.listFiles().findAll(c) : []}
@ -10,6 +14,7 @@ File.metaClass.isAudio = { _types.getFilter("audio").accept(delegate) }
File.metaClass.isSubtitle = { _types.getFilter("subtitle").accept(delegate) } File.metaClass.isSubtitle = { _types.getFilter("subtitle").accept(delegate) }
File.metaClass.isVerification = { _types.getFilter("verification").accept(delegate) } File.metaClass.isVerification = { _types.getFilter("verification").accept(delegate) }
File.metaClass.isArchive = { _types.getFilter("archive").accept(delegate) } File.metaClass.isArchive = { _types.getFilter("archive").accept(delegate) }
File.metaClass.isDisk = { MediaDetection.isDiskFolder(delegate) }
File.metaClass.getDir = { getParentFile() } File.metaClass.getDir = { getParentFile() }
File.metaClass.hasFile = { c -> isDirectory() && listFiles().find(c) } File.metaClass.hasFile = { c -> isDirectory() && listFiles().find(c) }
@ -171,7 +176,6 @@ def getRenameLog(complete = false) {
} }
// Season / Episode helpers // Season / Episode helpers
import net.sourceforge.filebot.media.*
import net.sourceforge.filebot.similarity.* import net.sourceforge.filebot.similarity.*
def stripReleaseInfo(name, strict = true) { def stripReleaseInfo(name, strict = true) {

View File

@ -32,6 +32,8 @@
^VIDEO_TS$ ^VIDEO_TS$
A.Release.Lounge A.Release.Lounge
ABC ABC
Action
Adventure
Anime[s]? Anime[s]?
Arte Arte
BBC BBC
@ -43,6 +45,8 @@ Channel.4
Channel.5 Channel.5
CLASSIC CLASSIC
CN CN
Comedy
Crime
CVCD CVCD
DC DC
Demonoid Demonoid
@ -50,15 +54,18 @@ Director's.Cut
Directors.Cut Directors.Cut
Discovery.Channel Discovery.Channel
docu docu
Documentary
Dual.Audio Dual.Audio
dubbed dubbed
DVDXvID DVDXvID
DVSKY DVSKY
ENG ENG
Erotic
EXTENDED EXTENDED
Extended.Version Extended.Version
ExtraScene ExtraScene
ExtraTorrent ExtraTorrent
Fantasy
Final.Cut Final.Cut
FIXED FIXED
Fra Fra
@ -69,6 +76,7 @@ HBO
HDRip HDRip
Hindi Hindi
History.Channel History.Channel
Horror
HQ HQ
info info
iNT iNT
@ -109,8 +117,10 @@ ReRip
RESYNC RESYNC
RETAIL RETAIL
RiffTrax RiffTrax
Romance
sample[s]? sample[s]?
SBS SBS
Science.Fiction
Screenshot Screenshot
ShareGo ShareGo
ShareReactor ShareReactor

View File

@ -30,7 +30,7 @@ def forceAnime(f) {
} }
def forceIgnore(f) { def forceIgnore(f) {
tryQuietly{ ut_label } =~ /^(?i:Music|Ebook|other)/ tryQuietly{ ut_label } =~ /^(?i:Music|Audio|Ebook|other|what.cd|waffles.fm)/
} }
@ -120,7 +120,7 @@ groups.each{ group, files ->
if ((group.tvs || group.anime) && !group.mov) { if ((group.tvs || group.anime) && !group.mov) {
// choose series / anime config // choose series / anime config
def config = group.tvs ? [name: group.tvs, format:'TV Shows/{n}/{episode.special ? "Special" : "Season "+s}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t}', db:'TheTVDB'] def config = group.tvs ? [name: group.tvs, format:'TV Shows/{n}/{episode.special ? "Special" : "Season "+s}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t}', db:'TheTVDB']
: [name: group.anime, format:'Anime/{n}/{n} - {e.pad(2)} - {t}', db:'AniDB'] : [name: group.anime, format:'Anime/{n}/{n} - {sxe} - {t}', db:'AniDB']
def dest = rename(file: files, format: config.format, db: config.db) def dest = rename(file: files, format: config.format, db: config.db)
if (dest && artwork) { if (dest && artwork) {
dest.mapByFolder().each{ dir, fs -> dest.mapByFolder().each{ dir, fs ->