Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scenes...

Support for Windows users
Post Reply
rnd01618
Posts: 2
Joined: 04 Aug 2023, 02:17

Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scenes...

Post by rnd01618 »

Looking for GUI / Groovy preset code to address my particular use case. New to Filebot and Groovy, and have searched and tried and used ChatGPT for several hours, but am stuck.

First, let's ignore the media/movies part of this, and assume I want to rename just the outer folders and the main movie file and have them remain 'in place' on the drive, for now (this works best for me, for now...)

I may be doing something wrong from the moment I drop a folder into Filebot GUI. It loads the movie and all the files in the Behind the Scenes subfolder, which I may not want, but it might be fine if I can build a preset that tells filebot to ignore subfolders and their content.

Deleting these subfolder files manually is too many clicks. If I leave them, the Plex preset wants to rename them as CD2, 3 etc. If I try to edit the plex preset, I get stuck trying to imitate the new plex format, specifically, getting the {tmdb-####} to appear correctly in the folder name (I want to do this to suppress the auto CD1, 2... numbering that seems to be part of the plex.id preset.

Here's the structure I want to keep in place (note the directory path at top of screen capture)
https://capture.dropbox.com/Pv1W8TDaPCszjQbu

But this shouldn't matter--I just want to leave the structure in place but match and update the folder name based on its movie file's name and year info.

Re Behind the Scenes folders: Mostly I've just dumped all extras into one Behind the Scenes folder, for all movies. Again, just want filebot to leave these folders and their contents alone.

Again, my goal is to clean up the movies' outer folder names (and add the TMDB-#### string, correctly, for new plex format) and movie title (my movie titles are 99% correct, though) in place--i.e. not move things around to a media/movies folder, and (again again) ignore other subfolders and files therein.

Can anyone advise me and/or hook me up with the groovy code and/or steps to build a preset so I can drop and process these movie folders in, ideally, small batches of outer folders (i.e. 5-10 movies at a time)? Hopefully this will work for one folder at a time, as well, so I can test.

Thanks so much for any advice (except 'delete your extras' advice...)
Courtenay
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scene

Post by rednoah »

1.
The How do I organize files for Plex? video tutorial will get you started:



:idea: You'll want to use {drive}/Media/{plex.id} as format and hardlink files into a new file structure. This does not require extra disk space. You can have the same file multiple times at different file paths. This means that you can process all your files without ever touching the originals, which you can then either keep forever just in case, or delete once you're happy with the new structure.


:idea: FileBot will indeed ignore extras and will typically not match extra files to movie objects. If you want to copy along extras from the same folder as the source file, then you can enable the Import companion files post-processing feature. Please read Apply Post-Processing Features and Companion Files for details.




2.
If you really just want to rename the movie folders (i.e. treat every single folder exactly as if it was a single file) then you can alternatively follow the How do I literally just rename folders? approach. This is not typically what you want, but it may be what you want in this specific use case.
:idea: Please read the FAQ and How to Request Help.
rnd01618
Posts: 2
Joined: 04 Aug 2023, 02:17

Re: Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scene

Post by rnd01618 »

Thanks so much @rednoah!

I’ll work through all these guides and come back if I hit any snags.

Really appreciate the help.
Courtenay
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scene

Post by rednoah »

rnd01618 wrote: 04 Aug 2023, 03:21 Deleting these subfolder files manually is too many clicks. If I leave them, the Plex preset wants to rename them as CD2, 3 etc. If I try to edit the plex preset, I get stuck trying to imitate the new plex format, specifically, getting the {tmdb-####} to appear correctly in the folder name (I want to do this to suppress the auto CD1, 2... numbering that seems to be part of the plex.id preset.
You seem to suggest that your extra files are in fact matched to movie objects, as part of a multi-part movie file no less. That is somewhat unusual.


:idea: FileBot will try to ignore extra files if FileBot can identify them as such, so something went wrong. Can you paste sample file paths as text for extra files that are erroneously not ignored?


:idea: CD1/CD2 naming requires files to have the same general media characteristics, video resolution, audio/video codecs, video duration, etc. Can you confirm that FileBot is giving you CD1/CD2/CD3 groups with main movie and extra files? Or do you get the main movie / long video as one group without CD1/CD2, and then another CD1/CD2/CD3 group for all the short video extras?
:idea: Please read the FAQ and How to Request Help.
loracweb
Posts: 9
Joined: 23 Jul 2023, 01:16

Re: Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scene

Post by loracweb »

Code: Select all

D:\Media\Movies\criterion\Belle de Jour (1967) Criterion + Extras (1080p BluRay x265 HEVC 10bit AAC 1.0 French r00t)\Featurettes\Documentaries
If I load the folder filebot wants to process the 3 files under the documentaries folder and the same goes for any other movies that have this Featurettes\Documentaries structure.
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scene

Post by rednoah »

I see. FileBot will automatically ignore files in the Featurettes folder. However, you've added another Documentaries folder, and so files are not automatically ignored.


:arrow: You can use Presets with an Includes file filter (see How do I process only specific kinds of files? for details) to have FileBot not select these files:

Groovy: Select all

none{ f =~ /Featurettes|Documentaries/ }
:idea: Please read the FAQ and How to Request Help.
loracweb
Posts: 9
Joined: 23 Jul 2023, 01:16

Re: Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scene

Post by loracweb »

It only has an issue with 'documentaries' folders though. There are other subfolders that it does ignore and that's how it was released.
It would be better if it just ignored the subfolders altogether without needing to add more code as I can't predict what folders might be under extras of featurettes.
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scene

Post by rednoah »

loracweb wrote: 06 Aug 2023, 14:45 There are other subfolders that it does ignore and that's how it was released.
:?: What are the names of the other subfolders?

:idea: You can easily copy & paste file paths as text from the FileBot UI by pressing the F7 key on your keyboard.


loracweb wrote: 06 Aug 2023, 14:45 It would be better if it just ignored the subfolders altogether without needing to add more code as I can't predict what folders might be under extras of featurettes.
:idea: The following Includes filter will exclude any file path that has "Featurettes" or "Documentaries" anywhere in the file path, so you will not need to add more code:
rednoah wrote: 06 Aug 2023, 07:19 :arrow: You can use Presets with an Includes file filter (see How do I process only specific kinds of files? for details) to have FileBot not select these files:

Groovy: Select all

none{ f =~ /Featurettes|Documentaries/ }


EDIT:

:!: This thread assumes that we're talking about FileBot Desktop application usage. If you need help with qBT integration / amc script usage please create a dedicated thread.
:idea: Please read the FAQ and How to Request Help.
loracweb
Posts: 9
Joined: 23 Jul 2023, 01:16

Re: Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scene

Post by loracweb »

The code looks useful and looks as if there could be other useful code here in the forums but i don't understand how it's used in conjunction with using my custom format preset.

The AMC part I'm still working on and will use the other thread for additional questions.

Slightly off topic but I must say that I don't find TMBD to be very reliable in either matching mode. OMDB does seem more accurate though.
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help going from old plex format to new format while preserving any existing subfolders (e.g. BTS, Deleted Scene

Post by rednoah »

loracweb wrote: 09 Aug 2023, 18:46 The AMC part I'm still working on and will use the other thread for additional questions.
If you want to ignore files with Featurettes or Documentaries in the file path, then the amc script has a dedicated option for that:

Shell: Select all

--def ignore="Featurettes|Documentaries"


loracweb wrote: 09 Aug 2023, 18:46 Slightly off topic but I must say that I don't find TMBD to be very reliable in either matching mode.
If you find a mismatch, or any other strange behaviour, room for improvement, etc, please provide file paths (you're using the GUI) or console output (if you're using the CLI) so that we can have a look.
:idea: Please read the FAQ and How to Request Help.
Post Reply