Sort from Label Names
Sort from Label Names
Hi guys, I'm trying to automate my setup but am finding a lot of this stuff is over my head, I hope someone can help me out.
I use the built in RSS downloader in uTorrent to automatically download my TV shows and due to disk space I have had to split my collection on to two different hard drives.
All Reality TV Shows automatically download to F:\Downloads and automatically have the label "Reality Shows".
The rest of my TV Shows download to: G:\Downloads and automatically have the label "TV Shows".
I store all my Reality Shows in the directory F:\Reality Shows
The rest of the TV Shows are stored in G:\TV Shows
Is there a way I can use the labels to get Filebot to put the Reality Shows in the Reality Shows directory and the rest in the TV Shows directory?
Also my preferred naming scheme is G:\TV Shows\Game of Thrones\Season 04\S04E01 - Two Swords
Any help would be greatly appreciated.
I use the built in RSS downloader in uTorrent to automatically download my TV shows and due to disk space I have had to split my collection on to two different hard drives.
All Reality TV Shows automatically download to F:\Downloads and automatically have the label "Reality Shows".
The rest of my TV Shows download to: G:\Downloads and automatically have the label "TV Shows".
I store all my Reality Shows in the directory F:\Reality Shows
The rest of the TV Shows are stored in G:\TV Shows
Is there a way I can use the labels to get Filebot to put the Reality Shows in the Reality Shows directory and the rest in the TV Shows directory?
Also my preferred naming scheme is G:\TV Shows\Game of Thrones\Season 04\S04E01 - Two Swords
Any help would be greatly appreciated.
Re: Sort from Label Names
It's all in the format. Though you don't have access to ut_label you can just check the current file path, and build paths based on that.
This is a complete different case but you should be able to see why this is useful to you:
http://www.filebot.net/forums/viewtopic ... 9010#p9010
This is a complete different case but you should be able to see why this is useful to you:
http://www.filebot.net/forums/viewtopic ... 9010#p9010
Re: Sort from Label Names
Thanks for your reply rednoah but I really don't understand.rednoah wrote:It's all in the format. Though you don't have access to ut_label you can just check the current file path, and build paths based on that.
This is a complete different case but you should be able to see why this is useful to you:
http://www.filebot.net/forums/viewtopic ... 9010#p9010
What do you mean by check your current file path?
Sorry, really struggling to understand all this.
Re: Sort from Label Names
This is all you need on a silver platter, the rest is up to you

Code: Select all
{file.path[0] == 'F' ? 'F:/Reality Shows' : 'G:/TV Shows'}/{n} - {sxe} - {t}
Re: Sort from Label Names
Thanks again for your help rednoah but I probably haven't explained myself very well.rednoah wrote:This is all you need on a silver platter, the rest is up to you![]()
Code: Select all
{file.path[0] == 'F' ? 'F:/Reality Shows' : 'G:/TV Shows'}/{n} - {sxe} - {t}
I assume the code you added above is for using in FileBot's user interface in Edit Format, this works great for anything I drag and drop and rename.

In fact the code below is the exact format I like:
Code: Select all
{file.path[0] == 'F' ? 'F:/Reality Shows' : 'G:/TV Shows'}/{n}/{"Season ${s.pad(2)}"}/{s00e00} - {t}
Is this even possible?
Re: Sort from Label Names
Yes. RTFM, the section called Change how files will be organized and renamed which explains you how to pass in your own formats.
Re: Sort from Label Names
Well I had read the manual and I'm sure for someone like yourself it seems straight forward but for someone like me it's like trying to read a foreign language.rednoah wrote:Yes. RTFM, the section called Change how files will be organized and renamed which explains you how to pass in your own formats.

Anyway, after reading what seems like every thread on the forum I finally had success!

So just in case anyone else needs something similar here is my working code for uTorrent's Run this program when a torrent finishes:
Code: Select all
filebot -script fn:amc --log-file G:/Downloads/amc.log --action copy --def "seriesFormat={file.path[0] == 'F' ? 'F:/Reality Shows' : 'G:/TV Shows'}/{n}/{\"Season ${s.pad(2)}\"}/{s00e00} - {t}" --conflict override -non-strict --def music=n artwork=n "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
Re: Sort from Label Names
Good job! You worked out the escaping by yourself! Most come back for that, or give up. 

Re: Sort from Label Names
Everything had been working great up to a week or so ago, now the script has stopped working, this is the message I'm getting:
Parameter: seriesFormat = {file.path[0]
Parameter: music = n
Parameter: artwork = n
Parameter: ut_label = TV Shows
Parameter: ut_state = 5
Parameter: ut_title = Suits.S04E01.HDTV.x264-LOL.mp4
Parameter: ut_kind = single
Parameter: ut_file = Suits.S04E01.HDTV.x264-LOL.mp4
Parameter: ut_dir = G:\Downloads
Input: G:\Downloads\Suits.S04E01.HDTV.x264-LOL.mp4
Group: [tvs:suits] => [Suits.S04E01.HDTV.x264-LOL.mp4]
javax.script.ScriptException: SyntaxError: missing token: }
Finished without processing any files
Failure (°_°)
Any idea what could be causing this?
Parameter: seriesFormat = {file.path[0]
Parameter: music = n
Parameter: artwork = n
Parameter: ut_label = TV Shows
Parameter: ut_state = 5
Parameter: ut_title = Suits.S04E01.HDTV.x264-LOL.mp4
Parameter: ut_kind = single
Parameter: ut_file = Suits.S04E01.HDTV.x264-LOL.mp4
Parameter: ut_dir = G:\Downloads
Input: G:\Downloads\Suits.S04E01.HDTV.x264-LOL.mp4
Group: [tvs:suits] => [Suits.S04E01.HDTV.x264-LOL.mp4]
javax.script.ScriptException: SyntaxError: missing token: }
Finished without processing any files
Failure (°_°)
Any idea what could be causing this?
Re: Sort from Label Names
--def variables that contain = are broken with v4.1 (and before, but not sure since when)
Use r2252 or later.
Use r2252 or later.