New Plex naming convention as of Plex 1.2x

Support for macOS users
Post Reply
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

New Plex naming convention as of Plex 1.2x

Post by cheaters »

Plex has changed their naming conventions.

Because of this change I had to change the file names of all of my movie files to remove a hyphen that was causing an issue. When I did this I ran into the same old issues I have been struggling with when using the {Plex} binding and was wondering if anyone had suggestions on how to avoid those in the future.

First Issue. I keep multiple versions of the same movie in the same folder. One may be dubbed and the other original language. One may be Directors Cut and the other Theatrical release and their subtitle files, etc.

Because I use the {Plex} binding to rename these files there can be an issue when I have to rename in bulk where those folders that have more than one copy of a movie or subtitle are appended with CD1 CD2, etc. This isn't an issue when my torrent app runs the post download script because my script will add an index number when files are downloaded at different times, but the GUI sees these files as movie parts every time even though their filenames are different. If I add those "duplicate" movies and their subtitles separately to the GUI then everything works swimmingly and they are not seen by filebot as movie part files.

Anyway, I want to avoid these files being seen as movie parts when they are not and it's difficult to know which folders contain more than one .mp4 or .srt since I have many folders. The advantage of doing this with filebot is its bulk processing capabilities and speed. Looking manually though the renaming results runs counter to that.

Second issue. Plex allows users to add a sub folder under the main movie folder for "Featurettes" "Interviews" "Deleted" movies. I have created sub folders and renamed movie files to conform to Plex's convention but when I am bulk renaming those folders are deleted and those files are renamed according to the main movie and again appended with CD1 CD2, etc.

I have to revert this and it's painstakingly slow. By finding all of the CD1 appended files and looking at their extended attributes and renaming them manually and recreating the sub folders.

It would be helpful to know how the {plex} binding decides what a movie part is and isn't. The only way I have figured out how to get around it is to just not process multiple sets of .mp4 and.srt files from the same folder at the same time. I wish there was a toggle for this multipart movie handling feature that didn't affect other aspects of movie renaming.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: New Plex naming convention as of Plex 1.2x

Post by rednoah »

1.
Note that {plex} default multi-part auto-detection is based on media characteristics (e.g. same resolution, same video codec, same audio codec, etc). If you were to test with real 2 files, Avatar.720p.mp4 and Avatar.1080p.mp4, then this would be 2 movies (as opposed to 1 movie with 2 parts) and thus format to the exact same destination path. As such {plex} does not support "multiple versions per movie" by default.

However, you can modify your format to add additional information to the file path that makes each movie version unique (e.g. by adding video resolution or audio language)
rednoah wrote: 12 Sep 2016, 10:03 e.g. Movies/Avatar (2009)/Avatar (2009) by James Cameron [720p, x264, AC3].eng

Code: Select all

{plex.derive{" by $director"}{" [$vf, $vc, $ac]"}}
:idea: plex.derive() can be used to insert additional information after the file name but before the subtitle language suffix and file extension.
:!: Note that File.derive() is completely unrelated to the multi-part auto-detection. If you're having issues with the latter, that'd be a separate issue.


:!: multi-part auto-detection is currently based on media creation year | resolution | video codec | audio codec so multi-part auto-detection false positives are possible if you have multiple different versions of the same movie that look the same when only looking at media creation year | resolution | video codec | audio codec but perhaps use a different audio language.


:idea: You can effectively turn off multi-part auto-detection by configuring FileBot to not probe file contents (see Optimizations for Remote File Systems) but this may or may not work well for you depending on how files are currently organized. I guess the default fallback multi-part auto-detection would be just based on the parent folder, which may or may not work well for you.


:idea: Separating each movie version into its own movie folder with some tags added to the end of the movie folder name might be a good idea too. But the {plex} does not account well for this particular target folder structure requirements.


2.
"Featurettes" "Interviews" "Deleted" etc are generally ignored as far as FileBot is concerned. The amc script will preemptively ignore them. Not sure what the GUI does. The general answer is that these extras aren't support well, but in some relatively easy cases it might be possible to make it work to some degree with a smart approach.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: New Plex naming convention as of Plex 1.2x

Post by cheaters »

Thanks rednoah
rednoah wrote: 09 Oct 2020, 03:07 1.
Note that {plex} default multi-part auto-detection is based on media characteristics (e.g. same resolution, same video codec, same audio codec, etc). If you were to test with real 2 files, Avatar.720p.mp4 and Avatar.1080p.mp4, then this would be 2 movies (as opposed to 1 movie with 2 parts) and thus format to the exact same destination path. As such {plex} does not support "multiple versions per movie" by default.

However, you can modify your format to add additional information to the file path that makes each movie version unique (e.g. by adding video resolution or audio language)
Different audio language is not helping to distinguish for movies that I have in the same folder. I really want it to.
This would fix one of my remaining FileBot GUI issues. I named these by dropping them into the GUI separately:

Code: Select all

/Volumes/PlexMedia/PlexServer_1/Movies/Ne Zha (2019)/Ne Zha (2019) {imdb-tt10627720} [[en] 2.40꞉1 WS 1080p BluRay x265 AE85FADD].mp4
/Volumes/PlexMedia/PlexServer_1/Movies/Ne Zha (2019)/Ne Zha (2019) {imdb-tt10627720} [[zh] 2.40꞉1 WS 1080p BluRay x265 3D015C88].mp4
When I drop them together they are renamed as movie parts. They have different {audio.language}.

