Page 1 of 1
Is there a way to force filebot to search TV series or movie
Posted: 24 Feb 2013, 16:30
by nzdreamer55
Hi Rednoah,
I have created a little bat to run the utorrent script and I would like to add something to the command line to tell file bot that I want to search tv series instead of movies or music. I know that filebot is smart and figures it out most of the time, but I would like to be able to tell it not to worry about the movies and music and just focus on tv series. Can I do this with a switch?
Code: Select all
set /P folder=Enter folder name:
filebot -script fn:configure -script fn:amc "%folder%" --def "seriesFormat={[\"\\\\TITANSERVER/4media.2tb/TV Shows 2\",\"\\\\TITANSERVER/3media.2tb/TV Shows 1\",\"\\\\TITANSERVER/1media.3tb/TV Shows 3\"].collect{\"$it/$n\" as File}.sort{ a,b -> a.exists() <=> b.exists() ?: a.listPath().reverse().findResult{ it.freeSpace ?: null } <=> b.listPath().reverse().findResult{ it.freeSpace ?: null } }.last()}\{n} {episode.special ? 'Special' : 'Season '+s.pad(2)}\{n}.{s00e00}{'.'+[vf]}{'.'+[resolution]}{'.'+[vc]}{'.'+[ac]}{'.'+[af]}{'.'+[source]}.{t}" -r --action copy --conflict override -non-strict --def subtitles=en --def myepisodes=nzdreamer55:XXXXXX --def clean=n
Thanks
-S
Re: Is there a way to force filebot to search TV series or m
Posted: 24 Feb 2013, 16:35
by rednoah
So you mean you know that you're processing tv shows and you wanna force filebot to handle everything as tv show?
The label parameter can be used to force the desired behaviour:
Re: Is there a way to force filebot to search TV series or m
Posted: 24 Feb 2013, 16:37
by nzdreamer55
That is what I am looking for! Thanks
-S
Re: Is there a way to force filebot to search TV series or m
Posted: 24 Feb 2013, 16:40
by rednoah
Since you're asking the use for input I assume you wanna create a reusable script that you can call. I recommend instead of doing <ask user set folder> %folder% to do %* (means pass through all arguments). That way you'd be able to call myscript.cmd path/to/files. And more cool you can just drop files on the bat/cmd file and cmd would automatically start and pass those files as arguments. They call it droplets on Mac.
Re: Is there a way to force filebot to search TV series or m
Posted: 24 Feb 2013, 16:41
by nzdreamer55
Thanks! I'll give it a try!

Re: Is there a way to force filebot to search TV series or m
Posted: 24 Feb 2013, 16:47
by nzdreamer55
That is so SUPER COOL! Thanks for the tip.
Re: Is there a way to force filebot to search TV series or m
Posted: 24 Feb 2013, 18:12
by nzdreamer55
Well I spoke too soon. I got it to work for TV series, but it does not want to work when I drag a movie on to it.
The works (tv)
Code: Select all
set /P media=Enter media type (tv,movies):
filebot -script fn:configure -script fn:amc "%*" --def "seriesFormat={[\"\\\\TITANSERVER/4media.2tb/TV Shows 2\",\"\\\\TITANSERVER/3media.2tb/TV Shows 1\",\"\\\\TITANSERVER/1media.3tb/TV Shows 3\"].collect{\"$it/$n\" as File}.sort{ a,b -> a.exists() <=> b.exists() ?: a.listPath().reverse().findResult{ it.freeSpace ?: null } <=> b.listPath().reverse().findResult{ it.freeSpace ?: null } }.last()}\{n} {episode.special ? 'Special' : 'Season '+s.pad(2)}\{n}.{s00e00}{'.'+[vf]}{'.'+[resolution]}{'.'+[vc]}{'.'+[ac]}{'.'+[af]}{'.'+[source]}.{t}" --def ut_label=%media% -r --action copy --conflict override -non-strict --def subtitles=en --def myepisodes=nzdreamer55:<Removed> --def clean=y
This does not (movie)
Code: Select all
filebot -script fn:configure -script fn:amc "%*" --def "movieFormat={[\"\\\\TITANSERVER/5media.3tb/Movie 2\",\"\\\\TITANSERVER/2media.2tb/Movies 1\"].collect{\"$it\" as File}.sort{ a,b -> a.exists() <=> b.exists() ?: a.listPath().reverse().findResult{ it.freeSpace ?: null } <=> b.listPath().reverse().findResult{ it.freeSpace ?: null } }.last()}/{n} ({y}) [{imdbid}]/{n} ({y}) [{imdbid}]{'.'+[vf]}{'.'+[resolution]}{'.'+[vc]}{'.'+[ac]}{'.'+[af]}{'.'+[source]}" -r --action copy --conflict override -non-strict --def subtitles=en --def myepisodes=nzdreamer55:<Remove> --def clean=y
P.S. Thanks for getting my password from my first post, I just forgot to do that.
If I put in a file path for the movie and run it at the CMD then it works. Not sure why it does not pass the argument to filebot. The CMD window closes too fast for me to read the error. Maybe I should try to output to a file?
-S
Re: Is there a way to force filebot to search TV series or m
Posted: 24 Feb 2013, 18:19
by rednoah
1. -script fn:configure -script fn:amc??? Even I can only guess. Probably only only executing fn:amc.
2. "%*" => How come u double quote this when I don't??? I guess it's passing in ""/path/to/files""
3. The movie droplet is missing the --def ut_label=movie
"The cmd window closes to fast" is a bad excuse

