* clean-up

This commit is contained in:
Reinhard Pointner 2012-01-05 05:30:22 +00:00
parent 9e6d7e0a2b
commit 4e20fca248
10 changed files with 17 additions and 31 deletions

View File

@ -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]
}

View File

@ -90,6 +90,7 @@ EMPiREHD
EnDoR
ESiR
ETM
ETRG
EUHD
EuReKA
ExtraTorrentRG

View File

@ -6,10 +6,10 @@
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://twitter.com/statuses/user_timeline/filebot_renamer.rss" />
<title>FileBot - The ultimate tv renamer / subtitle downloader / sfv validator</title>
<meta name="description" content="FileBot is the ultimate tool for renaming your tv shows and downloading subtitles. It's streamlined for simplicity and it just works. FileBot supports Windows, Linux and Mac, plus there's a full-featured command-line interface for all sorts of automation." />
<meta name="description" content="FileBot is the ultimate tool for renaming your tv shows or anime and downloading subtitles. It's smart, streamlined for simplicity and &quot;just works&quot;. FileBot supports Windows, Linux and Mac, plus there's a full-featured command-line interface for all sorts of automation." />
<meta itemprop="name" content="FileBot - The ultimate tv renamer and subtitle downloader" />
<meta itemprop="description" content="FileBot is the ultimate tool for renaming your tv shows and downloading subtitles. It's streamlined for simplicity and it just works. FileBot supports Windows, Linux and Mac, plus there's a full-featured command-line interface for all sorts of automation." />
<meta itemprop="description" content="FileBot is the ultimate tool for renaming your tv shows or anime and downloading subtitles. It's smart, streamlined for simplicity and &quot;just works&quot;. FileBot supports Windows, Linux and Mac, plus there's a full-featured command-line interface for all sorts of automation." />
<meta itemprop="image" content="http://filebot.sourceforge.net/images/icon.png" />
<link rel="stylesheet" href="base.css" type="text/css" />

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -1,16 +1,12 @@
// filebot -script "http://filebot.sf.net/scripts/housekeeping.groovy" <folder>
// 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('.')}"

View File

@ -1,8 +1,5 @@
// filebot -script "http://filebot.sf.net/scripts/rsam.groovy" <options> <folder>
// 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) }

View File

@ -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}"

View File

@ -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() })
}

View File

@ -1,9 +1,8 @@
// EXPERIMENTAL // HERE THERE BE DRAGONS
// filebot -script "http://filebot.sf.net/scripts/watcher.groovy" --format <expression> <folder>
// 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