From 4e20fca24875546028e7161370922cfc8a9f89a5 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 5 Jan 2012 05:30:22 +0000 Subject: [PATCH] * clean-up --- .../sourceforge/filebot/cli/ScriptShell.lib.groovy | 2 +- website/data/release-groups.txt | 1 + website/index.html | 4 ++-- website/scripts/artwork.tmdb.groovy | 4 ---- website/scripts/artwork.tvdb.groovy | 3 --- website/scripts/housekeeping.groovy | 8 ++------ website/scripts/rsam.groovy | 12 ++++-------- website/scripts/sorty.groovy | 2 -- website/scripts/src.groovy | 3 +++ website/scripts/watcher.groovy | 9 ++++----- 10 files changed, 17 insertions(+), 31 deletions(-) diff --git a/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy b/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy index e5906450..d4cbcb92 100644 --- a/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy +++ b/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy @@ -165,7 +165,7 @@ def detectSeriesName(files, locale = Locale.ENGLISH) { return names == null || names.isEmpty() ? null : names.toList()[0] } -def detectMovie(movieFile, strict = false, locale = Locale.ENGLISH) { +def detectMovie(movieFile, locale = Locale.ENGLISH, strict = true) { def movies = MediaDetection.detectMovie(movieFile, OpenSubtitles, TheMovieDB, locale, strict) return movies == null || movies.isEmpty() ? null : movies.toList()[0] } diff --git a/website/data/release-groups.txt b/website/data/release-groups.txt index bd2c297a..a4839b22 100644 --- a/website/data/release-groups.txt +++ b/website/data/release-groups.txt @@ -90,6 +90,7 @@ EMPiREHD EnDoR ESiR ETM +ETRG EUHD EuReKA ExtraTorrentRG diff --git a/website/index.html b/website/index.html index 5fa17a5c..29742bcf 100644 --- a/website/index.html +++ b/website/index.html @@ -6,10 +6,10 @@ FileBot - The ultimate tv renamer / subtitle downloader / sfv validator - + - + diff --git a/website/scripts/artwork.tmdb.groovy b/website/scripts/artwork.tmdb.groovy index d3140400..d5a70547 100644 --- a/website/scripts/artwork.tmdb.groovy +++ b/website/scripts/artwork.tmdb.groovy @@ -1,9 +1,5 @@ // filebot -script "http://filebot.sf.net/scripts/artwork.tmdb.groovy" -trust-script /path/to/media/ -// EXPERIMENTAL // HERE THERE BE DRAGONS -if (net.sourceforge.filebot.Settings.applicationRevisionNumber < 838) throw new Exception("Application revision too old") - - /* * Fetch movie artwork. The movie is determined using the parent folders name. */ diff --git a/website/scripts/artwork.tvdb.groovy b/website/scripts/artwork.tvdb.groovy index d069070f..64432e33 100644 --- a/website/scripts/artwork.tvdb.groovy +++ b/website/scripts/artwork.tvdb.groovy @@ -1,8 +1,5 @@ // filebot -script "http://filebot.sf.net/scripts/artwork.tvdb.groovy" -trust-script /path/to/media/ -// EXPERIMENTAL // HERE THERE BE DRAGONS -if (net.sourceforge.filebot.Settings.applicationRevisionNumber < 838) throw new Exception("Application revision too old") - /* * Fetch series and season banners for all tv shows. Series name is auto-detected if possible or the folder name is used. */ diff --git a/website/scripts/housekeeping.groovy b/website/scripts/housekeeping.groovy index f7a4e08b..54a2cd5c 100644 --- a/website/scripts/housekeeping.groovy +++ b/website/scripts/housekeeping.groovy @@ -1,16 +1,12 @@ // filebot -script "http://filebot.sf.net/scripts/housekeeping.groovy" -// EXPERIMENTAL // HERE THERE BE DRAGONS -if (net.sourceforge.filebot.Settings.applicationRevisionNumber < 783) throw new Exception("Revision 783+ required") - - /* * Watch folder for new tv shows and automatically * move/rename new episodes into a predefined folder structure */ -// check for new media files once every 5 seconds -def updateFrequency = 5 * 1000 +// check for new media files once every 5 minutes +def updateFrequency = 5 * 60 * 1000 // V:/TV Shows/Stargate/Season 1/Stargate.S01E01.Pilot def episodeFormat = "{com.sun.jna.Platform.isWindows() ? file[0] : home}/TV Shows/{n}{'/Season '+s}/{n.space('.')}.{s00e00}.{t.space('.')}" diff --git a/website/scripts/rsam.groovy b/website/scripts/rsam.groovy index dd7aac60..fc70fee8 100644 --- a/website/scripts/rsam.groovy +++ b/website/scripts/rsam.groovy @@ -1,8 +1,5 @@ // filebot -script "http://filebot.sf.net/scripts/rsam.groovy" -// EXPERIMENTAL // HERE THERE BE DRAGONS -if (net.sourceforge.filebot.Settings.applicationRevisionNumber < 783) throw new Exception("Revision 783+ required") - def isMatch(a, b) { similarity(a, b) > 0.9 } @@ -11,11 +8,10 @@ def isMatch(a, b) { similarity(a, b) > 0.9 } */ args.eachMediaFolder { dir -> def n = dir.name - def lang = Locale.ENGLISH - - [ [db:anidb, query:{ anidb.search(n, lang).find{ isMatch(it, n) } }], - [db:thetvdb, query:{ thetvdb.search(n, lang).find{ isMatch(it, n) } }], - [db:themoviedb, query:{ themoviedb.searchMovie(n, lang).find{ isMatch(it, n) } }] + + [ [db:anidb, query:{ anidb.search(n, _args.locale).find{ isMatch(it, n) } }], + [db:thetvdb, query:{ thetvdb.search(n, _args.locale).find{ isMatch(it, n) } }], + [db:themoviedb, query:{ themoviedb.searchMovie(n, _args.locale).find{ isMatch(it, n) } }] ].find { def match = it.query() if (match) { rename(folder:dir, db:it.db.name, query:match.name) } diff --git a/website/scripts/sorty.groovy b/website/scripts/sorty.groovy index 41a92081..4fbdb1a5 100644 --- a/website/scripts/sorty.groovy +++ b/website/scripts/sorty.groovy @@ -1,5 +1,3 @@ -// EXPERIMENTAL // HERE THERE BE DRAGONS - // PERSONALIZED SETTINGS def episodeDir = "V:/in/TV" def episodeFormat = "V:/out/TV/{n}{'/Season '+s}/{episode}" diff --git a/website/scripts/src.groovy b/website/scripts/src.groovy index 8120ee13..162debf4 100644 --- a/website/scripts/src.groovy +++ b/website/scripts/src.groovy @@ -4,7 +4,10 @@ * Fetch subtitles, rename and calculate checksums for all video files */ args.eachMediaFolder { + getMissingSubtitles(folder:it) + def renamedFiles = rename(folder:it) + compute(file:renamedFiles.findAll{ it.isVideo() }) } diff --git a/website/scripts/watcher.groovy b/website/scripts/watcher.groovy index b719010f..3d51340e 100644 --- a/website/scripts/watcher.groovy +++ b/website/scripts/watcher.groovy @@ -1,9 +1,8 @@ -// EXPERIMENTAL // HERE THERE BE DRAGONS +// filebot -script "http://filebot.sf.net/scripts/watcher.groovy" --format -// BEGIN SANITY CHECK +// SANITY CHECK if (_prop['java.runtime.version'] < '1.7') throw new Exception('Java 7 required') if (!(new File(_args.format ?: '').absolute)) throw new Exception('Absolute target path format required') -// END // watch folders and print files that were added/modified (requires Java 7) @@ -12,8 +11,8 @@ def watchman = args.watch { changes -> rename(file:changes) } -// process after 10 minutes without any changes to the folder -watchman.setCommitDelay(10 * 60 * 1000) +// process after 5 minutes without any changes to the folder +watchman.setCommitDelay(5 * 60 * 1000) println "Waiting for events" console.readLine() // keep running and watch for changes