Im trying to be smart... Documentary

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
MickeMM
Posts: 44
Joined: 03 Apr 2019, 10:52

Im trying to be smart... Documentary

Post by MickeMM »

I found this when i was looking here for something new.

Code: Select all

{
// series / anime / movie format expressions
seriesFormat   = any{ seriesFormat   }{ _args.format }{ 'omkodat/serie' + today.format('/yyyy/ww')}
movieFormat    = any{ movieFormat    }{ _args.format }{ 'omkodat/film' + today.format('/yyyy/ww')}
unsortedFormat = any{ unsortedFormat }{ 'check'}
}
But how can i get documentary and animation to seperat folders?

I have try alot by change the code above, but cant get it to work.

I have try f.ex

Code: Select all

movieFormat    = any{ genres('Documentary') ? 'omkodat/dokumentar' + today.format('/yyyy/ww')}

Code: Select all

movieFormat    = any{ genres('Documentary') ? 'omkodat/dokumentar' + today.format('/yyyy/ww') : genres[0]}
and also

Code: Select all

movieFormat    = any{ movieFormat    }{ _args.format }{ genres('Documentary') ? 'omkodat/dokumentar' + today.format('/yyyy/ww') : genres[0]}
I have also try to change ' to / in Documentary.

Please help!
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Im trying to be smart... Documentary

Post by rednoah »

:?: Please describe your use case from the beginning and make sure to include example file paths (input path and corresponding desired output path) so we can see what you are trying to do. The code snippets above make no sense for multiple reasons, so I'm not actually sure what you're trying to do.


:!: You'll want to use the --def seriesFormat and --def movieFormat options to pass in your custom format. Please read Change how files will be organized and renamed. Modifying the amc script is neither necessary nor recommended for custom formats.


:!: You can't use an episode format that doesn't use any episode information. Well, you can but it's not smart. FileBot will still identify the series and match the episode, and then ask you to format that. Looks like you're abusing the entire amc script for just serie / film separation?


:arrow: You'll want to use a Plain File Mode to rewrite file paths based on your own custom rules, i.e. the current date in your case. You'll have to take care of serie / film separation yourself, but this might just be very easy if your files are already sorted into folders, or have S00E00 / YYYY-MM-DD / etc makers in the file name.


:arrow: You absolutely will want to use the Format Editor to prototype your custom format expressions. Whatever it is you're trying to do, the Format Editor is almost certainly gonna be the first step towards that.
:idea: Please read the FAQ and How to Request Help.
MickeMM
Posts: 44
Joined: 03 Apr 2019, 10:52

Re: Im trying to be smart... Documentary

Post by MickeMM »

Sorry!

This is the AMC script i use

Code: Select all

# Input Parameters
ARG_PATH="$1"
ARG_NAME="$2"
ARG_LABEL="$3"

# Configuration
CONFIG_OUTPUT="/home/myuser/arkiv/"
filebot.sh -script fn:amc --output "$CONFIG_OUTPUT" --action duplicate -non-strict --conflict auto --log-file /home/myuser/logg/amc.log --def clean=y --def excludeList="/home/myuser/logg/.excludes" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" --def ignore="fylla_disken|uppackat" --def movieFormat=@/home/myuser/filebot-portable/MovieFormat.groovy seriesFormat=""$CONFIG_OUTPUT"serie/{plex}"
And this i what i found and want to use (groovy)

Code: Select all

{
// series / anime / movie format expressions
seriesFormat   = any{ seriesFormat   }{ _args.format }{ 'omkodat/serie' + today.format('/yyyy/ww')}
movieFormat    = any{ movieFormat    }{ _args.format }{ 'omkodat/film' + today.format('/yyyy/ww')}
unsortedFormat = any{ unsortedFormat }{ 'omkodat/film' + today.format('/yyyy/ww')}
}
/
{ plex.tail }
I want animated and documentary to be sort like movie.
Movie
- Movie
- Animated
- Dokumentary
Serie
- Serie
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Im trying to be smart... Documentary

Post by rednoah »

rednoah wrote: 12 Sep 2023, 04:49 :?: Please describe your use case from the beginning and make sure to include example file paths (input path and corresponding desired output path) so we can see what you are trying to do. The code snippets above make no sense for multiple reasons, so I'm not actually sure what you're trying to do.

Please follow this format:

(INPUT) I have this file:

Code: Select all

/path/to/Downloads/Alias.1x01.mkv
(OUTPUT) I want to move / rename this file like so:

Code: Select all

/path/to/Plex/TV Shows/Alias {tmdb-2046}/Season 01/Alias - S01E01 - Truth Be Told.mkv
:idea: Please read the FAQ and How to Request Help.
Post Reply