Code: Select all
println TheMovieDB.getMovieInfo(detectMovie(f, false), Locale.ENGLISH)
Code: Select all
println TheMovieDB.getMovieInfo(detectMovie(f, false), Locale.ENGLISH)
Where do I use this script? Do I use it in the same Filebot regular cmd line or with utorrent?rednoah wrote:Sometimes it might be useful to override series auto-detection by forcing a series title for a specific set of files. This is how you do it. Only process a certain set of files via file parameter and force the series title via the query parameter.Code: Select all
rename(file: args.getFiles{ it =~ /(?i:colbert.report)/}, query: "The Colbert Report", db: "TheTVDB") rename(file: args.getFiles{ it =~ /(?i:daily.show)/}, query: "The Daily Show with Jon Stewart", db: "TheTVDB") ...
Code: Select all
"movieFormat=Movies/{n} ({y}) {genres}/{n} ({y}) {genres}{\" CD$pi\"}{\".$lang\"}"
ex: Media Library\Movies\12 Rounds (2009) [Action, Adventure, Drama, Thriller]\12 Rounds (2009) [Action, Adventure, Drama, Thriller].avi
Code: Select all
"seriesFormat=TV Shows/{n.replaceAll(\" \\(\" + y + \"\\)\",\"\")} ({y}) {genres}/{episode.special ? \"Special\" : \"Season \"+s.pad(2)}/{n} - {episode.special ? \"S00E\"+special.pad(2) : s00e00} - {t.replaceAll(/[\`\Â\´\â\€\˜\\â\€\™\Ê\»]/, \"'\").replaceAll(/[!?.]+$/).replacePart(', Part $1')}{\".$lang\"}"
ex: Media Library\TV Shows\Battlestar Galactica (2003) [Action, Adventure, Drama, Science-Fiction]\Season 01\Battlestar Galactica (2003) - S01E12 - .avi
ex: Media Library\TV Shows\Fringe (2008) [Drama, Science-Fiction]\Season 01\Fringe - S01E01 - Pilot.avi
Here my simplified code:If your format contains quotes, e.g. {"-$fn"}, and you just copy and paste it, e.g. "movieFormat={"-$fn"}", the quotes in the format will mess with cmdline argument parsing. Hence you MUST ESCAPE DOUBLE QUOTES, e.g. "movieFormat={\"-$fn\"}".
Code: Select all
filebot -script fn:amc "./" --output "/mnt/media/" --action test -non-strict --conflict override --def "movieFormat=Filme/{n.upperInitial().space('.')}.{y}/{n.upperInitial().space('.')}.{y}{\"-$group\"}" clean=y music=n subtitles=y artwork=n "ut_dir=" "ut_file=" "ut_kind=" "ut_title=" "ut_label=" "ut_state="
Code: Select all
root@download01:/mnt/media/Movies# filebot -script fn:amc "./" --output "/mnt/media/" --action test -non-strict --conflict override --def "movieFormat=Filme/{n.upperInitial().space('.')}.{y}/{n.upperInitial().space('.')}.{y}{\"-$group\"}" clean=y music=n subtitles=y artwork=n "ut_dir=" "ut_file=" "ut_kind=" "ut_title=" "ut_label=" "ut_state="
Parameter: movieFormat = Filme/{n.upperInitial().space('.')}.{y}/{n.upperInitial().space('.')}.{y}{"-"}
Parameter: clean = y
Parameter: music = n
Parameter: subtitles = y
Parameter: artwork = n
Parameter: ut_dir =
Parameter: ut_file =
Parameter: ut_kind =
Parameter: ut_title =
Parameter: ut_label =
Parameter: ut_state =
Argument: /mnt/media/Movies
Input: /mnt/media/Movies/Forrest.Gump.1994.German.AC3.1080p.BluRay.x264-SEKTiON9.sub
Input: /mnt/media/Movies/From.Hell.2001.1080p.BluRay.DTS.DL.x264-HDC.mkv
Input: /mnt/media/Movies/xXx.2002.1080p.BluRay.DTS.DL.x264-HDC.mkv
Forrest.Gump.1994.German.AC3.1080p.BluRay.x264-SEKTiON9.sub [series: null, movie: Forrest Gump (1994)]
From.Hell.2001.1080p.BluRay.DTS.DL.x264-HDC.mkv [series: null, movie: From Hell (2001)]
xXx.2002.1080p.BluRay.DTS.DL.x264-HDC.mkv [series: null, movie: xXx (2002)]
Group: [tvs:null, mov:Forrest Gump (1994), anime:null] => [Forrest.Gump.1994.German.AC3.1080p.BluRay.x264-SEKTiON9.sub]
Group: [tvs:null, mov:From Hell (2001), anime:null] => [From.Hell.2001.1080p.BluRay.DTS.DL.x264-HDC.mkv]
Group: [tvs:null, mov:xXx (2002), anime:null] => [xXx.2002.1080p.BluRay.DTS.DL.x264-HDC.mkv]
No missing subtitles
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/mnt/media/Movies/Forrest.Gump.1994.German.AC3.1080p.BluRay.x264-SEKTiON9.sub]
[TEST] Rename [/mnt/media/Movies/Forrest.Gump.1994.German.AC3.1080p.BluRay.x264-SEKTiON9.sub] to [/mnt/media/Filme/Forrest.Gump.1994/Forrest.Gump.1994-.sub]
Processed 1 files
Get [English] subtitles for 1 files
Looking up subtitles by filehash via OpenSubtitles
Looking up subtitles by filehash via Sublight
Lookup by hash failed: java.lang.IllegalStateException: Sublight login has not been configured
Searching for [From Hell] at [OpenSubtitles]
Searching for [From Hell] at [Sublight]
Search for [From Hell] failed: Sublight login has not been configured
Searching for [From Hell] at [Subscene]
No matching subtitles found: /mnt/media/Movies/From.Hell.2001.1080p.BluRay.DTS.DL.x264-HDC.mkv
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/mnt/media/Movies/From.Hell.2001.1080p.BluRay.DTS.DL.x264-HDC.mkv]
[TEST] Rename [/mnt/media/Movies/From.Hell.2001.1080p.BluRay.DTS.DL.x264-HDC.mkv] to [/mnt/media/Filme/From.Hell.2001/From.Hell.2001-.mkv]
Processed 1 files
Get [English] subtitles for 1 files
Looking up subtitles by filehash via OpenSubtitles
Looking up subtitles by filehash via Sublight
Lookup by hash failed: java.lang.IllegalStateException: Sublight login has not been configured
Exception: Failed to auto-detect query
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/mnt/media/Movies/xXx.2002.1080p.BluRay.DTS.DL.x264-HDC.mkv]
[TEST] Rename [/mnt/media/Movies/xXx.2002.1080p.BluRay.DTS.DL.x264-HDC.mkv] to [/mnt/media/Filme/XXx.2002/XXx.2002-.mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
Code: Select all
--def "movieFormat=Filme/{n.upperInitial().space('.')}.{y}/{n.upperInitial().space('.')}.{y}{$vc}"
Code: Select all
Failed to write xattr: java.io.File.toPath()Ljava/nio/file/Path;
Code: Select all
WARNUNG: Unable to inherit IO: java/lang/ProcessBuilder$Redirect
It's either {vc} or {"$vc"}.cheesemaker wrote:Only {$vc} also don't work. {vc} works. Looks like it can't manage the conditional function in command line mode...
Ok, Thanks, I managed it. For an item, which will be only added when it's given and have a separator '.', the cmd code is:rednoah wrote:It's either {vc} or {"$vc"}.cheesemaker wrote:Only {$vc} also don't work. {vc} works. Looks like it can't manage the conditional function in command line mode...
PS: CMD escaping sucks, i'm pretty much just trying around until it works as well.
Code: Select all
{\".\$vc\"}
Code: Select all
Rename movies using [TheMovieDB]
[COPY] Rename [M:\Movies\blahblah.avi] to [M:\Movies\Blah Blah (2001).avi]
Duh - thanks! - will RTFM. Linking sounds safest - leave the source where it is and point to it. SMB server is an ACRyan media player so not much chance of running on there I don't think.You've set --action copy so it's gonna copy...
@see http://www.filebot.net/forums/viewtopic ... =793#p5114Standalone Usage
You can use the script directly from the cmdline like this, by just adding files as arguments instead of the utorrent parameters.
µTorrent -> Run Program -> Run this program when torrent finishes:Code: Select all
filebot -script fn:amc --output "X:/path/to/media" --log-file amc.log --action copy --conflict override -non-strict --def music=y subtitles=en artwork=y "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S"
Code: Select all
Parameter: music = y
Parameter: subtitles = en
Parameter: artwork = y
Parameter: ut_dir = F
Parameter: ut_kind = N
Parameter: ut_label = S--def
Parameter: xbmc = HOST
Parameter: gmail = user:pass
Parameter: mailto = [email protected]
Parameter: clean = y
MissingPropertyException: No such property: ut_file for class: Script3
groovy.lang.MissingPropertyException: No such property: ut_file for class: Script3
at Script3.run(Script3.groovy:78)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (°_°)
Parameter: music = y
Parameter: subtitles = en
Parameter: artwork = y
Parameter: ut_dir = F
Parameter: ut_kind = N
Parameter: ut_label = S
Parameter: xbmc = HOST
Parameter: gmail = user:pass
Parameter: mailto = [email protected]
Parameter: clean = y
Argument: Z:\Downloads
Exception: Conflicting arguments: pass in either file arguments or ut_dir/ut_file parameters but not both
Failure (°_°)
Code: Select all
filebot -script fn:amc --output "D:/Organized Media" --log-file amc.log --action hardlink --conflict override -non-strict --def "ut_dir=D:\Media\Avatar" "ut_file=" "ut_kind=multi" "ut_title=Avatar" "ut_label=" "ut_state=5"
Code: Select all
Parameter: ut_dir = F
Code: Select all
Parameter: ut_dir = F <-- WRONG, OBVIOUSLY
Parameter: ut_kind = N
Parameter: ut_label = S
Code: Select all
Argument: Z:\Downloads
Code: Select all
Parameter: ut_dir = /path/to/newly/finished/download/pass/in/by/utorrent
Code: Select all
{genres[0]}/{n.acronym().getAt(0)}/{"$collection/"}/{n} [{y}]{"CD$pi"}{' '+file.path.match(/UNRATED|REMASTERED|EXTENDED|THEATRICAL|UNCUT|DIRECTORS CUT|THEATRICAL EDITION|THEATRICAL CUT/)}/{n.replaceTrailingBrackets()} [{try{"$source"}catch(e){'BluRay'}} m-{"$vf"} {" $vc"} {" $ac"} {media.AudioLanguageList} {" $af"}][{y}]{" CD$pi"}{fn.match(/[.]fanart|[.]mkv/)}{"."+lang.getDisplayName(Locale.getDefault()).lower()}
Code: Select all
{s.pad(2)}x{e.pad(2)}
Code: Select all
{s.pad(2)}x{es.collect{ it.pad(2) }.join('-')}