Can I combine utorrent w/"Store files on multiple drive"

Any questions? Need some help?
nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 27 Jan 2013, 19:35

Hello everyone,

I have been successful with using the utorrent script manually like below

Code: Select all

filebot -script fn:utorrent-postprocess "\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR" --def "seriesFormat=\\TITANSERVER\3media.2tb\TV Shows 1\{n}\{n} Season {s.pad(2)}\{n}.{s00e00}.{t}.{fn.match(/WEB/)}.{source}.{vf}.{vc}.{ac}" --action copy --conflict skip -non-strict
This did a great job extracting the season of Parks and Recreation and putting them in the correct season folders. I have multiple drives and it is a pain to make sure that there is enough room across them as well as put new downloads in the correct place so I found the "Store files on multiple drives" script.

Code: Select all

{["C:", "D:", "E:"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}
I tried to combine them replacing the letter drives with absolute paths

Code: Select all

filebot -script fn:utorrent-postprocess "\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR" --def "seriesFormat={["\\TITANSERVER\3media.2tb\TV Shows 1\", "\\TITANSERVER\1media.3tb\TV Shows 3\", "\\TITANSERVER\4media.2tb\TV Shows 2"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}\{n}\{n} Season {s.pad(2)}\{n}.{s00e00}.{t}{.fn.match(/WEB/)}{.source}{.vf}{.vc}{.ac}" --action copy --conflict skip -non-strict
But this didn't work. I ran it on the same folder as before but added in other shows that were on the same drive, on another drive and 1 show that I have never had before. I wanted to see if it would put the shows on the same drives together and then also if it would see which drive had the most space and put the new show not in my collection on to the drive with the most space. I tried to output it to a file, but didn't get this to work so I am posting the text from the CLI window (sorry I know this is bad form :oops: )

Code: Select all

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>filebot -script fn:utorrent-postprocess "\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR" --def "seriesFormat={["\\TITANSERVER\
3media.2tb\TV Shows 1\", "\\TITANSERVER\1media.3tb\TV Shows 3\", "\\TITANSERVER\4media.2tb\TV Shows 2"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists() <=>
b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}\{n}\{n} Season {s.pad(2)}\{n}.{s00e00}.{t}{.fn.match(/WEB/)}{.source}{.vf}{.vc}{.ac}" --a
ction copy --conflict skip -non-strict >> "\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR" 2>&1
Access is denied.

