Can FileBot create STRM files?

Any questions? Need some help?
Post Reply
anonymouscat888
Posts: 3
Joined: 27 Jan 2025, 13:59
Location: USA

Can FileBot create STRM files?

Post by anonymouscat888 »

Good Morning,

Here is my setup. I have a NAS with a Movies folder and TV Shows folder containing all my movies named according to the Plex naming convention (\\NAS\Movies\Name of Movie\Name of Movie.ext and \\NAS\TV Shows\Name of Show\Season\Show.ext). I have also created two new shared folders on the NAS (\\NAS\EMBY MOVIES\ AND \\NAS\EMBY TV SHOWS\). I use TinyMediaManager to grab posters, season artwork, and theme songs. I am using FileBot on Windows 11.

My goal is to have two separate libraries, one for Plex and one for Emby. I want them separate as I'm concerned about Emby potentially removing the media and associated customized artwork that I've worked a long time to get the way I want it. With them separate I can have Emby do what it wants with the artwork and as I become more familiar with program I can adjust down the road. Even if Emby accidently deletes the media file, it would only delete the STRM file. :)

I have a total of 100 TB of media, so having two separate libraries of identical media wouldn't work unfortunately.

So, my question. Is there a way for FileBot to open a folder location, such as \\NAS\MOVIES and have it automatically keep the exact folder structure and copy everything over to the target directly \\NAS\EMBY MOVIES\except the actual video file (AVI, TS, MKV, MPG, WMV, etc.)? When it encounters these files, it would create a .strm file with the location to the existing media such as \\NAS\Movies\Name of Movie (2024)\Name of Movie.strm? The STRM file would contain the path to the media. Even if it could just create the STRM file, I could find a way to move the directory structure over using FreeFileSync.

I know little to nothing about programming, but I came across a windows batch script that created STRM files. However, when handling the & character it would jumble the output. When it encountered non ASCII characters, the output would be unpredictable and the STRM file useless. So, this approach was not viable.

If there is a way to do this, would there also be a way that I can run it every week or so to update any new or changed files?

Thank you for reading and any insight you can provide! Any assistance would be very much appreciated!
User avatar
rednoah
The Source
Posts: 23922
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can FileBot create STRM files?

Post by rednoah »

anonymouscat888 wrote: 27 Jan 2025, 14:49 My goal is to have two separate libraries, one for Plex and one for Emby.
anonymouscat888 wrote: 27 Jan 2025, 14:49 I have a total of 100 TB of media, so having two separate libraries of identical media wouldn't work unfortunately.
That sounds like a perfect use case for hardlinks.

Screenshot



:?: Why not just use hardlinks? (i.e. have the same file at 2 or more file paths)


:arrow: See How do I organize files for Plex? › 0:54 Use hardlinks to save time and disk space for usage details.


:arrow: Coincidentally, Re-process previously organized files using local xattr metadata has your exact use case in the command-line examples. You can use the GUI too of course. The concept is the same.
:idea: Please read the FAQ and How to Request Help.
anonymouscat888
Posts: 3
Joined: 27 Jan 2025, 13:59
Location: USA

Re: Can FileBot create STRM files?

Post by anonymouscat888 »

This is interesting. I had no clue FileBot could do this. I need to digest this a bit since I'm not as well versed in FileBot's functionality. I appreciate your response and I'll give it a try on a test library!
anonymouscat888
Posts: 3
Joined: 27 Jan 2025, 13:59
Location: USA

Re: Can FileBot create STRM files?

Post by anonymouscat888 »

I am having a bit of trouble with this and have a few questions. I've tested on a sample library of 44 movies.

I tried to create a hardlink and FileBot created a "Media" folder in my existing library folder. I'd like it to be created in it's own folder as I have a separate share on the NAS. My current folder is \\NAS\MOVIES and I'd like the files to be created in \\NAS\EMBY MOVIES. I tried to cut and paste the new "Media" folder, but it was actually moving (or copying) the actual files because it was going to take around 30 minutes.

Would deleting or modifying the new hardlink file have any effect on the file in the original location? Would any update to the original file be reflected on the new hardlinked file?

I noticed when using "Automatic" it names the files using TMDB. This is fine, but can this be customized to use a different DB like IMDB? My Plex folders have IMDB in their folder naming. Not a big deal, just curious of the capabilities.

