Sort from Label Names

Any questions? Need some help?
Post Reply
RetroBorg
Posts: 5
Joined: 05 Apr 2014, 00:09

Sort from Label Names

Post by RetroBorg »

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.
User avatar
rednoah
The Source
Posts: 24016
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort from Label Names

Post by rednoah »

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
:idea: Please read the FAQ and How to Request Help.
RetroBorg
Posts: 5
Joined: 05 Apr 2014, 00:09

Re: Sort from Label Names

Post by RetroBorg »

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
Thanks for your reply rednoah but I really don't understand.

What do you mean by check your current file path?

Sorry, really struggling to understand all this.
User avatar
rednoah
The Source
Posts: 24016
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort from Label Names

Post by rednoah »

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}
:idea: Please read the FAQ and How to Request Help.
RetroBorg
Posts: 5
Joined: 05 Apr 2014, 00:09

Re: Sort from Label Names

Post by RetroBorg »

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}
Thanks again for your help rednoah but I probably haven't explained myself very well.

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. :D

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}
I'm after a way to do this from within uTorrent's Run this program when a torrent finishes

Image

Is this even possible?
User avatar
rednoah
The Source
Posts: 24016
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort from Label Names

Post by rednoah »

Yes. RTFM, the section called Change how files will be organized and renamed which explains you how to pass in your own formats.
:idea: Please read the FAQ and How to Request Help.
RetroBorg
Posts: 5
Joined: 05 Apr 2014, 00:09

Re: Sort from Label Names

Post by RetroBorg »

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.
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. :lol:

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

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"
Thanks again for your help and patience rednoah, FileBot is awesome.
User avatar
rednoah
The Source
Posts: 24016
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort from Label Names

Post by rednoah »

Good job! You worked out the escaping by yourself! Most come back for that, or give up. :ugeek:
:idea: Please read the FAQ and How to Request Help.
RetroBorg
Posts: 5
Joined: 05 Apr 2014, 00:09

Re: Sort from Label Names

Post by RetroBorg »

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?
User avatar
rednoah
The Source
Posts: 24016
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort from Label Names

Post by rednoah »

--def variables that contain = are broken with v4.1 (and before, but not sure since when)

Use r2252 or later.
:idea: Please read the FAQ and How to Request Help.
Post Reply