diff --git a/website/data/release-groups.txt b/website/data/release-groups.txt index 5bad8f6e..c938f79a 100644 --- a/website/data/release-groups.txt +++ b/website/data/release-groups.txt @@ -530,6 +530,7 @@ FiCODVDR FiddleGoose FiHTV FilmHD +Filmikz FiNaLe FiTTY FiXi0N diff --git a/website/scripts/replace.groovy b/website/scripts/replace.groovy index c9edab39..6a1ea021 100644 --- a/website/scripts/replace.groovy +++ b/website/scripts/replace.groovy @@ -15,7 +15,7 @@ args.getFiles{ accept(it) }.each{ // override files only when --conflict override is set if (!it.equals(nfile)) { if (nfile.exists() && _args.conflict == 'override' && action != StandardRenameAction.TEST) { - nfile.delete(); // resolve conflict + nfile.delete() // resolve conflict } if (!nfile.exists()) { diff --git a/website/scripts/utorrent-postprocess.groovy b/website/scripts/utorrent-postprocess.groovy index b8125361..5d7d22f2 100644 --- a/website/scripts/utorrent-postprocess.groovy +++ b/website/scripts/utorrent-postprocess.groovy @@ -30,7 +30,8 @@ def gmail = tryQuietly{ gmail.split(':', 2) } def format = [ tvs: tryQuietly{ seriesFormat } ?: '''TV Shows/{n}/{episode.special ? "Special" : "Season "+s}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t}''', anime: tryQuietly{ animeFormat } ?: '''Anime/{n}/{n} - {sxe} - {t}''', - mov: tryQuietly{ movieFormat } ?: '''Movies/{n} ({y})/{n} ({y}){" CD$pi"}{".$lang"}''' + mov: tryQuietly{ movieFormat } ?: '''Movies/{n} ({y})/{n} ({y}){" CD$pi"}{".$lang"}''', + music: tryQuietly{ musicFormat } ?: '''Music/{n}/{album}/{n} - {t}''' ] @@ -78,13 +79,13 @@ if (args.empty) { input = input.flatten() // extract archives (zip, rar, etc) that contain at least one video file -input += extract(file: input.findAll{ it.isArchive() }, output: null, conflict: 'override', filter: { it.isVideo() }, forceExtractAll: true) +input += extract(file: input.findAll{ it.isArchive() }, output: null, conflict: 'override', filter: { it.isVideo() || it.isAudio() }, forceExtractAll: true) // sanitize input input = input.findAll{ it?.exists() }.collect{ it.canonicalFile }.unique() // process only media files -input = input.findAll{ it.isVideo() || it.isSubtitle() || it.isDisk() } +input = input.findAll{ it.isVideo() || it.isSubtitle() || it.isDisk() || it.isAudio() } // ignore clutter files input = input.findAll{ !(it.path =~ /\b(?i:sample|trailer|extras|deleted.scenes|music.video|scrapbook|behind.the.scenes)\b/) } @@ -100,6 +101,8 @@ def groups = input.groupBy{ f -> // skip auto-detection if possible if (forceIgnore(f)) return [] + if (f.isAudio()) // PROCESS MUSIC FOLDER BY FOLDER + return [music: f.dir.name] if (forceMovie(f)) return [mov: detectMovie(f, false)] if (forceSeries(f)) @@ -185,6 +188,14 @@ groups.each{ group, files -> throw new Exception("Failed to rename movie: $group.mov") } } + + // MUSIC MODE + if (group.music) { + def dest = rename(file:files, format:format.music, db:'AcoustID') + if (dest == null && failOnError) { + throw new Exception("Failed to rename music: $group.music") + } + } } // skip notifications if nothing was renamed anyway