how to fix a movie folder for Plex (i.e. dealing with extras)

Any questions? Need some help?
Post Reply
erm
Posts: 14
Joined: 01 Apr 2019, 05:39

how to fix a movie folder for Plex (i.e. dealing with extras)

Post by erm »

I’m new here trying to fix my movie folders and files for Plex. I gave FileBot a shot at my first movie and it didn’t go so well.

I was hoping to have FileBot organize the extras as described in the Local Trailers and Extras section of https://support.plex.tv/articles/200220 ... ts-movies/.

Instead it has replaced all the extras’ titles.

Do I need to dive into the the binding language in general and the {plex} binding in particular? I’ve scanned some of this but haven’t found any mention of -Extra_type or how to make the Extra_Directory_Type subdirs that Plex wants.

But surely there are many users who’ve been down this path. Is there some recipe to follow that I’m not seeing? Has anyone put together a “how to fix a movie directory for Plex” tutorial?

I’ve been diving through the faqs and forums and feel like I’m way off in the weeds trying to find a database to shift-click. ;) Can anyone point a lost noob back to the well-trodden path?

Image
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: how to fix a movie folder for Plex

Post by rednoah »

Unfortunately, FileBot does not support extras.

Typically, Extras will be completely ignored from processing, but doesn't always pick up on it depending on how files are currently named and organized. Processing extras "correctly as per Plex Naming Standard" is unfortunately something that can't be automated, because it requires human decision making.
:idea: Please read the FAQ and How to Request Help.
erm
Posts: 14
Joined: 01 Apr 2019, 05:39

Re: how to fix a movie folder for Plex

Post by erm »

Oh, so sad. I've so many movie folders to fix for Plex. :(
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: how to fix a movie folder for Plex

Post by rednoah »

Typically, movie folders are not a problem, but FileBot will leave the extras behind.

What you can do is process folders as a single unit:
https://www.youtube.com/watch?v=WbHPC0o4Uqo

That won't help organize things inside each movie folder, but it might help you out a little bit.
:idea: Please read the FAQ and How to Request Help.
erm
Posts: 14
Joined: 01 Apr 2019, 05:39

Re: how to fix a movie folder for Plex

Post by erm »

Is there a step-by-step "how to" on processing folders as a single unit? I'm having difficulty following what's happening in the video. :|
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: how to fix a movie folder for Plex

Post by rednoah »

You just need to Link-Drop the folders, and that'll instruct FileBot to add folders to the last as is, instead of adding all the files contained within that folder.

Please read the video description for details.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: how to fix a movie folder for Plex

Post by kim »

can't you just move all the "Extra..." files into a "Others" folder ?
erm
Posts: 14
Joined: 01 Apr 2019, 05:39

Re: how to fix a movie folder for Plex

Post by erm »

Thank you, rednoah, for your excellent help, but I am still not understanding the video after watching it many times.

What does processing "folders as a single unit" accomplish? I don't understand why I want to do that. Does this do something to fix the problem of extras showing up in Plex as separate movies? Or is this done to reorganize the movie folders and tv show folders into two separate places? What happens to the files and subfolders under these folders?

When I try to follow in the video, there's no explanation of what's being done or why. Why is the folder list dragged into FileBot twice? It looks like something happens in between the two drags that causes the FileBot scrollbar to change color, but I don't see what. In the second drag it looks like something is done to change the drop action but I don't see what. Is it clicking a key or a mouse button or hovering or what? When the Stardust prompt pops up what is the thing that gets click before Select? What's the Invalid Names thing that flies by and why does that happen if the names were just fetched from the database? After the rename are the files being dragged back to the finder? What's going on with the Sky Captain files at the end? Is this an example of something that has to be done with all the movie files or was there a problem with the Sky Captain files? What problem was it and what was the flag in the ui that caused it to be noticed?

When I compare the folder names at the beginning and end I see that there's several bits of info added in brackets. My folders have the years in parenthesis and from what I can tell that seems to be fine with Plex. Why do I want to change the parentheses to brackets? Am I missing some Plex functionality by only having the year and not the other data in the folder name?

I wish there were some tutorials or how-tos I could follow so I could get far enough I wouldn't have to be a dumb noob asking dumb questions. :/
Last edited by erm on 02 Apr 2019, 23:25, edited 1 time in total.
erm
Posts: 14
Joined: 01 Apr 2019, 05:39

Re: how to fix a movie folder for Plex

Post by erm »

@kim I guess I will have a write a script to do something like you suggest. I'm thinking to use filename matching to identify trailers, making of, and behind the scene vids, and anything else gets moved to Shorts or Featurettes or Other or something.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: how to fix a movie folder for Plex

Post by rednoah »

