plex imdb tag not adding to folder name

Any questions? Need some help?
Post Reply
nyxtyr
Posts: 14
Joined: 17 Nov 2020, 17:19

plex imdb tag not adding to folder name

Post by nyxtyr »

As seen on the plex documentation at https://support.plex.tv/articles/naming ... dia-files/
/Movies
/Batman Begins (2005) {imdb-tt0372784}
Batman Begins (2005) {imdb-tt0372784}.mp4
The imdb id is in the folder name and file name but when using the filebot renaming format below it only adds the imdb tag to the filename and not the folder. Does anyone know any way I can add it to the folder and filename?

When using this

Code: Select all

Y:/{plex.derive{" {imdb-$imdbid}"}}
It resaults to this

Code: Select all

Y:/Movies/Avatar (2009)/Avatar (2009) {imdb-tt0499549}

My desired output would be

Code: Select all

Y:/Movies/Avatar (2009) {imdb-tt0499549}/Avatar (2009) {imdb-tt0499549}.mkv
User avatar
rednoah
The Source
Posts: 20273
Joined: 16 Nov 2011, 08:59

Re: plex imdb tag not adding to folder name

Post by rednoah »

I'm pretty sure it's fine either way. But you can always further customize your format. Unfortunately, File.derive() can only be used to append information to the filename.

e.g.

Code: Select all

Y:/Movies/{ny}{" {imdb-$imdbid}"}/{ny}{" {imdb-$imdbid}"}
or

Code: Select all

Y:/{plex.parent}{" {imdb-$imdbid}"}/{plex.derive{" {imdb-$imdbid}"}.name}
:idea: Please read the FAQ and How to Request Help.
nyxtyr
Posts: 14
Joined: 17 Nov 2020, 17:19

Re: plex imdb tag not adding to folder name

Post by nyxtyr »

I tested

Code: Select all

Y:/{plex.parent}{" {imdb-$imdbid}"}/{plex.derive{" {imdb-$imdbid}"}.name}
and this works perfectly. Thank you for the reply much appreciated.
nyxtyr
Posts: 14
Joined: 17 Nov 2020, 17:19

Re: plex imdb tag not adding to folder name

Post by nyxtyr »

FileBot 4.9.3 broke the below snippet
Using TheMovieDB

Code: Select all

Y:/{plex.parent}{" {imdb-$imdbid}"}/{plex.derive{" {imdb-$imdbid}"}.name}
For some reason it is changing the names from
/Movies/Batman Begins (2005) [verify.com]/Batman Begins (2005) [verify.com].mp4
to
/Movies/Batman Begins (2005) {imdb-tt0372784}/Batman Begins (2005) {imdb-tt0372784}.com
< it is thinking the file extension is .com or some reason when it is mp4
User avatar
rednoah
The Source
Posts: 20273
Joined: 16 Nov 2011, 08:59

Re: plex imdb tag not adding to folder name

Post by rednoah »

What is the value of {plex} in this specific file / match case? Can you reproduce the problem with other test cases?


Here's what I get:

Code: Select all

{plex.derive{" {imdb-$imdbid}"}.name}
Image


:?: So you're saying it displays correctly in preview, but then preserves the wrong extension after clicking Rename? (it displays mp4 as extension and renames as *.mp4 just fine for me; so I can't reproduce this either given the information above)
:idea: Please read the FAQ and How to Request Help.
nyxtyr
Posts: 14
Joined: 17 Nov 2020, 17:19

Re: plex imdb tag not adding to folder name

Post by nyxtyr »

Thanks for the reply. Currently testing again in 4.9.4 and having the same error. Sorry for the long delay I was down with a bad case of covid. It would be for the subtitle files specifically and not the video files themselves. Where they would usually get .eng.sub, .eng.vtt or .eng.srt they all default to .mxn.sub, .mxn.vtt or .mxn.srt

Edit #1
Image
Last edited by nyxtyr on 31 Oct 2021, 05:38, edited 1 time in total.
nyxtyr
Posts: 14
Joined: 17 Nov 2020, 17:19

Re: plex imdb tag not adding to folder name

Post by nyxtyr »

Image
User avatar
rednoah
The Source
Posts: 20273
Joined: 16 Nov 2011, 08:59

Re: plex imdb tag not adding to folder name

Post by rednoah »

Can you provide a sample file (file name and file content) please?

The .eng part is derived from the current file name if possible (i.e. subtitles named .eng will be detected as English) but FileBot may - as a last resort - use statistical language auto-detection based on the words in the subtitle text content, which seems on incorrectly (?) detect Mexican Spanish.


EDIT:

Based on the newly added screenshot the language extension .mxn (Mexican Spanish) on the right hand side seems to match the VER.MX (Mexican version?) on the left hand side.
:idea: Please read the FAQ and How to Request Help.
nyxtyr
Posts: 14
Joined: 17 Nov 2020, 17:19

Re: plex imdb tag not adding to folder name

Post by nyxtyr »

