* 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
import static groovy.io.FileType.*
// MediaDetection
import net.sourceforge.filebot.media.*
File.metaClass.resolve = { Object name -> new File(delegate, name.toString()) }
File.metaClass.getAt = { String name -> new File(delegate, name) }
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.isVerification = { _types.getFilter("verification").accept(delegate) }
File.metaClass.isArchive = { _types.getFilter("archive").accept(delegate) }
File.metaClass.isDisk = { MediaDetection.isDiskFolder(delegate) }
File.metaClass.getDir = { getParentFile() }
File.metaClass.hasFile = { c -> isDirectory() && listFiles().find(c) }
@ -171,7 +176,6 @@ def getRenameLog(complete = false) {
}
// Season / Episode helpers
import net.sourceforge.filebot.media.*
import net.sourceforge.filebot.similarity.*
def stripReleaseInfo(name, strict = true) {

View File

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

View File

@ -30,7 +30,7 @@ def forceAnime(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) {
// 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']
: [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)
if (dest && artwork) {
dest.mapByFolder().each{ dir, fs ->