C:\Windows\system32>filebot -script fn:utorrent-postprocess "\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR" --def "seriesFormat={["\\TITANSERVER\
3media.2tb\TV Shows 1\", "\\TITANSERVER\1media.3tb\TV Shows 3\", "\\TITANSERVER\4media.2tb\TV Shows 2"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists() <=>
b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}\{n}\{n} Season {s.pad(2)}\{n}.{s00e00}.{t}{.fn.match(/WEB/)}{.source}{.vf}{.vc}{.ac}" --a
ction copy --conflict skip -non-strict
Jan 27, 2013 11:09:54 AM net.sourceforge.filebot.cli.ArgumentBean getFiles
WARNING: Invalid argument
Parameter: seriesFormat = {[\\TITANSERVER\3media.2tb\TV
Argument: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR
Argument: C:\Windows\System32\Shows
Argument: C:\Windows\System32\1",
Argument: \\TITANSERVER\1media.3tb\TV Shows 3", \TITANSERVER\4media.2tb\TV
Argument: C:\Windows\System32\Shows
Argument: C:\Windows\system32\2].collect{$it\TV\$n as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}\{episode}\{n
}\{n} Season {s.pad(2)}\{n}.{s00e00}.{t}{.fn.match(\WEB\)}{.source}{.vf}{.vc}{.ac}
Read archive [tommys.place.504.720p-dimension.rar] to [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E04.720p.HDTV.X264-D
IMENSION\tommys.place.504.720p-dimension]
Extracting files [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E04.720p.HDTV.X264-DIMENSION\tommys.place.504.720p-dimens
ion\Parks.and.Recreation.S05E04.720p.HDTV.X264-DIMENSION.mkv]
Read archive [tommys.place.505.720p-dimension.rar] to [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E05.720p.HDTV.X264-D
IMENSION\tommys.place.505.720p-dimension]
Extracting files [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E05.720p.HDTV.X264-DIMENSION\tommys.place.505.720p-dimens
ion\Parks.and.Recreation.S05E05.720p.HDTV.X264-DIMENSION.mkv]
Read archive [tommys.place.506.720p-dimension.rar] to [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E06.720p.HDTV.X264-D
IMENSION\tommys.place.506.720p-dimension]
Extracting files [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E06.720p.HDTV.X264-DIMENSION\tommys.place.506.720p-dimens
ion\Parks.and.Recreation.S05E06.720p.HDTV.X264-DIMENSION.mkv]
Read archive [tommys.place.507.720p-dimension.rar] to [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E07.720p.HDTV.X264-D
IMENSION\tommys.place.507.720p-dimension]
Extracting files [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E07.720p.HDTV.X264-DIMENSION\tommys.place.507.720p-dimens
ion\Parks.and.Recreation.S05E07.720p.HDTV.X264-DIMENSION.mkv]
Read archive [parks.and.recreation.509.720p-dimension.rar] to [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E09.720p.HDT
V.X264-DIMENSION\parks.and.recreation.509.720p-dimension]
Extracting files [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E09.720p.HDTV.X264-DIMENSION\parks.and.recreation.509.720
p-dimension\Parks.and.Recreation.S05E09.720p.HDTV.X264-DIMENSION.mkv]
Read archive [tommys.place.510.720p-dimension.rar] to [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E10.720p.HDTV.X264-D
IMENSION\tommys.place.510.720p-dimension]
Extracting files [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E10.720p.HDTV.X264-DIMENSION\tommys.place.510.720p-dimens
ion\Parks.and.Recreation.S05E10.720p.HDTV.X264-DIMENSION.mkv]
Read archive [wheres.john.ralphio.511.720p-dimension.rar] to [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E11.720p.HDTV
.X264-DIMENSION\wheres.john.ralphio.511.720p-dimension]
Extracting files [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E11.720p.HDTV.X264-DIMENSION\wheres.john.ralphio.511.720p
-dimension\Parks.and.Recreation.S05E11.720p.HDTV.X264-DIMENSION.mkv]
Read archive [star.wars.the.clone.wars.514.720p.hdtv.x264-sys.rar] to [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\[SpeedCD] - Star.Wars.The.Cl
one.Wars.S05E14.720p.HDTV.x264-SYS\star.wars.the.clone.wars.514.720p.hdtv.x264-sys]
Extracting files [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\[SpeedCD] - Star.Wars.The.Clone.Wars.S05E14.720p.HDTV.x264-SYS\star.wars.the.clon
e.wars.514.720p.hdtv.x264-sys\star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv]
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer S04E01 720p Web-Dl mRS.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer S04E02 720p Web-Dl mRS.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer.2009.S04E01.720p.HDTV.x264-IMMERSE [PublicHD]\Archer.2009.S04E01.720p.HDTV.x264-IMMER
SE.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer.2009.S04E01.720p.HDTV.x264-IMMERSE.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer.2009.S04E02.720p.HDTV.x264-EVOLVE [PublicHD]\Archer.2009.S04E02.720p.HDTV.x264-EVOLVE
.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks and Recreation S05E08 720p HDTV X264-DIMENSION [PublicHD]\Parks.and.Recreation.S05E08.
720p.HDTV.X264-DIMENSION.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks and Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks and Recreation.S05E02.Soda Tax (x264).mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks and Recreation.S05E03.How a Bill Becomes a Law (x264).mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E04.720p.HDTV.X264-DIMENSION\tommys.place.504.720p-dimension\Parks.a
nd.Recreation.S05E04.720p.HDTV.X264-DIMENSION.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E05.720p.HDTV.X264-DIMENSION\tommys.place.505.720p-dimension\Parks.a
nd.Recreation.S05E05.720p.HDTV.X264-DIMENSION.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E06.720p.HDTV.X264-DIMENSION\tommys.place.506.720p-dimension\Parks.a
nd.Recreation.S05E06.720p.HDTV.X264-DIMENSION.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E07.720p.HDTV.X264-DIMENSION\tommys.place.507.720p-dimension\Parks.a
nd.Recreation.S05E07.720p.HDTV.X264-DIMENSION.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E09.720p.HDTV.X264-DIMENSION\parks.and.recreation.509.720p-dimension
\Parks.and.Recreation.S05E09.720p.HDTV.X264-DIMENSION.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E10.720p.HDTV.X264-DIMENSION\tommys.place.510.720p-dimension\Parks.a
nd.Recreation.S05E10.720p.HDTV.X264-DIMENSION.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks.and.Recreation.S05E11.720p.HDTV.X264-DIMENSION\wheres.john.ralphio.511.720p-dimension\
Parks.and.Recreation.S05E11.720p.HDTV.X264-DIMENSION.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\[SpeedCD] - Star.Wars.The.Clone.Wars.S05E14.720p.HDTV.x264-SYS\star.wars.the.clone.wars.514.
720p.hdtv.x264-sys\star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv
star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv [series: Star Wars The Clone Wars, movie: Star Wars: The Clone Wars (2008)]
Exclude Movie: Star Wars: The Clone Wars (2008)
Group: [tvs:Parks and Recreation] => [Archer S04E01 720p Web-Dl mRS.mkv, Archer S04E02 720p Web-Dl mRS.mkv, Archer.2009.S04E01.720p.HDTV.x264-IMMERSE.mkv, Parks
.and.Recreation.S05E08.720p.HDTV.X264-DIMENSION.mkv, Parks and Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv, Parks and Recreation.S05E02.Soda T
ax (x264).mkv, Parks and Recreation.S05E03.How a Bill Becomes a Law (x264).mkv, Parks.and.Recreation.S05E04.720p.HDTV.X264-DIMENSION.mkv, Parks.and.Recreation.S
05E05.720p.HDTV.X264-DIMENSION.mkv, Parks.and.Recreation.S05E06.720p.HDTV.X264-DIMENSION.mkv, Parks.and.Recreation.S05E07.720p.HDTV.X264-DIMENSION.mkv, Parks.an
d.Recreation.S05E09.720p.HDTV.X264-DIMENSION.mkv, Parks.and.Recreation.S05E10.720p.HDTV.X264-DIMENSION.mkv, Parks.and.Recreation.S05E11.720p.HDTV.X264-DIMENSION
.mkv]
Group: [tvs:Archer 2009] => [Archer.2009.S04E01.720p.HDTV.x264-IMMERSE.mkv, Archer.2009.S04E02.720p.HDTV.x264-EVOLVE.mkv]
Group: [tvs:Star Wars The Clone Wars, mov:null, anime:null] => [star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv]
ScriptException: SyntaxError: missing token: }
ScriptException: SyntaxError: missing token: }
ScriptException: SyntaxError: missing token: }
Done ?(?????)?