1.
The video shows how to process a folder, which is not to be confused with processing each individual file within a given folder. By processing the folder as a whole, FileBot will not touch any of the files inside, and so each file will be preserved as is, but also won't be renamed in any way. Just play with it yourself for a little bit, and you'll understand how it works.


2.
You can make a Preset and just exclude everything with the word "Extra" in it. That'll allow you to process just the movie files, and just leave "Extras" behind, which you can then deal with manually or delete yourself.
viewtopic.php?f=3&t=4222


3.
Plex has a naming standard. You can deviate and it'll probably still work just fine, probably. You can use any kind of brackets you want, but the official standard dictates parenthesis so that's what you'll get by default. Having extra information after Name (Year) probably works fine, emphasis on probably, since the standard dictates Name (Year) and AFAIK doesn't officially support extra custom fields after that, though it's probably gonna be fine.


4.
The Getting Started video tutorials is generally good enough for most, but that only covers the usual use cases, not special use cases, such as dealing with extras:
https://www.filebot.net/getting-started/
:idea: Please read the FAQ and How to Request Help.
erm
Posts: 14
Joined: 01 Apr 2019, 05:39

Re: how to fix a movie folder for Plex

Post by erm »

1. I understand you now.

2. Thanks! This looks very useful.

3. I came to FileBot because I need to change my files to meet the Plex naming standard. I do not want to deviate.

4. I believe I have a very typical Plex-noob problem: I have a bunch of media, organized in a useful way. I install Plex and it displays a hot mess because my file names & organization do not meet the Plex standards. So the typical Plex-noob problem is: reorganize and rename all your media files.

As a Plex-noob searching the Plex forums, I find lots of threads where the answer is “just use FileBot or you’ll always have problems.” So as a Plex-noob I become a FileBot-noob thinking FileBot will fix all my media file organization problems. :lol:

But this is an impedance mismatch, because in the FileBot world the usual Plex-noob problem is a special case. Obviously FileBot is powerful app that can do a lot, but that amplifies the noob problem, because noobs don’t know what’s a usual case and what’s a special case. Noobs need context to get oriented.

The videos have a ton of useful info in them, but for a noob it's too much detail. If someone wants to learn to drive a stick shift, showing them a video on rebuilding transmissions will probably confuse them. :)

In any case, thanks to your help I am making progress now. I’m very impressed with the level of support you provide. Many thanks.

And happy birthday!
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: how to fix a movie folder for Plex

Post by rednoah »

4.
Just get rid of all the extras first, and then the rest will work out of the box. ;)
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: how to fix a movie folder for Plex (i.e. dealing with extras)

Post by kim »

Maybe you can use something like this ?

Code: Select all

{any{fn.match(/Extras|-behindthescenes|-deleted|-featurette|-interview|-scene|-short|-trailer|-other/) ? plex[0]+'/'+plex[1]+'/Others/'+fn : 'plex1'}{plex.toString().replaceAll(/\sCD\d/)}}
erm
Posts: 14
Joined: 01 Apr 2019, 05:39

Re: how to fix a movie folder for Plex

Post by erm »

rednoah wrote: 03 Apr 2019, 18:34 4.
Just get rid of all the extras first, and then the rest will work out of the box. ;)
:lol: I've spent too much time collecting them over the years, can't toss em now.
erm
Posts: 14
Joined: 01 Apr 2019, 05:39

Re: how to fix a movie folder for Plex (i.e. dealing with extras)

Post by erm »

kim wrote: 04 Apr 2019, 23:27 Maybe you can use something like this ?

Code: Select all

{any{fn.match(/Extras|-behindthescenes|-deleted|-featurette|-interview|-scene|-short|-trailer|-other/) ? plex[0]+'/'+plex[1]+'/Others/'+fn : 'plex1'}{plex.toString().replaceAll(/\sCD\d/)}}
Thanks, this is great! I've been using a switch statement to sort into various subdirs. But I like how compact your code is. I wonder if I could test the result of fn.match to see which regex (if any) matched.

Here's what I have now, but it's a work in progress.

Code: Select all

/Volumes/media/{plex[0]}/{ny}/{def x=ny; if(fn=~(n+'.*Extra')||fn=~'Extras? *[:-] ?'){x=fn-~/(?i)^.*Extras? *[:-] */;switch(fn){
	case ~/(?i).*behind.*/: x='Behind the Scenes/'+x; break
	case {x=~(' of '+n)}: x='Behind the Scenes/'+x; break
	case ~/(?i).*deleted.*/: x='Deleted Scenes/'+(x-~('.*Scenes? *[:-] *')); break
	case ~/(?i).*interview.*/: x='Interviews/'+x; break
	case ~/(?i).*makin.*/: x='Behind the Scenes/'+x; break
	case ~/(?i).*scene.*/: x='Scenes/'+(x-~('.*Scenes? *[:-] *')); break
	case ~/(?i).*trailer.*/: x='Trailers/'+x; break
	case ~/(?i).*title *card.*/: x='Other/'+x; break
	case {500<seconds}: x='Featurettes/'+x; break
	default: x='Shorts/'+x}}
x}
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: how to fix a movie folder for Plex (i.e. dealing with extras)

