[ENTRYPOINT] Help creating custom automation (Noob)
Posted: 04 Mar 2025, 00:07
Hi everyone,
I am new to the automation and scripting side of things and I'm having a hard time learning it to be honest. I could do with watching a really good video tutorial where someone takes you through creating a script and not only explaining options but how to correctly fit them into the script (what rules need to be followed so they are used legally, etc), not just a reference to commands. Anyway, I have some requirements for how I want to setup filebot but don't know what it can fulfill. can someone advise on how realistic these requirements are and suggest a script that could achieve them please?
I am running FileBot on my Synology DS920+ NAS (running in a container). I have a structured media library and specific automation needs. Below are my requirements:
1. File Naming and Organization
I need FileBot to use these naming schemes that sorts media into these categories (is it possible to organise 3D/VR movies separately?):
• Movies → /Movies/{n} {y} {tmdb-{tmdbid}}/{n} {y} {tags} [{vf}] [{channels}] [{certification}] [{rating}]
• 3D/VR Movies → /3DVR Movies/{n} {y} {tmdb-{tmdbid}}/{n} {y} {tags} [3DVR] [{vf}] [{channels}] [{certification}] [{rating}]
• TV Shows → /TV Shows/{n} ({y}) {tvdb-{tvdbid}}/{'Season '+s00} {sy}/{n} - {s00e00} {t} {subt} {tags} [{vf}] [{channels}]
2. Handling Matches & Sorting
• Match Confidence: Strict matching, if FileBot’s confidence score is below 95, move the file to an /data1/filebot/unmatched folder for manual review, with subfolders for
Movies, TV Shows, and 3D/VR Movies.
• Duplicates: If a file already exists in my library, move the duplicate to a /data1/filebot/duplicates folder, with subfolders for Movies, TV Shows, and 3D/VR Movies.
• Adult Content: I want adult videos matched and moved to /x/X/X Vidz. To ensure FileBot properly matches adult content, I believe I need to enable (but don't know where or how I put this, in the amc script somewhere?):
filebot -script fn:properties --def net.filebot.TheMovieDB.adult=true
However, I understand that adultFormat= and adultDB=ThePornDB are not valid FileBot variables, so I need guidance on correctly configuring ThePornDB.
3. Handling Extras & Subtitles
• When handling downloaded torrents I want filebot to move all included files with the media that it matches and organises (whether matched, unmatched or duplicates), except
for specific files such as files containing "YTS" or "torrentdownload" in their filenames, for example.
• Extras should automatically be organised into a subfolder named “Other”, with recognized extras (e.g., Behind the Scenes, Featurettes, Interviews) placed in named subfolders
within 'Others'; according to Plex’s requirements.
• Subtitle handling: Only keep forced English subtitles and move them alongside the video file, unless the film is in fact a foreign film. In this case filebot should include the full
English subtitles.
Can filebot also keep only the english audio tracks (or the main audio track if it is a foreign video and there is no dubbed english track)?
4. Logging & Automation
• I need logs for all actions stored in /logs, with separate files for unmatched.log, duplicates.log, matched.log, errors.log
•
• Filebot to remove illegal characters (e.g., ?, emojis) as well as replacing:
• ":" → " -"
• "|" → "-"
Automation should run on:
• All media found in the watch folders listed below.
• On container startup and at regular intervals but for filebot to wait 60 seconds after detecting newly completed torrents so that qbittorrent has time to move all files to the
watch folder fully before filebot begins processing.
• Media I manually import, with the ability to choose presets for different media types (I have created these presets already).
5. Watch & Destination Paths
FileBot should process media from the following watch folders and move them to their final destinations and then symbolically linked back to a seeding folder. I plan to implement audio file processing at a later date.
Watch Folders (Completed Torrents are moved here by qbittorrent)
• /data1/media/video/movies → Movies
• /data1/media/video/3dvr → 3D/VR Movies
• /data1/media/video/tv_shows → TV Shows
• /data1/media/video/music_videos → Music Videos
• /data1/media/x/x → Adult Videos
• /data1/media/video/videos → General Videos
• /data1/media/audio/music → Music
• /data1/media/audio/audiobooks → Audiobooks
• /data1/media/audio/podcasts → Podcasts
Final Destination Paths (Move Processed Media Here)
• /volume1/Media/Movies/
• /volume1/Media/3DVR Movies/
• /volume1/Media/TV Shows/
• /volume1/Media/Music Videos/
• /volume1/Media/X Vidz/ (Adult)
• /volume1/Media/General Videos/
• /volume1/Media/Music/
• /volume1/Media/Audiobooks/
• /volume1/Media/Podcasts/
Seeding Paths (filebot to symlink not only the media's root folder back to subfolders (named by category like Movies, 3DVR Movies, TV Shows), within the "/data1/seeding/" folder, but also all other accompanying files so that qbittorrent can continue to seed the torrents. This will mean that filebot would need to remember what the torrents files were originally named and then name the symlinks the same so qbittorrent can still find them.
Is this possible? ( I really don't want to just keep all completed torrents in one messy folder and then create symlinks from them to a video folder for plex to use, i'd prefer to move the files to my organise media folders and then symlink back)
I am using /data1/ for the actual /data/ folder path on my NAS because, as I understand, the filebot container needs /data/ assigned for filebot/data/. Is this correct? otherwise, I will just use /data/ for my paths instead of /data1/. (I hope that makes sense? LOL)
6. Additional Questions:
1. Can FileBot automatically detect whether a video is a movie, 3D/VR movie, adult movie, TV show, or music video based on metadata? If so, what’s the best method to configure this? or can the script help filebot know how to handle the files in the watch folders according to their path and then apply different ways of handling (such as applying different naming formats)?
2. Is there a valid way to set FileBot to use ThePornDB for adult content?
3. How can I ensure logs are persistent in my container setup?
4. What does the amc script support in terms of coding languages such as bash, groovy, regular expressions, etc?
I’d appreciate any help with configuration for this automated setup.
I know this is a lot of requirements but I am struggling to understand what filebot can/can't do and how to automate any of this. Hopefully someone is up for the challenge of helping me through this
I am new to the automation and scripting side of things and I'm having a hard time learning it to be honest. I could do with watching a really good video tutorial where someone takes you through creating a script and not only explaining options but how to correctly fit them into the script (what rules need to be followed so they are used legally, etc), not just a reference to commands. Anyway, I have some requirements for how I want to setup filebot but don't know what it can fulfill. can someone advise on how realistic these requirements are and suggest a script that could achieve them please?
I am running FileBot on my Synology DS920+ NAS (running in a container). I have a structured media library and specific automation needs. Below are my requirements:
1. File Naming and Organization
I need FileBot to use these naming schemes that sorts media into these categories (is it possible to organise 3D/VR movies separately?):
• Movies → /Movies/{n} {y} {tmdb-{tmdbid}}/{n} {y} {tags} [{vf}] [{channels}] [{certification}] [{rating}]
• 3D/VR Movies → /3DVR Movies/{n} {y} {tmdb-{tmdbid}}/{n} {y} {tags} [3DVR] [{vf}] [{channels}] [{certification}] [{rating}]
• TV Shows → /TV Shows/{n} ({y}) {tvdb-{tvdbid}}/{'Season '+s00} {sy}/{n} - {s00e00} {t} {subt} {tags} [{vf}] [{channels}]
2. Handling Matches & Sorting
• Match Confidence: Strict matching, if FileBot’s confidence score is below 95, move the file to an /data1/filebot/unmatched folder for manual review, with subfolders for
Movies, TV Shows, and 3D/VR Movies.
• Duplicates: If a file already exists in my library, move the duplicate to a /data1/filebot/duplicates folder, with subfolders for Movies, TV Shows, and 3D/VR Movies.
• Adult Content: I want adult videos matched and moved to /x/X/X Vidz. To ensure FileBot properly matches adult content, I believe I need to enable (but don't know where or how I put this, in the amc script somewhere?):
filebot -script fn:properties --def net.filebot.TheMovieDB.adult=true
However, I understand that adultFormat= and adultDB=ThePornDB are not valid FileBot variables, so I need guidance on correctly configuring ThePornDB.
3. Handling Extras & Subtitles
• When handling downloaded torrents I want filebot to move all included files with the media that it matches and organises (whether matched, unmatched or duplicates), except
for specific files such as files containing "YTS" or "torrentdownload" in their filenames, for example.
• Extras should automatically be organised into a subfolder named “Other”, with recognized extras (e.g., Behind the Scenes, Featurettes, Interviews) placed in named subfolders
within 'Others'; according to Plex’s requirements.
• Subtitle handling: Only keep forced English subtitles and move them alongside the video file, unless the film is in fact a foreign film. In this case filebot should include the full
English subtitles.
Can filebot also keep only the english audio tracks (or the main audio track if it is a foreign video and there is no dubbed english track)?
4. Logging & Automation
• I need logs for all actions stored in /logs, with separate files for unmatched.log, duplicates.log, matched.log, errors.log
•
• Filebot to remove illegal characters (e.g., ?, emojis) as well as replacing:
• ":" → " -"
• "|" → "-"
Automation should run on:
• All media found in the watch folders listed below.
• On container startup and at regular intervals but for filebot to wait 60 seconds after detecting newly completed torrents so that qbittorrent has time to move all files to the
watch folder fully before filebot begins processing.
• Media I manually import, with the ability to choose presets for different media types (I have created these presets already).
5. Watch & Destination Paths
FileBot should process media from the following watch folders and move them to their final destinations and then symbolically linked back to a seeding folder. I plan to implement audio file processing at a later date.
Watch Folders (Completed Torrents are moved here by qbittorrent)
• /data1/media/video/movies → Movies
• /data1/media/video/3dvr → 3D/VR Movies
• /data1/media/video/tv_shows → TV Shows
• /data1/media/video/music_videos → Music Videos
• /data1/media/x/x → Adult Videos
• /data1/media/video/videos → General Videos
• /data1/media/audio/music → Music
• /data1/media/audio/audiobooks → Audiobooks
• /data1/media/audio/podcasts → Podcasts
Final Destination Paths (Move Processed Media Here)
• /volume1/Media/Movies/
• /volume1/Media/3DVR Movies/
• /volume1/Media/TV Shows/
• /volume1/Media/Music Videos/
• /volume1/Media/X Vidz/ (Adult)
• /volume1/Media/General Videos/
• /volume1/Media/Music/
• /volume1/Media/Audiobooks/
• /volume1/Media/Podcasts/
Seeding Paths (filebot to symlink not only the media's root folder back to subfolders (named by category like Movies, 3DVR Movies, TV Shows), within the "/data1/seeding/" folder, but also all other accompanying files so that qbittorrent can continue to seed the torrents. This will mean that filebot would need to remember what the torrents files were originally named and then name the symlinks the same so qbittorrent can still find them.
Is this possible? ( I really don't want to just keep all completed torrents in one messy folder and then create symlinks from them to a video folder for plex to use, i'd prefer to move the files to my organise media folders and then symlink back)
I am using /data1/ for the actual /data/ folder path on my NAS because, as I understand, the filebot container needs /data/ assigned for filebot/data/. Is this correct? otherwise, I will just use /data/ for my paths instead of /data1/. (I hope that makes sense? LOL)
6. Additional Questions:
1. Can FileBot automatically detect whether a video is a movie, 3D/VR movie, adult movie, TV show, or music video based on metadata? If so, what’s the best method to configure this? or can the script help filebot know how to handle the files in the watch folders according to their path and then apply different ways of handling (such as applying different naming formats)?
2. Is there a valid way to set FileBot to use ThePornDB for adult content?
3. How can I ensure logs are persistent in my container setup?
4. What does the amc script support in terms of coding languages such as bash, groovy, regular expressions, etc?
I’d appreciate any help with configuration for this automated setup.
I know this is a lot of requirements but I am struggling to understand what filebot can/can't do and how to automate any of this. Hopefully someone is up for the challenge of helping me through this
