N:\Filme # with all movies, some examples:
N:\Filme\10 Cloverfield Lane (2016)\10 Cloverfield Lane (2016).mkv
N:\Filme\300 (2006 - 2014)\300 (2006).mkv # part of the 300 collection
This structure works nice and well for plex, but I'd like to change it up a little.
First, I want a structure that suits me for my direct access.
Collections with a single Movie are being created (blue). Is there any way to prevent this behavior?
Movies without a collection are being moved out of my N:\Filme folder to the root of N:\ (red). Any idea how to fix this without hard-coding the correct path?
I'd like to change the audio languages "deu" to "DE" and "eng" to "EN". I wasn't able to achive this using .replace nor .replaceAll (purple).
Finally, I'd like to know how to use the german name for renaming, when the only audioLanguage is german (green).
Other than that, do you have any insights on my naming system or hints, what I might want to include/exclude?
Assuming, all above mentioned problems are fixed, I'd like to think about my plex structure.
Structure for Plex
Using your Plex-FAQ, I want to create a hardlink for plex at (for example)
Is there a way to automatically create the appropriate hardlinks in the plex folder when renaming in the media folder?
My current workaround is using two presets:
Preset: rename movies in media folder.
Select renamed movies in step 1 and paste them to filebot again.
Preset: create hardlink in plex folder.
Is there a nicer way to deal this with?
Looking forward to your help.
Loving this tool - I actually enjoy playing around with this tool
Re: Formatting for private and plex use
Posted: 10 Jan 2025, 10:56
by rednoah
1.
The {model} binding can be used to move / rename files different depending on the other files being moved / renamed along side, i.e. move movies into a collection folder only if you actually have 2 or more movies of that collection loaded into FileBot. (NOTE: This is a topic for a dedicated thread if you need code-level support.)
2.
You'll want your format to start with N:\Filme to define exactly what you want. If your format is relative, then FileBot will resolve the target file path relatively to the current file path, which may or may not always be what you want it to be depending on the file path at hand.
4.
The {localize} dynamic localization binding can be used to access the German movie name at format time - depending on the file at hand - even if you're matching in English. (NOTE: This is a topic for a dedicated thread if you need code-level support.)
5.
I strongly recommend separating your custom structure that has files named and organised to your preferences, and a secondary structure for Plex were files are named and organised for Plex. Looks like you're already on the right path there. A auto-generated secondary structure using hardlinks is the way to go. I see no downsides to that.
My movie is being dragged out of the N:/Filme Directory to the root of N.
This happens when a movie has no collection.
Any idea on how to fix that?
Kind regards
Re: Formatting for private and plex use
Posted: 10 Jan 2025, 14:07
by rednoah
ye62dzec wrote: ↑10 Jan 2025, 13:01
About question 2: The thing is, that I want to use relative pathing.
Relative to what exactly though? Relative to the current drive? Relative to the parent folder of the movie file? Relative to a somehow specified folder level in between?
If you want to organise files into N:/Filme regardless of the current file path then the absolute path is what you want.
EDIT:
On further examination, you custom format is accidentally generating absolute file paths:
If {collection} fails then the target file path will start with / which is an absolute file path on Linux, and evidently an "absolute-but-relative-to-the-drive" file path on Windows.
Re: Formatting for private and plex use
Posted: 10 Jan 2025, 14:14
by ye62dzec
Well. That's a good question in itself.
When renaming without {collection}, the movie folders always stay at the same directory they were initially stored in. In my case, all movies are usually at N:/Filme - before and after renaming.
Only when using {collection}, I run into the problem, that the movies are being dragged back to the root of N.
It's not that big of a deal, just wanted to let you know about the behavior and whether there is a way to fix it.
My assumption was, that I could just do a if-else whether there was a collection for a movie. If yes, use "{collection}/" as a prefix to {plex.name}, else don't use the prefix
EDIT: Just saw your edit. Quite interesting! Is there an easy fix to that? What do you think about my if-else
Re: Formatting for private and plex use
Posted: 10 Jan 2025, 14:17
by rednoah
See EDIT above for details.
You can use {folder} to generate absolute paths as desired for each file at hand:
WARNUNG: Failed to write xattr key: net.filebot.metadata: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: Back to the Future (1985) - [EN] [1080p x264] [15.7GB].mkv:net.filebot.metadata
Jan 12, 2025 11:33:26 PM net.filebot.MetaAttributeView put
WARNUNG: Failed to write xattr key: net.filebot.metadata: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: Back to the Future Part II (1989) - [EN] [1080p x264] [8.5GB].mkv:net.filebot.metadata
Jan 12, 2025 11:33:26 PM net.filebot.MetaAttributeView put
WARNUNG: Failed to write xattr key: net.filebot.metadata: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: Back to the Future Part III (1990) - [EN] [1080p x264] [9.3GB].mkv:net.filebot.metadata
Any idea what I'm doing wrong?
Also: is there a way to rename files for my prefered structure and automatically do a hardlink for every renamed file in my main dir at the same time?
Re: Formatting for private and plex use
Posted: 13 Jan 2025, 02:54
by rednoah
The error message strongly suggests that the setting is not in fact set. Each user has a different configuration file. Each machine has a different configuration file. Maybe something along those lines?
There is no easy way to apply multiple rename actions. You could of course - with significant effort - write our own custom a postprocess script, but the current solution is 2 clicks: Select Preset (or keyboard shortcut) and Rename
Re: Formatting for private and plex use
Posted: 13 Jan 2025, 12:38
by ye62dzec
I missed to check "Export .xattr folders" in the Post Processing Options. That fixed it.
Is is so complex to write a script?
I'd expect it to be as easy as:
1. Read all folders/files in "N:/Filme"
2. Fetch xattr Data
3. Make a hardlink match to "N:/Plex/Filme"
Re: Formatting for private and plex use
Posted: 14 Jan 2025, 08:33
by rednoah
The easiest solution would be the filebot command-line tool. You can have your postprocess script simply make a filebot call.
Note that Export .xattr folders simply creates additional files with movie / episode metadata. This postprocess notably does not configure FileBot to read xattr information from .xattr folders, nor does it internally configure FileBot to use .xattr files for all kinds of xattr, e.g. original filename, mediainfo, crc32, custom user xattr, etc will still be stored (or attempted to be stored) into native file system xattr.