Some folders have two .xml files. One for data about the movie and the other for chapter data. When I ran the hardlink, it used the former and only created one .xml file. I'd like to keep the chapter .xml file as well. This isn't a big deal as I can add these again in Emby, but I'm curious if there's a way to modify?

Many folders have a theme.mp3 file. FIleBot matched the theme.mp3 file with a song I believe. I'd like the file name to be the same. I tried to modify the format to "theme.mp3" and it created a "theme.mp3.mp3" file in the source directory.

Thanks again. I'm getting used to the learning curve. :)
User avatar
rednoah
The Source
Posts: 23922
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can FileBot create STRM files?

Post by rednoah »

anonymouscat888 wrote: 27 Jan 2025, 17:42 I tried to create a hardlink and FileBot created a "Media" folder in my existing library folder. I'd like it to be created in it's own folder as I have a separate share on the NAS. My current folder is \\NAS\MOVIES and I'd like the files to be created in \\NAS\EMBY MOVIES. I tried to cut and paste the new "Media" folder, but it was actually moving (or copying) the actual files because it was going to take around 30 minutes.
You always need to ensure that files are on the same file system, from the Windows point-of-view, not just the NAS point-of-view.

e.g. BAD because 2 different file systems / 2 different network shares:

Code: Select all

* \\NAS\MOVIES
* \\NAS\EMBY MOVIES
e.g. GOOD because 1 file system / 1 network share which then just contains multiple folders:

Code: Select all

* \\NAS\MEDIA
└─ MOVIES
└─ EMBY MOVIES
** tl;dr easier to understand if you use mapped network drives; all files must be on the same drive; if you move files within the same drive its instant because its only modifying the file system entry and does not touch the file contents on disk; if you move files from one drive to anther Windows will copy+delete the file contents; you can only hardlinks files within the same file system for obvious reasons; all exactly the same as with physical drives


anonymouscat888 wrote: 27 Jan 2025, 17:42 Would deleting or modifying the new hardlink file have any effect on the file in the original location? Would any update to the original file be reflected on the new hardlinked file?
Deleting a hardlink has no effect on other hardlinks as you are deleting a file system entry and not physical data on disk. Modifying the file content via one of its hardlinks changes the file content on disk, so the changes will be reflected in all hardlinks. Remember that hardlinks are fast and efficient because you duplicate the extremely small file system entry but share the possibly extremely large file contents on disk.
Screenshot


anonymouscat888 wrote: 27 Jan 2025, 17:42 I noticed when using "Automatic" it names the files using TMDB. This is fine, but can this be customized to use a different DB like IMDB? My Plex folders have IMDB in their folder naming. Not a big deal, just curious of the capabilities.
Plex uses TheMovieDB unless configured otherwise. You must use TheMovieDB as well unless you have configured your Plex otherwise. If you're organising files for Plex then you'll want to follow the [FAQ] How do I organize files for Plex? instructions.


anonymouscat888 wrote: 27 Jan 2025, 17:42 Some folders have two .xml files. One for data about the movie and the other for chapter data. When I ran the hardlink, it used the former and only created one .xml file. I'd like to keep the chapter .xml file as well.
You are likely talking about Type 2 Companion Files. FileBot will also create hardlinks for Type 2 Companion Files if configured to do so via the Import companion files setting.


anonymouscat888 wrote: 27 Jan 2025, 17:42 Many folders have a theme.mp3 file. FIleBot matched the theme.mp3 file with a song I believe. I'd like the file name to be the same. I tried to modify the format to "theme.mp3" and it created a "theme.mp3.mp3" file in the source directory.
You are likely talking about Type 1 Companion Files. You can simply not load the .mp3 files, so that FileBot does not match them, so that they are then processed as Type 2 Companion Files. If you instruct FileBot to only select video files that'll do the trick.

Alternatively, you can modify your custom format to generate different file names for different files, i.e. use plex.id for video files and plex.id.dir / fn for other files

Format: Select all

{ f.video ? plex.id : plex.id.dir / fn }



EDIT:

:!: Note that many of the topics above are fairly unrelated to each other. Keep that in mind when tackling your use case one step at a time.
:idea: Please read the FAQ and How to Request Help.
Post Reply