Page 1 of 1

Incorporating Plex's new "Editions" Feature

Posted: 29 Aug 2022, 02:30
by canisdibellum
So to use the new "Editions" feature you are supposed to trail the filename with the edition like this: ex: Extended =

Code: Select all

{edition-Extended}
Using an example file that I know is extended, I can get filebot to give me "{edition-[Extended, Extended Version]}"
that code is:

Code: Select all

{'{edition-'+tags+'}'}
but trying to clean it up, to even get rid of the brackets is frustrating.
For example if I use:

Code: Select all

{'{edition-'+tags.replaceAll(/[._]/, " ")+'}'}
the whole tag disappears. This happens any time I've tried to modify the tag text, I've tried

Code: Select all

.replaceTrailingBrackets()
just for a jumping off point as well as a bunch of others and it does the same thing.

I've looked through the awesome examples others have posted that are WAY beyond my scope of understanding but I cannot figure this out. Can anyone help me so it will just spit out "{edition-"+the first tag+"}" ? Also, if there isn't a significant tag like Extended, Director's Cut, Special Edition, etc, I'd like to be able to have nothing there.

If I need to clarify, just ask and I will do my best.

Re: Incorporating Plex's new "Editions" Feature

Posted: 29 Aug 2022, 05:36
by rednoah
e.g.

Code: Select all

{ "{edition-${tags.first()}}" }

Re: Incorporating Plex's new "Editions" Feature

Posted: 29 Aug 2022, 06:25
by canisdibellum
rednoah wrote: 29 Aug 2022, 05:36 e.g.

Code: Select all

{ "{edition-${tags.first()}}" }
LOL thanks again...it looked like no one was browsing this forum so I X-posted on Reddit as well

Re: Incorporating Plex's new "Editions" Feature

Posted: 29 Aug 2022, 06:26
by rednoah
Every question gets and answer. The forums is usually better though because it's easier to search & find via Google later.

Re: Incorporating Plex's new "Editions" Feature

Posted: 15 Sep 2022, 08:53
by FTW
Hi,

if I am using that ->

Code: Select all

{folder.name.matchAll(/EXTENDED|UNRATED|DIRECTORS.CUT/)}
how I can turn it to return

Code: Select all

{edition-EXTENDED}
instead of

Code: Select all

[EXTENDED]
??

if I am using folder name tag instead of the movie $tag

Thanks

Re: Incorporating Plex's new "Editions" Feature

Posted: 15 Sep 2022, 10:38
by rednoah
e.g. use {tags} binding

Code: Select all

{ " {edition-${tags[0]}}" }
e.g. custom code:

Code: Select all

{ " {edition-${folder.name.match(/EXTENDED|UNRATED|DIRECTORS.CUT/)}}" }


:idea: Note that {tags} will match tags from the folder name already. Though it will prefer tags found in the file name over tags found in the folder name.

Re: Incorporating Plex's new "Editions" Feature

Posted: 19 Dec 2022, 13:03
by rednoah