New Usage Option:
Code: Select all
filebot --def mapfile=/path/to/mapfile.txt
https://github.com/jwyant/scripts/blob/devel/amc.groovy
Added new command-line switch - mapfile
Code: Select all
// user-defined show mapping
def fileMappings = tryQuietly{ csv(mapfile) }
Code: Select all
def dest = null
fileMappings.each{ fileMapping, showMapping ->
if (dest == null) { dest = rename(file: files.findAll{ it =~ /(?i:\/${fileMapping})/}, query: "${showMapping}", format: config.format, db: config.db) }
}
// if it's still null (we've exhausted all exceptions), just do a normal match
if (dest == null) { dest = rename(file: files, format: config.format, db: config.db) }
The mapfile format is "filter from the start of the filename";"TVDB Series Name"
Example mapfile:
Code: Select all
Louie;Louie (2010)
Top.Gear;Top Gear