You can just open cmd, call your script from cmdline and just pass in a path. It won't close.
Re: Is there a way to force filebot to search TV series or m
Posted: 24 Feb 2013, 19:48
by nzdreamer55
Thanks rednoah,
Not sure what happened with the first problem you listed. I cleaned this up and it still works.
The %* isn't passing UNC paths correctly and I cannot figure out why.
Can you tell me how to pass in a path to an opened cmd window? I changed the double quotes to single.
Here is the code I am working with
Code: Select all
filebot -script fn:amc '%*' --def "movieFormat={[\"\\\\TITANSERVER/5media.3tb/Movie 2\",\"\\\\TITANSERVER/2media.2tb/Movies 1\"].collect{\"$it\" as File}.sort{ a,b -> a.exists() <=> b.exists() ?: a.listPath().reverse().findResult{ it.freeSpace ?: null } <=> b.listPath().reverse().findResult{ it.freeSpace ?: null } }.last()}/{n} ({y}) [{imdbid}]/{n} ({y}) [{imdbid}]{'.'+[vf]}{'.'+[resolution]}{'.'+[vc]}{'.'+[ac]}{'.'+[af]}{'.'+[source]}" --def "seriesFormat={[\"\\\\TITANSERVER/4media.2tb/TV Shows 2\",\"\\\\TITANSERVER/3media.2tb/TV Shows 1\",\"\\\\TITANSERVER/1media.3tb/TV Shows 3\"].collect{\"$it/$n\" as File}.sort{ a,b -> a.exists() <=> b.exists() ?: a.listPath().reverse().findResult{ it.freeSpace ?: null } <=> b.listPath().reverse().findResult{ it.freeSpace ?: null } }.last()}\{n} {episode.special ? 'Special' : 'Season '+s.pad(2)}\{n}.{s00e00}{'.'+[vf]}{'.'+[resolution]}{'.'+[vc]}{'.'+[ac]}{'.'+[af]}{'.'+[source]}.{t}" -r --action copy --conflict override -non-strict --def subtitles=en --def myepisodes=nzdreamer55:XXXXX--def clean=y >> "G:\Public.Commons\Filebotoutput\filebot.log" 2>&1
Here is the output showing that the unc path does not get passed correctly.
Parameter: movieFormat = {["\\\\TITANSERVER/5media.3tb/Movie 2","\\\\TITANSERVER/2media.2tb/Movies 1"].collect{"$it" as File}.sort{ a,b -> a.exists() <=> b.exists() ?: a.listPath().reverse().findResult{ it.freeSpace ?: null } <=> b.listPath().reverse().findResult{ it.freeSpace ?: null } }.last()}/{n} ({y}) [{imdbid}]/{n} ({y}) [{imdbid}]{'.'+[vf]}{'.'+[resolution]}{'.'+[vc]}{'.'+[ac]}{'.'+[af]}{'.'+[source]}
Parameter: seriesFormat = {["\\\\TITANSERVER/4media.2tb/TV Shows 2","\\\\TITANSERVER/3media.2tb/TV Shows 1","\\\\TITANSERVER/1media.3tb/TV Shows 3"].collect{"$it/$n" as File}.sort{ a,b -> a.exists() <=> b.exists() ?: a.listPath().reverse().findResult{ it.freeSpace ?: null } <=> b.listPath().reverse().findResult{ it.freeSpace ?: null } }.last()}\{n} {episode.special ? 'Special' : 'Season '+s.pad(2)}\{n}.{s00e00}{'.'+[vf]}{'.'+[resolution]}{'.'+[vc]}{'.'+[ac]}{'.'+[af]}{'.'+[source]}.{t}
Parameter: subtitles = en
Parameter: myepisodes = nzdreamer55:XXXX
Parameter: clean = y
Argument: C:\Windows\'\TITANSERVER\5media.3tb\Movie 2\Ride with the Devil (1999)'
Exception: File not found: C:\Windows\'\TITANSERVER\5media.3tb\Movie 2\Ride with the Devil (1999)'
java.lang.Exception: File not found: C:\Windows\'\TITANSERVER\5media.3tb\Movie 2\Ride with the Devil (1999)'
at Script3$_run_closure4.doCall(Script3.groovy:8)
at Script3.run(Script3.groovy:8)
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 (°_°)
As always thank you for your help and time.
-S
Re: Is there a way to force filebot to search TV series or m
Posted: 25 Feb 2013, 01:21
by rednoah
Erm, I didn't use double quotes. If look carefully Neither did i use single quotes. It's not that you can pass in a UNC path, it's that you pass in an extra quote as path.
Isn't this completely obvious by looking at the error message???
java.lang.Exception: File not found: C:\Windows\'\TITANSERVER\5media.3tb\Movie 2\Ride with the Devil (1999)'
Re: Is there a way to force filebot to search TV series or m
Posted: 25 Feb 2013, 02:52
by nzdreamer55
Oh I see. I was working from the description of the utorrent script where it says
Standalone Usage
You can use the script directly from the cmdline like this, by just adding files as arguments instead of the utorrent parameters.
CODE: SELECT ALL
filebot -script fn:amc "/path/to/input/" --output "X:/path/to/output" --action copy --conflict skip -non-strict
Since the
"/path/to/input/"
has quotes I just took the %* and put it between the quotes. Does this seem strange reasoning?
Thanks so much for the help, I realize that it is hard for you to see that other people don't see code the way you do. I am glad you are willing to help me. Thanks again.
-S
Re: Is there a way to force filebot to search TV series or m
Posted: 25 Feb 2013, 03:03
by rednoah
You're reasoning is fine, could have been one way or the other. On unix bash "$@" is equivalent to windows cmd %*. The point is just trying and finding out what does work, if it doesn't look at the output, trying again, repeat until it works. I do the same for each and any of your questions.
%* => means all arguments (e.g. "path1" "path2") so it has to take care of quoting things properly