Page 1 of 1

Custom Plex Edition

Posted: 23 May 2025, 03:26
by dougcgibson1
Hi All,
I have been playing around with Plex Editions and I have found one way to add arbitrary info to the Edition field. For example:

Given the movie name "

Code: Select all

The.Hobbit.An.Unexpected.Journey.2012.Extended.Cut.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.REMUX-FraMeSToR
"

If I run this "

Format: Select all

\{ plex.id %  { fn =~ /2160p/ ? fn =~ /(?i)remux/ ? '{edition-4k Remux}' : '{edition-4k}' : null } }
"

I will get this:

Code: Select all

\Movies\The Hobbit - An Unexpected Journey (2012) {tmdb-49051}\The Hobbit - An Unexpected Journey (2012){edition-4k Remux}.mkv
If I run this "

Format: Select all

\{ plex.id % { " {edition-${tags[0]}}" } }
"

I will get this:

Code: Select all

\Movies\The Hobbit - An Unexpected Journey (2012) {tmdb-49051}\The Hobbit - An Unexpected Journey (2012) {edition-Extended Cut}.mkv
Both of these are expected. But I want to combine them so that I get something like this:

Code: Select all

The Hobbit - An Unexpected Journey (2012) {edition-Extended Cut, 4k Remux}.mkv
Also, the method for getting "4k Remux" quickly becomes cumbersome as you add words. What I would like to do is build my own list of Edition Words, and have all of them listed one by one in the Edition Field, such as: movie_name {Edition-Extended Cut, 4k, Remux, DV, Hybrid, Upscaled, etc}.mkv

Re: Custom Plex Edition

Posted: 23 May 2025, 05:22
by rednoah
e.g.

Format: Select all

{ allOf{ tags }{ hd =~ /UHD/ ? '4K' : null }{ hdr }{ fn.matchAll(/remux|hybrid|upscaled/) }.joining(', ', '{edition-','}') }

Code: Select all

{edition-Extended Cut, 4K, HDR10, REMUX}

Re: Custom Plex Edition

Posted: 23 May 2025, 06:25
by dougcgibson1
Nice! I really have a lot to learn about this syntax! It seems that once you know what you want, there's a way!

I got this:

Code: Select all

\Movies\The Hobbit - An Unexpected Journey (2012) {tmdb-49051}\The Hobbit - An Unexpected Journey (2012){edition-Extended Cut, 4K, Dolby Vision, REMUX}.mkv

Re: Custom Plex Edition

Posted: 24 May 2025, 15:39
by rednoah
dougcgibson1 wrote: 23 May 2025, 06:25 Nice! I really have a lot to learn about this syntax! It seems that once you know what you want, there's a way!
Cheers. Anything is possible. That's the idea. :ugeek:


:idea: Looks like the format above is missing a space before the {edition bit:

Groovy: Select all

' {edition-'