Filebot AMC - Keep original name

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
rodeoric
Posts: 2
Joined: 28 Jul 2020, 05:46

Filebot AMC - Keep original name

Post by rodeoric » 28 Jul 2020, 05:59

Hello,

i have the following problem.

I want to hold different versions from example movies on my plex server but i have the naming problem when i only use

Code: Select all

{n} ({y})
cause i get following result: "Testfile (2020).mkv

Example:
Testfile.2020.German.DTS.DL.1080p.BluRay.x264-SoW - Original Folder Name

The following output i would like to have in the filename:
Testfile.2020.German.DTS.DL.1080p.BluRay.x264-SoW.mkv - This should be the result

Sometimes files are packed or samples are inside the folder, so i would like to use filebot amc script.

Code: Select all

filebot -script fn:amc --lang de --output "/myoutputfolder/00-Automove" --action duplicate -non-strict "/myinputfolder/autodl" --def "movieFormat=/myinputfolder/autodl/{fn}/{fn}" --log-file $AMC --def excludeList=$AMC
What do i have to change in my script to get it like i want it ? :roll:

Best Regards

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

Re: Filebot AMC - Keep original name

Post by rednoah » 28 Jul 2020, 09:16

If you're organizing files for Plex, then you'll want to use the {plex} format.


You can have multiple versions of the same movie, by adding various MediaInfo properties to the file name to ensure a unique file path for each movie file:

Code: Select all

{
	plex.derive{" [$vf, $vc, $ac]"}
}

If you primarily care about preserving the tail section of the original file name, then you can do something like this:

Code: Select all

{
	plex.derive{ fn.after(/\d{4}/) }
}



:!: Note that using /myinputfolder/autodl/{fn}/{fn} as format makes things fairly pointless for obvious reasons. I recommend using the GUI for prototyping so you can figure out what {fn} and friends mean exactly ahead of time. ;)

Image
:idea: Please read the FAQ and How to Request Help.

rodeoric
Posts: 2
Joined: 28 Jul 2020, 05:46

Re: Filebot AMC - Keep original name

Post by rodeoric » 28 Jul 2020, 15:42

You can have multiple versions of the same movie, by adding various MediaInfo properties to the file name to ensure a unique file path for each movie file:

Code: Select all

{
	plex.derive{" [$vf, $vc, $ac]"}
}
Thank you for reponse.

1. I already thought about this too, but i had one problem. What happens when the original file is not scene release and does not have for example the "ac" in name ?

2. I tried adding group at the end but i didnt got it running, it just dont like groups, i tried it with many different files, but result was the same, there was a github site that manage the groups and all i tried where added there.

Maybe you could explain me the Nr. 1 ?
:!: Note that using /myinputfolder/autodl/{fn}/{fn} as format makes things fairly pointless for obvious reasons. I recommend using the GUI for prototyping so you can figure out what {fn} and friends mean exactly ahead of time.

Code: Select all

/myinputfolder/autodl/{fn}
This could make more sense :D ?

Best Regards

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

Re: Filebot AMC - Keep original name

Post by rednoah » 28 Jul 2020, 16:23

1.
Bindings such as {ac} are based on the media file itself, regardless of file name:
viewtopic.php?t=4285

{source} and {group} being a notable exceptions since those pieces of information can only be derived from the file name:
viewtopic.php?t=11265

If you have trouble with {group} please include file paths and screenshots or console output that illustrate your trouble.

Because it generally works:

Code: Select all

$ filebot -mediainfo *.mkv --format "{group} | {fn}"
SoW | Testfile.2020.German.DTS.DL.1080p.BluRay.x264-SoW


2.
Using {fn} (i.e. the current filename) makes no sense because the whole point of running FileBot is figuring out what movie a given file refers to, name, year, id, genre, etc. {fn} is the one piece of information we don't need to figure out because we have it from the very beginning. Might as well use Plain File Mode if you just want to move files (as opposed to identifying files).
:idea: Please read the FAQ and How to Request Help.

Post Reply