Post by rednoah »

Sorry, then some manual labor will be required.

kim has a good idea though. If all extras get matched to the correct movie, you can maybe use the format to keep certain name components only (e.g. ignore part index) and certain patterns from the extras (e.g. fn.after(/Extra/)) and somehow make it work. Maybe possible, not a standard use case though.


EDIT:

I see you're already ahead of the game here. Looks like your custom format is already starting to take care of all the special cases you need.
:idea: Please read the FAQ and How to Request Help.
erm
Posts: 14
Joined: 01 Apr 2019, 05:39

Re: how to fix a movie folder for Plex (i.e. dealing with extras)

Post by erm »

rednoah wrote: 05 Apr 2019, 16:58 Looks like your custom format is already starting to take care of all the special cases you need.
It's still evolving as I keep finding cases to handle. It's kinda fun.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: how to fix a movie folder for Plex (i.e. dealing with extras)

Post by rednoah »

Please share the final results. If you come up with something that works well for a large number of files (i.e. data collection) then support for this use case could be improved in the core some way or another.
:idea: Please read the FAQ and How to Request Help.
snickers2k
Posts: 26
Joined: 05 Nov 2016, 15:13

Re: how to fix a movie folder for Plex (i.e. dealing with extras)

Post by snickers2k »

erm wrote: 05 Apr 2019, 16:54
kim wrote: 04 Apr 2019, 23:27 Maybe you can use something like this ?

Code: Select all

{any{fn.match(/Extras|-behindthescenes|-deleted|-featurette|-interview|-scene|-short|-trailer|-other/) ? plex[0]+'/'+plex[1]+'/Others/'+fn : 'plex1'}{plex.toString().replaceAll(/\sCD\d/)}}
Thanks, this is great! I've been using a switch statement to sort into various subdirs. But I like how compact your code is. I wonder if I could test the result of fn.match to see which regex (if any) matched.

Here's what I have now, but it's a work in progress.

Code: Select all

/Volumes/media/{plex[0]}/{ny}/{def x=ny; if(fn=~(n+'.*Extra')||fn=~'Extras? *[:-] ?'){x=fn-~/(?i)^.*Extras? *[:-] */;switch(fn){
	case ~/(?i).*behind.*/: x='Behind the Scenes/'+x; break
	case {x=~(' of '+n)}: x='Behind the Scenes/'+x; break
	case ~/(?i).*deleted.*/: x='Deleted Scenes/'+(x-~('.*Scenes? *[:-] *')); break
	case ~/(?i).*interview.*/: x='Interviews/'+x; break
	case ~/(?i).*makin.*/: x='Behind the Scenes/'+x; break
	case ~/(?i).*scene.*/: x='Scenes/'+(x-~('.*Scenes? *[:-] *')); break
	case ~/(?i).*trailer.*/: x='Trailers/'+x; break
	case ~/(?i).*title *card.*/: x='Other/'+x; break
	case {500<seconds}: x='Featurettes/'+x; break
	default: x='Shorts/'+x}}
x}
really great approach.
could you please share the final result? this snippet is not working.
thank you
Harumph
Posts: 1
Joined: 17 Oct 2022, 17:02

Re: how to fix a movie folder for Plex (i.e. dealing with extras)

Post by Harumph »

Hello, I just recently began using FileBot to clean up my movie folders and have no experience in coding. I gave the code from kim a shot and it worked almost perfectly when I took out the "Others/" as it was creating an odd Others folder which isn't needed for Plex. My only problem is it is ignoring trailers and deleted extras, despite them being in the code. Is there anything I could be doing to make them not ignored? I haven't found a solution using Google and know nothing about coding so I would appreciate any help that is given.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: how to fix a movie folder for Plex (i.e. dealing with extras)

Post by rednoah »

:?: How are your extras currently organised?
viewtopic.php?t=12172


:idea: Depending on how your extras are named (i.e. a.mp4 and a-cover.jpg is processed as a single unit, while a.mp4 and cover.jpg is not) your extras may not get matched to any episode / movie object and thus cannot be formatted via custom naming schemes.


:idea: Notably, custom naming schemes solely describe the output file path, and have no effect on how input file paths are interpreted. So if FileBot cannot match some input file in the first place, then custom format code cannot help with that.


:idea: Can you post screenshots or file paths? Please read How to Request Help for details.
:idea: Please read the FAQ and How to Request Help.
Post Reply