C:\Windows\system32>
Is there a way to put these to things together. This would be a VERY powerful script.

Thank you very much
-S

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by rednoah » 28 Jan 2013, 00:51

You're not using the cmd correctly. All the " that are part of the format need to be escaped.

Had this conversation before, you can read up on it here. ;)
http://filebot.sourceforge.net/forums/v ... 445&p=2936
:idea: Please read the FAQ and How to Request Help.

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 28 Jan 2013, 05:52

Thanks for the link to the other forum topic. As you can guess I barely know what I am doing so I am relying on others who have gone before me and I am just trying to copy what they have done.

I'm not sure what you mean by: All the " that are part of the format need to be escaped.

What does escaped mean?

I think you are referring to this part of the code when you are talking about the format right?

Code: Select all

--def "seriesFormat={["\\TITANSERVER\3media.2tb\TV Shows 1\", "\\TITANSERVER\1media.3tb\TV Shows 3\", "\\TITANSERVER\4media.2tb\TV Shows 2"]
Is the second " in this line what you are saying is not "escaped"?

I have a lot of other questions but will wait for your response so I can learn a little more.
-S

P.S. Can you tell me how to use the "Store files on multiple drives" script? Does it look like I have combined the two scripts correctly despite the "escaping" problem?

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by rednoah » 28 Jan 2013, 06:29

Just play with it and you'll figure it out. Start with something simple, some format without double-quotes. Then make it more and more complicated.

This is what it looks like if passed in correctly (1 cmdline argument):

Code: Select all

Parameter: seriesFormat = TV Shows/{n}/{episode.special ? "Special" : "Season "+s}/{n} - {episode.special ? S00E+special.pad(2) : s00e00} - {t}{.$vf}
This is wrong because the cmd did split it into many arguments:

Code: Select all

