{plex} with additional information
-
- Posts: 2
- Joined: 02 Jan 2017, 21:28
{plex} with additional information
I have a question: is there a documentation what and how the Plex Naming Scheme works?
I'd love to use it, but I want to add (by movies and TV Shows, not the subtitles) the encoding for video and audio if available - h.264, ac3 and so. Is there a way to add this if the file used there is a videofile?
I'd love to use it, but I want to add (by movies and TV Shows, not the subtitles) the encoding for video and audio if available - h.264, ac3 and so. Is there a way to add this if the file used there is a videofile?
Re: {plex} with additional information
1.
This example from the documentation seems to do what you're asking for.
2.
Alternatively, if you don't want to abide by the {plex} standard, you can just define your own format:
@see viewtopic.php?f=5&t=4116Plex Naming Schemes wrote:e.g. Movies/Avatar (2009)/Avatar (2009) by James Cameron [720p, x264, AC3]Code: Select all
{plex.derive{" by $director"}{" [$vf, $vc, $ac]"}}
This example from the documentation seems to do what you're asking for.
2.
Alternatively, if you don't want to abide by the {plex} standard, you can just define your own format:
Code: Select all
{ny} [{vf}]/{n}.{y}.{vf}.{vc}
-
- Posts: 2
- Joined: 02 Jan 2017, 21:28
Re: {plex} with additional information
my problem is with plex and it's subtitles. If I have external subtitles (.srt-files), then I have to name them Moviename.subt.srt. {plex} prepares everything, including the .subt-part for the srt-file - but when I add {vf} then the subt is not the last part of the filename before the suffix .srt. That's why I wanted to expansion of the {plex}-macro; to have my "specials" as part _before_ the subt.
Re: {plex} with additional information
Yes, the solutions outlined above do take the subtitle suffix into account.
1.
{plex} with additional information before the subtitle suffix:
2.
Custom format with subtitle suffix:
1.
{plex} with additional information before the subtitle suffix:
Code: Select all
{plex.derive{" [$vf, $vc, $ac]"}}
Custom format with subtitle suffix:
Code: Select all
{ny} [{vf}]/{n}.{y}.{vf}.{vc}{subt}
-
- Posts: 42
- Joined: 07 Jun 2017, 16:50
Re: {plex} with additional information
I've started using Radarr and thus need the file's quality in the filename so this stupid program knows it's downloaded something already.
I'm trying:
But my .workflow (I'm using this as a service) gets an error:
It works fine with and But the additional parameters throw an error about a missing token. I don't see a token missing though.
Edit: If I use that same format within the GUI, it works. I checked to make sure my CLI is up to date and it wasn't (I was on 4.8.5). Now I'm running v. 4.9.0
When I run that same command in 4.9.0, I get a different error:
The file exists, though: https://take.ms/Jkjlo
I'm trying:
Code: Select all
{plex.derive{" [$vf, $vc, $ac]"}}
Code: Select all
The action “Run Shell Script” encountered an error: “Illegal Argument: java.nio.file.NoSuchFileException: /Users/Alfred/[, ([,)
Illegal Argument: java.nio.file.NoSuchFileException: /Users/Alfred/, (,)
Illegal Argument: java.nio.file.NoSuchFileException: /Users/Alfred/]}} (]}})
SyntaxError: missing token: }
javax.script.ScriptException: SyntaxError: missing token: }
at net.filebot.format.ExpressionFormat.compile(ExpressionFormat.java:112)
at net.filebot.format.ExpressionFormat.<init>(ExpressionFormat.java:43)
at net.filebot.format.ExpressionFileFormat.<init>(ExpressionFileFormat.java:13)
at net.filebot.cli.ArgumentBean.getExpressionFileFormat(ArgumentBean.java:255)
at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:124)
at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:33)
at net.filebot.Main.main(Main.java:132)
”
Code: Select all
{plex}
Code: Select all
{plex.tail}
Edit: If I use that same format within the GUI, it works. I checked to make sure my CLI is up to date and it wasn't (I was on 4.8.5). Now I'm running v. 4.9.0
When I run that same command in 4.9.0, I get a different error:
Code: Select all
The action “Run Shell Script” encountered an error: “File does not exist: []}}
args[1] = -rename
args[2] = -r
args[3] = /Volumes/Super Storage/Video/Bloodshot (2020) [1080p] [WEBRip] [5.1] [YTS.MX]/Movies/Bloodshot (2020)/Bloodshot (2020).mp4
args[4] = --format
args[5] = {plex.derive{
args[6] = []}}
args[7] = -non-strict
args[8] = --log-file
args[9] = context-menu.log”
Re: {plex} with additional information
You must quote your arguments correctly. Please read Cmdline and Argument Passing for details.
GOOD:
BAD:
Use the @file syntax for reading command-line arguments from external text files.
GOOD:
Code: Select all
filebot -script fn:sysenv --format '{plex.derive{" [$vf, $vc, $ac]"}}'
...
args[0] = -script
args[1] = fn:sysenv
args[2] = --format
args[3] = {plex.derive{" [$vf, $vc, $ac]"}}
BAD:
Code: Select all
filebot -script fn:sysenv --format "{plex.derive{" [$vf, $vc, $ac]"}}"
...
args[0] = -script
args[1] = fn:sysenv
args[2] = --format
args[3] = {plex.derive{
args[4] = [,
args[5] = ,
args[6] = ]}}

-
- Posts: 42
- Joined: 07 Jun 2017, 16:50
Re: {plex} with additional information
Got it. I didn't realize I needed single tickets around the format.
I've always had quotes around it and now see the error in my ways.
I've always had quotes around it and now see the error in my ways.
Re: {plex} with additional information
FileBot 4.9.0 tries to give you better error messages by mirroring the argument array is something is off, though it's somewhat difficult FileBot to give you better error messages because it can't even guess what you're trying to do if the argument array is gibberish.mikejandreau wrote: ↑28 Mar 2020, 13:33 I've always had quotes around it and now see the error in my ways.