Folder = batman begins (2005) [1080p] [BluRay] [VER.MX]
File Error = batman.begins.2005.1080p.BluRay.x264.ACC-[VER.MX].idx
File NO Error= batman.begins.2005.1080p.BluRay.x264.ACC-[VER.MX].mp4
File Error = batman.begins.2005.1080p.BluRay.x264.ACC-[VER.MX].srt
File Error = batman.begins.2005.1080p.BluRay.x264.ACC-[VER.MX].sub
File Error = batman.begins.2005.1080p.BluRay.x264.ACC-[VER.MX].vtt


Edit:

so the VER.MX would be a website url
Last edited by nyxtyr on 31 Oct 2021, 05:42, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 20273
Joined: 16 Nov 2011, 08:59

Re: plex imdb tag not adding to folder name

Post by rednoah »

Are those subtitles in English or Mexican Spanish (as suggested by the file name)?
:idea: Please read the FAQ and How to Request Help.
nyxtyr
Posts: 14
Joined: 17 Nov 2020, 17:19

Re: plex imdb tag not adding to folder name

Post by nyxtyr »

They are in English
nyxtyr
Posts: 14
Joined: 17 Nov 2020, 17:19

Re: plex imdb tag not adding to folder name

Post by nyxtyr »

As you can see in this image it doesn't do that in 4.9.2

Image
User avatar
rednoah
The Source
Posts: 20273
Joined: 16 Nov 2011, 08:59

Re: plex imdb tag not adding to folder name

Post by rednoah »

The screenshot from FileBot 4.9.2 doesn't show any language tag, so you might be using a custom format of some kind. The {plex} binding would add the language suffix .eng or .mxn (or whatever the auto-detected language suffix may be) to subtitle files, and that would be the correct expected behaviour, which happens to not be what you want.


e.g. use the {plex} format but blank out the subtitle language suffix part:

Code: Select all

{ plex ^ null }
e.g. same as the above, but with your desired imdb-tt1234567 additions:

Code: Select all

{ plex ** {" {imdb-tt${omdb.imdbId.pad(7)}}"} ^ null }
:idea: Please read the FAQ and How to Request Help.
nyxtyr
Posts: 14
Joined: 17 Nov 2020, 17:19

Re: plex imdb tag not adding to folder name

Post by nyxtyr »

So i did a test with a bunch of other .com extensions and on the .mx website extension causes this with the subtitle files

4.9.4

Code: Select all

Y:/{plex.parent}{" {imdb-$imdbid}"}/{plex.derive{" {imdb-$imdbid}"}.name}
Update
.id turns in to .ind
.is turns in to .ice
.nl turns in to .dut

Sample files can be download here @ https://gofile.io/d/CAujTr

They are basic text files with renamed extensions to emulate actual file extensions
User avatar
rednoah
The Source
Posts: 20273
Joined: 16 Nov 2011, 08:59

Re: plex imdb tag not adding to folder name

Post by rednoah »

Thanks for the sample file paths. I'll see what I can do about fine-tuning the language suffix auto-detection logic.



EDIT:

:idea: Note that Batman.Begins.nl.srt (as opposed to something like Batman.Begins.[website.nl].srt) turning into Batman Begins (2005).dut.srt is the correct behaviour, because .nl indicates Dutch language, and {plex} expects the corresponding ISO-639-2/B language code which is .dut for Dutch language:
nyxtyr wrote: 31 Oct 2021, 20:35 .id turns in to .ind
.is turns in to .ice
.nl turns in to .dut

Your custom format decides which language code standard you want to use when naming your files:

e.g. de

Code: Select all

{ lang.ISO2 }
e.g. deu

Code: Select all

{ lang.ISO3 }
e.g. ger

Code: Select all

{ lang.ISO3B }
:idea: Please read the FAQ and How to Request Help.
nyxtyr
Posts: 14
Joined: 17 Nov 2020, 17:19

Re: plex imdb tag not adding to folder name

Post by nyxtyr »

Thank you for looking in to that. My ideal setup would be for the subs to be forced to eng.

Code: Select all

X:\Movies\Batman Begins (2005) {imdb-tt0372784}\Batman Begins (2005) {imdb-tt0372784}.mp4
X:\Movies\Batman Begins (2005) {imdb-tt0372784}\Batman Begins (2005) {imdb-tt0372784}.eng.srt
X:\Movies\Batman Begins (2005) {imdb-tt0372784}\Batman Begins (2005) {imdb-tt0372784}.eng.sub
X:\Movies\Batman Begins (2005) {imdb-tt0372784}\Batman Begins (2005) {imdb-tt0372784}.eng.vtt
X:\Movies\Batman Begins (2005) {imdb-tt0372784}\Batman Begins (2005) {imdb-tt0372784}.eng.ttml
User avatar
rednoah
The Source
Posts: 20273
Joined: 16 Nov 2011, 08:59

Re: plex imdb tag not adding to folder name

Post by rednoah »

nyxtyr wrote: 10 Nov 2021, 00:57 My ideal setup would be for the subs to be forced to eng.
e.g. add ".eng" to files with certain extensions:

Code: Select all

{ ext ==~ /srt|sub|vtt|ttml/ ? '.eng' : null }

:idea: If you plan on combining that with {plex} then you need to make to start with "plex without language suffix" and then add ".eng" after that:

Code: Select all

{ plex ^ null }{ ext ==~ /srt|sub|vtt|ttml/ ? '.eng' : null }
:idea: Please read the FAQ and How to Request Help.
Post Reply