Additional label/directories

Support for Ubuntu and other Desktop Linux distributions
Post Reply
zen
Posts: 2
Joined: 31 Dec 2018, 12:51

Additional label/directories

Post by zen »

Hello,

I currently manage a plex server for some friends and myself and recently started adding UFC fights to plex. The issue I am having is it is sorting UFC into the movies directory, but I want to move UFC fights into its own directory "UFC". How would I go about making this adjustment? This is the current commandline that is executed when the torrent is finished. My plan was to make it so when I label the torrent "UFC" it would use themoviedb to grab the meta and then put it into the "UFC" folder.

Code: Select all

filebot -script fn:amc --output "$CONFIG_OUTPUT" --action copy --conflict override -non-strict --log-file amc.log --def subtitles=en --def unsorted=y music=y artwork=y excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" &
Any help would greatly be appreciated :D
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Additional label/directories

Post by rednoah »

You'll need to start using custom formats. Please read the docs on custom formats and amc script docs on how to pass in custom formats for details there.


The custom format will probably boil down to something like this, where you use UFC / Movies depending on whether the filename contains "UFC" or not:

Code: Select all

{f =~ /UFC/ ? 'UFC' : 'Movies'}/{plex.tail}

If you prefer to use the label as folder name, then you can do something like this:

Code: Select all

{label}/{plex.tail}
:idea: Please read the FAQ and How to Request Help.
zen
Posts: 2
Joined: 31 Dec 2018, 12:51

Re: Additional label/directories

Post by zen »

rednoah wrote: 01 Jan 2019, 06:24 You'll need to start using custom formats. Please read the docs on custom formats and amc script docs on how to pass in custom formats for details there.


The custom format will probably boil down to something like this, where you use UFC / Movies depending on whether the filename contains "UFC" or not:

Code: Select all

{f =~ /UFC/ ? 'UFC' : 'Movies'}/{plex.tail}

If you prefer to use the label as folder name, then you can do something like this:

Code: Select all

{label}/{plex.tail}
Awesome! That worked perfectly. I have another question. I am trying to get TMZ to get organized but unfortunately TheTVDB is no longer updating for TMZ and it keeps getting thrown into the unsorted folder. Is it possible to rename the file using the original filename? Example:

Original: tmz.on.tv.2018.12.21.720p.web.x264-tbs.mkv
Renamed: TMZ 2018-12-21.mkv

Thank again!
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Additional label/directories

Post by rednoah »

You could have your unsorted format check for certain patterns in the file name, and then act accordingly.

There's an example for a somewhat similar use case here:
viewtopic.php?f=3&t=2072
:idea: Please read the FAQ and How to Request Help.
Post Reply