How do I combine both plex.derive() and plex.tail in a custom format?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
stoneii
Posts: 21
Joined: 08 May 2019, 11:28

How do I combine both plex.derive() and plex.tail in a custom format?

Post by stoneii »

Hy i update my FileBot from older version to 5.0.3
and now my powershell scrippt not running.
The script runs, but it doesn't work properly the movie name folders are not created for each movie no folder. Only the original name is moved without change. can someone help me to correct the script.

Code: Select all

Rename movies using [TheMovieDB]
Auto-detect movie from context [Y:\ftp\NEU-x264-1080p-ger.1\S\spiel.mit.der.angst.2007.german.dl.1080p.bluray.x264.internal-fission.mkv]
Ignore invalid output file name: Y:\ftp\DONE-x264-1080p-ger.1\Movie\S\.mkv
Failed to detect subtitle language: Y:\ftp\NEU-x264-1080p-ger.1\S\spiel.mit.der.angst.2007.german.dl.1080p.bluray.x264.internal-fission.idx: Subtitle format not supported
Ignore invalid output file name: Y:\ftp\DONE-x264-1080p-ger.1\Movie\S\.idx
Failed to detect subtitle language: Y:\ftp\NEU-x264-1080p-ger.1\S\spiel.mit.der.angst.2007.german.dl.1080p.bluray.x264.internal-fission.sub: Subtitle format not supported
Ignore invalid output file name: Y:\ftp\DONE-x264-1080p-ger.1\Movie\S\.sub
[MOVE] from [Y:\ftp\NEU-x264-1080p-ger.1\S\spiel.mit.der.angst.2007.german.dl.1080p.bluray.x264.internal-fission.mkv] to [Y:\ftp\DONE-x264-1080p-ger.1\Movie\S\spiel.mit.der.angst.2007.german.dl.1080p.bluray.x264.internal-fission.mkv]
[MOVE] from [Y:\ftp\NEU-x264-1080p-ger.1\S\spiel.mit.der.angst.2007.german.dl.1080p.bluray.x264.internal-fission.idx] to [Y:\ftp\DONE-x264-1080p-ger.1\Movie\S\spiel.mit.der.angst.2007.german.dl.1080p.bluray.x264.internal-fission.idx]
[MOVE] from [Y:\ftp\NEU-x264-1080p-ger.1\S\spiel.mit.der.angst.2007.german.dl.1080p.bluray.x264.internal-fission.sub] to [Y:\ftp\DONE-x264-1080p-ger.1\Movie\S\spiel.mit.der.angst.2007.german.dl.1080p.bluray.x264.internal-fission.sub]
Processed 3 files
It will be because I've been using my script for years and after the update it never works

Thank you for your support

here is my script

Code: Select all

-script
fn:amc
--output
Y:\ftp\DONE-x264-1080p-ger.1
--action
move
-non-strict
--db TheMovieDB
Y:\ftp\NEU-x264-1080p-ger.1
--log-file
amc.log
--lang
de
--def
excludeList=amc.txt
deleteAfterExtract=y
clean=y
--def
movieFormat=Movie/{az}/{plex.tail.derive{" by $director"}{" [$vf, $vc, $ac]"}}
seriesFormat={plex.derive{" [$vc]"}}
animeFormat={plex.derive{" [$vc]"}}
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Update FileBot to 5.0.3 AMC not running

Post by rednoah »

:!: Your format is partially wrong and so it only generates a partial destination path:
Screenshot

:idea: If you're using the .derive() and .tail methods from the {plex} format object then you need to derive a new path first and then use the tail of that path:
Screenshot




:arrow: In this case, I would recommend following the examples from the {plex} format manual to future-proof your custom format:

Format: Select all

{ ~plex.id % { " by $director" } % { " [$vf, $vc, $ac]" } }
:idea: Please read the FAQ and How to Request Help.
stoneii
Posts: 21
Joined: 08 May 2019, 11:28

Re: How do I combine both plex.derive() and plex.tail in a custom format?

Post by stoneii »

Oh Thank You,
its running

Code: Select all

movieFormat=Movie/{az}/{plex.derive{" by $director"}{" [$vf, $vc, $ac]"}.tail}
I adjusted it and there was still an error with the film DB
I deleted that

Code: Select all

--db TheMovieDB
and now it works.

But I will also try to extend the new format with the next mass change
thank you I am very happy
Post Reply