Parameter: seriesFormat = {[\\TITANSERVER\3media.2tb\TV
Argument: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR
Argument: C:\Windows\System32\Shows
Argument: C:\Windows\System32\1",
Argument: \\TITANSERVER\1media.3tb\TV Shows 3", \TITANSERVER\4media.2tb\TV
Argument: C:\Windows\System32\Shows
If you completely read that other thread you'll understand.
:idea: Please read the FAQ and How to Request Help.

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 28 Jan 2013, 13:51

OK. I see what you are saying. If I can figure out the "escaping" problem should this work if I take

Code: Select all

{["C:", "D:", "E:"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}
And put it in to

Code: Select all

--def seriesFormat
-S

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 28 Jan 2013, 14:16

So I tried to put a \ in front of the arguments with " within the --def area

Code: Select all

filebot -script fn:utorrent-postprocess "\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR" --def "seriesFormat={[\"\\TITANSERVER\3media.2tb\TV Shows 1\", \"\\TITANSERVER\1media.3tb\TV Shows 3\", \"\\TITANSERVER\4media.2tb\TV Shows 2\"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}\{n}\{n} Season {s.pad(2)}\{n}.{s00e00}.{t}{.fn.match(/WEB/)}{.source}{.vf}{.vc}{.ac}" --action copy --conflict skip -non-strict
But got returned:

Code: Select all

C:\Users\Kira\Desktop>filebot -script fn:utorrent-postprocess "\\TITANSERVER\3me
dia.2tb\TV Shows 1\Parks and Recreation\PAR" --def "seriesFormat={[\"\\TITANSERV
ER\3media.2tb\TV Shows 1\", \"\\TITANSERVER\1media.3tb\TV Shows 3\", \"\\TITANSE
RVER\4media.2tb\TV Shows 2\"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists(
) <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}\{n}
\{n} Season {s.pad(2)}\{n}.{s00e00}.{t}{.fn.match(/WEB/)}{.source}{.vf}{.vc}{.ac
}" --action copy --conflict skip -non-strict
Parameter: seriesFormat = {["\\TITANSERVER\3media.2tb\TV Shows 1", "\\TITANSERVE
R\1media.3tb\TV Shows 3", "\\TITANSERVER\4media.2tb\TV Shows 2"].collect{$it/TV/
$n as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root
.freeSpace}.last()}/{episode}\{n}\{n} Season {s.pad(2)}\{n}.{s00e00}.{t}{.fn.mat
ch(/WEB/)}{.source}{.vf}{.vc}{.ac}
Argument: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer S04E0
1 720p Web-Dl mRS.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks and Re
creation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\star.wars.th
e.clone.wars.514.720p.hdtv.x264-sys.mkv
star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv [series: Parks and Recreatio
n, movie: Star Wars: The Clone Wars (2008)]
Group: [tvs:Parks and Recreation] => [Archer S04E01 720p Web-Dl mRS.mkv, Parks a
nd Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv]
Group: [tvs:Parks and Recreation, mov:Star Wars: The Clone Wars (2008), anime:nu
ll] => [star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv]
ScriptException: SyntaxError: unexpected char: '\'
Done ?(?????)?
The files that were in the target folder didn't move, but at least I think I am getting closer?

Thanks again but I still need a little more help. :)
-S

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by rednoah » 28 Jan 2013, 14:54

Try to simplify the format expression again to the point where it still works and then see what made it brake. I recommend using / as separator and not \ which may have special meaning.

You're still passing parts in wrong:
e.g. collect{$it/TV/$n as File} => WRONG, check my example for correct syntax. ;)
:idea: Please read the FAQ and How to Request Help.

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 28 Jan 2013, 15:05

When you say use / as separator, I don't know what a separator is. Do you mean when writing out the drive path?

When I simplify it to:

filebot -script fn:utorrent-postprocess "\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR" --def "seriesFormat=\\TITANSERVER\3media.2tb\TV Shows 1\{n}\{n} Season {s.pad(2)}\{n}.{s00e00}.{t}.{fn.match(/WEB/)}.{source}.{vf}.{vc}.{ac}" --action copy --conflict skip -non-strict

It works great so how do I go about adding

{["C:", "D:", "E:"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}

So that the episodes are matched to existing folders and/or put on the drive with the most space?

Maybe I need to understand more how

{["C:", "D:", "E:"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}

is suppose to be used. Is it for the GUI or CLI?

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 28 Jan 2013, 15:16

Thanks for all the help again. It must be frustrating to have created such a cool thing to have dolts try an use it :D

So got the previous error to go away and now got this:

Code: Select all

C:\Users\Kira\Desktop>filebot -script fn:utorrent-postprocess "\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR" --def "seriesFormat={[\"//TITANSERVER/3media.2tb/TV Shows 1/\", \"//TITANSE
RVER/1media.3tb/TV Shows 3/\", \"//TITANSERVER/4media.2tb/TV Shows 2/\"].collect{/"$it/TV/$n/" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode
}" --action copy --conflict skip -non-strict
Parameter: seriesFormat = {["//TITANSERVER/3media.2tb/TV Shows 1/", "//TITANSERVER/1media.3tb/TV Shows 3/", "//TITANSERVER/4media.2tb/TV Shows 2/"].collect{/$it/TV/$n/ as File}.sort{a,b -> a.exists()
<=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}
Argument: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer S04E01 720p Web-Dl mRS.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks and Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv
star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv [series: Parks and Recreation, movie: Star Wars: The Clone Wars (2008)]
Group: [tvs:Parks and Recreation] => [Archer S04E01 720p Web-Dl mRS.mkv, Parks and Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv]
Group: [tvs:Parks and Recreation, mov:Star Wars: The Clone Wars (2008), anime:null] => [star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv]
ScriptException: SyntaxError: expecting '}', found 'TV'
So I agree that the passing of the .collect{/"$it/TV/$n/" as File} is not getting passed correctly, but is it because it isn't "escaped" correctly?
-S
Last edited by nzdreamer55 on 28 Jan 2013, 15:54, edited 1 time in total.

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 28 Jan 2013, 15:51

Ok now I can almost smell the success. Good thing I keep posting to your forum (or should I say my blog because I am posting so many times :mrgreen:)

I changed the code to:

Code: Select all

filebot -script fn:utorrent-postprocess "\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR" --def "seriesFormat={[\"//TITANSERVER/3media.2tb/TV Shows 1/\", \"//TITANSERVER/1media.3tb/TV Shows 3/\", \"//TITANSERVER/4media.2tb/TV Shows 2/\"].collect{\"$it/TV/$n\" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}" --action copy --conflict skip -non-strict
And got this:

Code: Select all

C:\Users\Kira\Desktop>filebot -script fn:utorrent-postprocess "\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR" --def "seriesFormat={[\"//TITANSERVER/3media.2tb/TV Shows 1/\", \"//TITANSE
RVER/1media.3tb/TV Shows 3/\", \"//TITANSERVER/4media.2tb/TV Shows 2/\"].collect{\"$it/TV/$n\" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode
}" --action copy --conflict skip -non-strict
Parameter: seriesFormat = {["//TITANSERVER/3media.2tb/TV Shows 1/", "//TITANSERVER/1media.3tb/TV Shows 3/", "//TITANSERVER/4media.2tb/TV Shows 2/"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists()
<=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}
Argument: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer S04E01 720p Web-Dl mRS.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks and Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv
star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv [series: Parks and Recreation, movie: Star Wars: The Clone Wars (2008)]
Group: [tvs:Parks and Recreation] => [Archer S04E01 720p Web-Dl mRS.mkv, Parks and Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv]
Group: [tvs:Parks and Recreation, mov:Star Wars: The Clone Wars (2008), anime:null] => [star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Parks and Recreation, Archer]
Fetching episode data for [Archer]
Fetching episode data for [Parks and Recreation]
Fetching episode data for [Archer (2009)]
Fetching episode data for [Archer's Goon]
[COPY] Rename [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer S04E01 720p Web-Dl mRS.mkv] to [\Archer (2009) - 4x01 - Fugue and Riffs.mkv]
[COPY] Rename [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks and Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv] to [\Parks and Recreation - 5x01 - Ms. Knope Goes t
o Washington.mkv]
Processed 2 files
Done ?(?????)?
So 2 files got copied into the folder where they started from and were renamed. So the passing errors seem to have resolved, but it didn't sort the files into the correct folders and because it didn't correctly identify the TV Series Star War: The Clone Wars 514 then I don't know if it would have moved it to the drive with the most space and created a file structure.

So if you can let me know where I need to tinker with this some more I'll keep working at it.

Thanks as always
-S

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by rednoah » 28 Jan 2013, 16:05

Using / as path separator is a good idea but of course you can't just mess up the unified network resource syntax...

//server/folder/file => WRONG
\\server/folder/file => CORRECT

Also the clone wars episode is ignored because there's a movie of the same name, no clear SXE pattern and on top of that you're trying to confuse FileBot with a foldername that indicates a different series altogether. It'll leave that kinda stuff for you to deal with. :P

EDIT:
star.wars.the.clone.wars.514 would work just fine if you didn't put it into the folder of another series:

Code: Select all

star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv [series: star wars the clone wars, movie: Star Wars: The Clone Wars (2008)]
Exclude Movie: Star Wars: The Clone Wars (2008)
:idea: Please read the FAQ and How to Request Help.

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 28 Jan 2013, 17:19

Right what you mentioned makes sense. So I changed the separators and for now I'll not worry about the starwars episode since I am asking it to do something it shouldn't do.

I am still not getting the

Code: Select all

{["C:", "D:", "E:"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}
To evaluate to a path to the drive with the most free space, unless the series folder already exists on one of the drives.

Code: Select all

C:\Users\Kira\Desktop>filebot -script fn:utorrent-postprocess "\\TITANSERVER/3media.2tb/TV Shows 1/Parks and Recreation/PAR" --def "seriesFormat={[\"\\TITANSERVER/3media.2tb/TV Shows 1/\", \"\\TITANSE
RVER/1media.3tb/TV Shows 3/\", \"\\TITANSERVER/4media.2tb/TV Shows 2/\"].collect{\"$it/TV/$n\" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode
}" --action copy --conflict skip -non-strict
Parameter: seriesFormat = {["\\TITANSERVER/3media.2tb/TV Shows 1/", "\\TITANSERVER/1media.3tb/TV Shows 3/", "\\TITANSERVER/4media.2tb/TV Shows 2/"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists()
<=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}
Argument: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer S04E01 720p Web-Dl mRS.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks and Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv
Input: \\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv
star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv [series: Parks and Recreation, movie: Star Wars: The Clone Wars (2008)]
Group: [tvs:Archer (2009)] => [Archer S04E01 720p Web-Dl mRS.mkv]
Group: [tvs:Parks and Recreation] => [Parks and Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv]
Group: [tvs:Parks and Recreation, mov:Star Wars: The Clone Wars (2008), anime:null] => [star.wars.the.clone.wars.514.720p.hdtv.x264-sys.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Archer (2009), Parks and Recreation, Archer]
Fetching episode data for [Archer (2009)]
Fetching episode data for [Parks and Recreation]
Fetching episode data for [Archer]
Fetching episode data for [Archer (2009)]
Fetching episode data for [Archer's Goon]
[COPY] Rename [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Archer S04E01 720p Web-Dl mRS.mkv] to [\Archer (2009) - 4x01 - Fugue and Riffs.mkv]
Processed 1 files
Rename episodes using [TheTVDB]
Auto-detected query: [Parks and Recreation]
Fetching episode data for [Parks and Recreation]
[COPY] Rename [\\TITANSERVER\3media.2tb\TV Shows 1\Parks and Recreation\PAR\Parks and Recreation.S05E01.Ms. Knope Goes To Washington (x264).WEB.mkv] to [\Parks and Recreation - 5x01 - Ms. Knope Goes t
o Washington.mkv]
Processed 1 files
Done ?(?????)?
I wanted to see if the GUI would use the format so I dropped it in and it shows a binding error. Could this be part of my problem?

-S

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by rednoah » 28 Jan 2013, 18:01

Sry about that, you'll need to update to r1419 or higher:
https://sourceforge.net/projects/filebo ... ebot/HEAD/
:idea: Please read the FAQ and How to Request Help.

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 28 Jan 2013, 18:06

Updating to filebot-3.3-r1426-I.II.fix.jar now. Should the cli work?

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 28 Jan 2013, 18:37

Tried it out using the GUI. The first time I just used the script that you provided here:

Code: Select all

{["C:", "D:", "E:"].collect{"$it/TV/$n" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/{episode}
Worked great. I then tried to add my own with the network locations and proper syntax and while it didn't throw any errors, it didn't put the example file (Dark Angel) to the correct drive based on how much free space was present. See pictures.

In the first one you can see that the episode format looks good at the top, but when you see the drives that filebot can pick from (1media.3tb, 4media.2tb, and 3media.2tb) it should pick 1media.3tb as this has the most free space, but it picks the drive with the middle amount of free space.

Thanks for all the help looking forward to this working. :D

EDIT:

It seems to use which ever drive is last in the order of drives. I swapped them out and which ever drive I put at the end of the list, becomes the one it picks. I also added a / to the end of the drive path \\TITANSERVER/4media.2tb/TV Shows 2/ and this didn't affect the results in a positive or negative way.

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by rednoah » 28 Jan 2013, 19:31

I assume we can't just know the free space for random network locations. You can try something like {new File("\\server/test").freeSpace} and check what you get back.

Why do you bother with \\UNC paths when you have mapped drives anyway? In my example is use drive letter right? Do the same and it'll probably work.
:idea: Please read the FAQ and How to Request Help.

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 28 Jan 2013, 19:42

I'll give it a shot. This picture that I gave for you is from the computer with the drives not the computer running filebot. Why do I use \\UNC paths..???? Well I guess it is just what I have always done. Makes it easier to have the same drives on all my computers rather than mapping each computer for all the drives on all the other computers. I'll play around with it and make sure that it works and then if I cannot get it to will map the drive.

Thanks

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by rednoah » 29 Jan 2013, 02:17

The issue is probably *.root.freeSpace

For me freeSpace only works for drives ("E:" as File) but not for random paths ("E:/test" as File). I guess the "root" of a UNC paths would be \\server and that while being the root of the path doesn't have attributes like freeSpace.

I'll have a look.
:idea: Please read the FAQ and How to Request Help.

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 29 Jan 2013, 02:21

Thanks Rednoah. I'm going to play around with it and see if I can just get it to work on mapped drives but look forward to the UNC path solution :-)

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by rednoah » 29 Jan 2013, 05:28

Ah, freeSpace works for any file and returns the freeSpace on the drive the file is on BUT ONLY IF THE SAID FILE EXISTS.

This will be smarter and figure out freeSpace by checking parent folders:

Code: Select all

{["C:", "D:", "E:"].collect{"$it/TV/$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()}/{episode}
:idea: Please read the FAQ and How to Request Help.

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 29 Jan 2013, 05:50

Thanks. Off to work and will try this out next week.
-S

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 30 Jan 2013, 04:50

Ok rednoah,
Got a chance to try out the new code and I think it works using UNC paths to sort based on free space, the only thing that I am a little worried about is that it shows the UNC path with just 1 \ instead of \\ at the top.
When I drop in a series it put it in drive with the most space, BUT it should group it into the American Dad! folder that I have on \\TITANSERVER/3media.2tb/TV Shows 1.

There is also something wrong with the path in the New Names section becuase it shows the 3media not 3media.2tb
-S

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by rednoah » 30 Jan 2013, 04:54

That may be a display issue, while the underlying File object is proper. I'll have a look later.

PS: What the f*ck is that workspace resolution?!?! WANT!! :D

EDIT: UNC path display issues fixed with r1434
:idea: Please read the FAQ and How to Request Help.

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 30 Jan 2013, 22:56

Hey Rednoah,

So I upgraded to r1435 and tried again. I tried to rename and move American Dad!S09E08. The attached picture shows a new path created where the file originally was instead of moved into the american dad folder and creating a season 9 folder.

I think that it isn't getting the UNC path thing correctly. What do you think? It looks like you got the display of dots to work such as 1media.2tb get's displayed correctly now.
-S

nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Re: Can I combine utorrent w/"Store files on multiple drive"

Post by nzdreamer55 » 31 Jan 2013, 01:07

OK so it works when you do it. That is good. Can you take a look at the picture (the long one that you liked so much :-) and see if there is anything wrong with it that is sticking out?
I did this through the GUI as I like how it shows you what the output should be before you ask it to rename the file. I was going to get it working here then try to get it to work through the CLI since there are other issued with escaping certain areas of the code.

Why isn't my path showing up as \\TITANSERVER\.....

It shows up like \TITANSERVER\...

I think this might be why I got a different result than you. Did I do something wrong when I put the paths in a the beginning?

-S

BTW the long picture is just a grab from 2 screens so it is really long :-)

Post Reply