Incorporating Plex's new "Editions" Feature

All about user-defined episode / movie / file name format expressions
Post Reply
canisdibellum
Posts: 4
Joined: 11 Jun 2022, 22:21

Incorporating Plex's new "Editions" Feature

Post 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.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Incorporating Plex's new "Editions" Feature

Post by rednoah »

e.g.

Code: Select all

{ "{edition-${tags.first()}}" }
:idea: Please read the FAQ and How to Request Help.
canisdibellum
Posts: 4
Joined: 11 Jun 2022, 22:21

Re: Incorporating Plex's new "Editions" Feature

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Incorporating Plex's new "Editions" Feature

Post by rednoah »

Every question gets and answer. The forums is usually better though because it's easier to search & find via Google later.
:idea: Please read the FAQ and How to Request Help.
FTW
Posts: 39
Joined: 28 Jan 2022, 09:47

Re: Incorporating Plex's new "Editions" Feature

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Incorporating Plex's new "Editions" Feature

Post 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.
:idea: Please read the FAQ and How to Request Help.
Post Reply