Code: Select all

/Volumes/PlexMedia/PlexServer_1/Movies/Ne Zha (2019)/Ne Zha (2019) {imdb-tt10627720} [[en] 2.40꞉1 WS 1080p BluRay x265 AE85FADD] CD1.mp4
/Volumes/PlexMedia/PlexServer_1/Movies/Ne Zha (2019)/Ne Zha (2019) {imdb-tt10627720} [[zh] 2.40꞉1 WS 1080p BluRay x265 3D015C88] CD2.mp4
Does your multi-part formula use the local file for determining audio language or TMDB movie information? This is the JSON from both of the above files.

Code: Select all

{"@type":"Movie","year":2019,"imdbId":10627720,"tmdbId":615453,"language":"en","id":615453,"name":"Ne Zha","aliasNames":["哪吒之魔童降世"]}
{"@type":"Movie","year":2019,"imdbId":10627720,"tmdbId":615453,"language":"en","id":615453,"name":"Ne Zha","aliasNames":["哪吒之魔童降世"]}

Code: Select all

{plex.derive{' {imdb-'}{imdbid}{'}'}{' ['+allOf{tags}{audio.language}{info:video[0].displayAspectRatioString.colon("꞉").replace('?', '')}{ws}{vf}{vs}{vc}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: New Plex naming convention as of Plex 1.2x

Post by rednoah »

jprokos wrote: 18 Oct 2020, 04:06

Code: Select all

{"@type":"Movie","year":2019,"imdbId":10627720,"tmdbId":615453,"language":"en","id":615453,"name":"Ne Zha","aliasNames":["哪吒之魔童降世"]}
{"@type":"Movie","year":2019,"imdbId":10627720,"tmdbId":615453,"language":"en","id":615453,"name":"Ne Zha","aliasNames":["哪吒之魔童降世"]}
We see that FileBot has correctly identified each movie as single-part Movie object, i.e. Movie objects as opposed to MoviePart objects.

jprokos wrote: 18 Oct 2020, 04:06

Code: Select all

{if (dc > 1) '.'+di}
Given the use case above, {dc} duplicate count is 2 and {di} duplicate index is 1 and 2 respectively because we have the same Movie object twice in the current context, {pn} part count and {pi} part index are undefined because we're working with Movie objects and not MoviePart objects, and {plex} will not add CD1/2 numbers because {pi} is undefined.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: New Plex naming convention as of Plex 1.2x

Post by cheaters »

It’s renaming as a multi-part when they are dragged in together. I was hoping the different languages in each movie would be enough to signal to multi-part movie handling that these were not “parts” but different movies. Since usually parts 1 and 2 of a single movie would be in the same language.

I think it might be shorter and easier if you tried to think in terms of what I want to accomplish which is to stop the GUI from thinking multiple movies in the same folder are parts. Out of 4000 folders I have none that contain actual movie parts. Was there ever a method for users who didn’t want this change 4 years ago?
Last edited by cheaters on 18 Oct 2020, 05:41, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: New Plex naming convention as of Plex 1.2x

Post by rednoah »

The {dc} duplicate count and {di} duplicate index bindings are entirely based on the current current context (i.e. all the matches you format in the same batch) and solely based on the Object information (i.e. just {json}; no MediaInfo based information).


:idea: You could write your own code using the {model} binding and then count duplicates as you see fit. However, this is were it gets intricate and some Groovy coding skills are probably going to be necessary.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: New Plex naming convention as of Plex 1.2x

Post by rednoah »

jprokos wrote: 18 Oct 2020, 05:33 Was there ever a method for users who didn’t want this change 4 years ago?
I suppose it's just not an issue for most users because it does work out-of-the-box for most most users and most use cases:

Code: Select all

$ filebot -rename *.mkv --db TheMovieDB --format '{plex.derive{" $audioLanguages"}{" [$resolution]"}}' --log INFO --action TEST
[TEST] from [Avatar.2009.eng.mkv] to [Movies/Avatar (2009)/Avatar (2009) [eng, jpn] [640x480].mkv]
[TEST] from [Avatar.2009.zho.mkv] to [Movies/Avatar (2009)/Avatar (2009) [jpn] [1920x1080].mkv]
:idea: The GUI will give you the same results. I choose the CLI because it makes copy & paste easy.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: New Plex naming convention as of Plex 1.2x

Post by rednoah »

jprokos wrote: 18 Oct 2020, 05:33 I was hoping the different languages in each movie would be enough to signal to multi-part movie handling that these were not “parts” but different movies.
jprokos wrote: 18 Oct 2020, 04:06

Code: Select all

{"@type":"Movie","year":2019,"imdbId":10627720,"tmdbId":615453,"language":"en","id":615453,"name":"Ne Zha","aliasNames":["哪吒之魔童降世"]}
{"@type":"Movie","year":2019,"imdbId":10627720,"tmdbId":615453,"language":"en","id":615453,"name":"Ne Zha","aliasNames":["哪吒之魔童降世"]}
According to the {json} values you have posted, there is no multi-part handling going on here. "@type":"Movie" tells us that these are not “parts” but different movies.
:idea: Please read the FAQ and How to Request Help.
Post Reply