Integrate FileBot with qBT and Radarr

Support for Windows users
Post Reply
loracweb
Posts: 9
Joined: 23 Jul 2023, 01:16

Integrate FileBot with qBT and Radarr

Post by loracweb »

I've looked at several forum posts but can't figure this out.

I can rename movies folders in Radarr but since I have multiple versions of many movies it isn't that helpful.

What i'm looking to do is download the movies in QB and then have them hardlinked to a folder based on A-Z after which emby will scan them. I'd prefer to only rename the folder.

In Radarr it looks like this:

Code: Select all

{Movie TitleThe} {(Release Year)} [tmbdid-{TmdbId}] [imdbid-{ImdbId}] {edition-{Edition Tags}} {[Custom Formats]}{[Quality Full]}{[MediaInfo 3D]}{[MediaInfo VideoDynamicRangeType]}{[Mediainfo AudioCodec}{ Mediainfo AudioChannels}][{Mediainfo VideoCodec}][{MediaInfo VideoBitDepth}]{MediaInfo AudioLanguages}{-Release Group}
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help renaming movies

Post by rednoah »

You have 3 questions:

:?: How do I integrate FileBot with qBT and hardlink files? (requires basic command-line skills)

:?: How do I change how files are named and organized? (requires basic command-line skills and basic custom format skills)

:?: How do I make a custom format that matches exactly what I have already configured in Radarr? (requires more custom format skills and lots of testing on a large number of representative sample files)




1.
Here are the qBT integration instructions for the amc script:

:arrow: Setup for qBittorrent on Windows, Linux and macOS

:idea: --action duplicate means that FileBot will hardlink files if possible. You can use --action hardlink to hardlink or fail. Please read the Custom Rename Action manual.




2.
Please read Format Expressions first, and then use the Format Editor in the Desktop application to play with it for a few minutes to make sure you understand the general concepts. The amc script uses the {plex.id} format by default:

Format: Select all

{plex.id}

Code: Select all

TV Shows/Alias {tmdb-2046}/Season 01/Alias - S01E01 - Truth Be Told
Movies/Avatar (2009) {tmdb-19995}/Avatar (2009)

:idea: Please read the {plex.id} format manual if you want to use the {plex} format but add additional information to the file path to guarantee unique file paths for each file:
rednoah wrote: 12 Sep 2016, 10:03 e.g. Avatar (2009) {tmdb-19995}/Avatar (2009) {edition-Extended Edition} [720p, x264, AAC]

Format: Select all

{ ~plex.id % { " {edition-$edition}" } } % { " [$vf, $vc, $ac]" } }

:idea: Replace plex with emby if you're renaming files for emby specifically:
rednoah wrote: 12 Sep 2016, 10:03The {emby} binding and the {plex} binding work exactly the same, with slightly different implementation details, e.g. series name and series folder formatting.

e.g. TV Shows/Alias (2001) {tmdb-2046}/Season 01/Alias (2001) - S01E01 - Truth Be Told

Format: Select all

{ emby.id }

:idea: Please read Change how files will be organized and renamed if you need help integrating your custom format into the amc script:
rednoah wrote: 01 Aug 2012, 13:04 This script uses multiple format expressions, one for each content type. You can override the default naming schemes via the --def movieFormat, seriesFormat, animeFormat and musicFormat options. Relative paths will be resolved against --output and you can use absolute paths if you want to use multiple drives.

Shell: Select all

--def movieFormat="M:/Movies/{ ~plex }" seriesFormat="S:/Series/{ ~plex }" animeFormat="J:/Anime/{ ~plex }" musicFormat="T:/Audio/{ ~plex }" unsortedFormat="U:/Unsorted/{ fn }"
  • Start with the {plex} format and then modify your custom format bit by bit to fit your needs. Make sure to prototype your custom format with the Format Editor and not on the command-line.
  • Use @file syntax to read complex arguments from a text file.



3.
You'll have to write FileBot format code that does exactly the same as what your existing Radarr format code does. I don't know what your Radarr code does, so only you can do that. If you post sample file paths for what you want, one for each corner case, then we can help you along. Sync Filebot and Radarr naming format will get you started. Make sure to use the Format Editor to prototype your custom format.

Screenshot



:!: Please do report back and make sure to share to share your FileBot / Radarr equivalent format pair in the end.
:idea: Please read the FAQ and How to Request Help.
loracweb
Posts: 9
Joined: 23 Jul 2023, 01:16

Re: Integrate FileBot with qBT and Radarr

Post by loracweb »

It doesn't need to match Radarr exactly, somewhat similar is fine as I don't use Radarr that much.

Currently Radar is: {Movie CleanTitle} {(Release Year)} [tmbdid-{TmdbId}] [imdb-{ImdbId}] {edition-{Edition Tags}} {[Custom Formats]} {Quality Full} {MediaInfo Full} {MediaInfo VideoDynamicRangeType}-{Release Group}

Code: Select all

Dressed.to.Kill.1980.2160p.UHD.BluRay.REMUX.DV.HDR.HEVC.DTS-HD.MA.5.1-TRiToN > Dressed to Kill (1980) [tmbdid-11033] [imdb-tt0080661] Remux-2160p h265 DTS-HD MA [EN] DV HDR10-TRiToN
Guardians.of.the.Galaxy.Vol.3.2023.2160p.WEB-DL.DDP5.1.Atmos.HDR.DV.HEVC-CMRG > Guardians of the Galaxy Vol. 3 (2023) [tmbdid-447365] [imdb-tt6791350] WEBDL-2160p h265 EAC3 Atmos [EN+ES+FR] DV HDR10-CMRG
Halloween - The Curse of Michael Myers (1995) Producer's Cut (1080p BluRay x265 HEVC 10bit AAC 5.1 Tigole) > Halloween The Curse of Michael Myers (1995) [tmbdid-10987] [imdb-tt0113253] Bluray-1080p x265 AAC [EN] -Tigole
Justice.League.Warworld.2023.2160p.WEB-DL.DD5.1.DV.H.265-KHALiKOLSHiBAJEBESHi > Justice League Warworld (2023) [tmbdid-1003581] [imdb-tt27687527] WEBDL-2160p h265 AC3 [EN] DV-KHALiKOLSHiBAJEBESHi
Justice.League.Warworld.2023.2160p.WEB-DL.DD5.1.DV.HDR.H.265-KHALiKOLSHiBAJEBESHi > Justice League Warworld (2023) [tmbdid-1003581] [imdb-tt27687527] WEBDL-2160p h265 AC3 [EN] DV HDR10-KHALiKOLSHiBAJEBESHi
Justice.League.Warworld.2023.2160p.WEB-DL.DD5.1.H.265-KHALiKOLSHiBAJEBESHi > Justice League Warworld (2023) [tmbdid-1003581] [imdb-tt27687527] WEBDL-2160p h265 AC3 [EN] -KHALiKOLSHiBAJEBESHi
Some.Like.It.Hot.1959.Criterion.1080p.BluRay.x265.HEVC.FLAC-SARTRE > Some Like It Hot (1959) [tmbdid-239] [imdb-tt0053291] Bluray-1080p x265 FLAC [EN] -SARTRE (folder) > Some Like It Hot (1959) [tmbdid-239] [imdb-tt0053291] [Criterion Collection] Bluray-1080p x265 FLAC [EN] -SARTRE (file)
Spider-Man No Way Home (2021) Extended Cut (1080p MA WEB-DL x265 HEVC 10bit EAC3 5.1 Silence) > Spider-Man No Way Home (2021) [tmbdid-634649] [imdb-tt10872600] {edition-Extended Cut} WEBDL-1080p x265 EAC3 [EN+AR+DA+DE+ES+FI+FR+IT+NL+NB+PT+SV+TH+VI+ZH] -Silence
A Brighter Summer Day (1991) Criterion (1080p BluRay x265 HEVC 10bit AAC 1.0 Chinese Tigole) > A Brighter Summer Day (1991) [tmbdid-15804] [imdb-tt0101985] Bluray-1080p x265 AAC[ZH+EN] [EN] -Tigole > A Brighter Summer Day (1991) [tmbdid-15804] [imdb-tt0101985] [Criterion Collection] Bluray-1080p x265 AAC[ZH+EN] [EN] -Tigole
A Matter of Life and Death (1946) Criterion (1080p BluRay x265 HEVC 10bit AAC 1.0 Tigole) > A Matter of Life and Death (1946) [tmbdid-28162] [imdb-tt0038733] Bluray-1080p x265 AAC [EN] -Tigole > A Matter of Life and Death (1946) [tmbdid-28162] [imdb-tt0038733] [Criterion Collection] Bluray-1080p x265 AAC [EN] -Tigole
A Night to Remember 1958 Criterion Collection 1080p Blu-ray Remux AVC DTS-HD MA 1.0 - KRaLiMaRKo > A Night to Remember (1958) [tmbdid-10971] [imdb-tt0051994] Remux-1080p AVC DTS-HD MA [EN] -KRaLiMaRKo > A Night to Remember (1958) [tmbdid-10971] [imdb-tt0051994] [Criterion Collection] Remux-1080p AVC DTS-HD MA [EN] -KRaLiMaRKo
Radarr doesn't add the edition to the folder name for some reason.

QB downloads to D:\Downloads\qBittorrent\Complete and then i'd like to hardlink them to d:\media\movies\<a-z>
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Integrate FileBot with qBT and Radarr

Post by rednoah »

:arrow: Yes, you can recreate that naming scheme:
https://www.filebot.net/naming.html

Here's a custom format to get you started:

Format: Select all

{ny} [tmdbid-{tmdbid}] [imdb-{imdbid}] {vf} {vc} {ac} {audioLanguages} {hdr}{-group}

Screenshot





:arrow: Yes, you can integrate FileBot into qBT and pass the appropriate command-line options to hardlink files from your input folder to your output folder:
https://www.filebot.net/amc.html

Here's a command-line template to get you started:

Shell: Select all

filebot -script fn:amc --output "D:/Media" --action hardlink --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes --def unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
** The input folder is provided by qBT via --def "ut_dir=%F"
** The example uses the {plex} format as a default but you can of course configure your own custom format
:idea: Please read the FAQ and How to Request Help.
loracweb
Posts: 9
Joined: 23 Jul 2023, 01:16

Re: Integrate FileBot with qBT and Radarr

Post by loracweb »

The format editor is fine for checking code but not useful for building it.

Also the Emby naming scheme is different from how you have it. https://emby.media/support/articles/Movie-Naming.html

I have made progress on a format code though.

Format: Select all

{drive}/Media/!Films/{ny} [tmdbid-{tmdbid}] { "{imdb-${imdbid}}" } { "{edition-${tags[0]}}" } ({vs} {vf} {vc} {vcf} { bitdepth == 10 ? ' [10bit]' : null } {ac} {channels} {audioLanguages} {hdr} {group})/{ny} [tmdbid-{tmdbid}] { "{imdb-${imdbid}}" } { "{edition-${tags[0]}}" } ({vs} {vf} {vc} {vcf} { bitdepth == 10 ? ' [10bit]' : null } {ac} {channels} {audioLanguages} {hdr} {group})
I'm not sure how to get 'Criterion' added as a tag since it isn't in the list.

Is there a guide on how to restrict QB to only process files in the main download folder vs. ones downloaded directly to other folders via labels? I can always run another instance of QB.
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Integrate FileBot with qBT and Radarr

Post by rednoah »

loracweb wrote: 06 Aug 2023, 15:54 The format editor is fine for checking code but not useful for building it.
:?: How so? What would be more useful?

loracweb wrote: 06 Aug 2023, 15:54 Also the Emby naming scheme is different from how you have it. https://emby.media/support/articles/Movie-Naming.html
:?: How so? What's different? As far as I can see, you're not trying to follow {emby} format but rather your own fully custom naming scheme that mimics your radarr naming scheme?
rednoah wrote: 12 Sep 2016, 10:03 e.g. TV Shows/Alias (2001) {tmdb-2046}/Season 01/Alias (2001) - S01E01 - Truth Be Told

Format: Select all

{ emby.id }
EDIT: I found a difference. FileBot r9932 changes the {emby.id} pattern to [tvdbid=371980] to sync with the docs again.



loracweb wrote: 06 Aug 2023, 15:54 I'm not sure how to get 'Criterion' added as a tag since it isn't in the list.
:?: Is 'Criterion' a tag? If so, what does it mean? You can always match arbitrary information from the file path via custom code if necessary:

Format: Select all

{ ' ' + fn.match(/Criterion/) }

Format: Select all

{ fn =~ /Criterion/ ? ' [Criterion Collection]' : null }

loracweb wrote: 06 Aug 2023, 15:54 Is there a guide on how to restrict QB to only process files in the main download folder vs. ones downloaded directly to other folders via labels? I can always run another instance of QB.
:?: qBT? Does qBT process files? If you mean the amc script then there's the --def ignore option that allows you to ignore files that contain some keywords somewhere in the file path, e.g. folder names you want to ignore:

Shell: Select all

--def ignore="Criterion"
:idea: Please read the FAQ and How to Request Help.
loracweb
Posts: 9
Joined: 23 Jul 2023, 01:16

Re: Integrate FileBot with qBT and Radarr

Post by loracweb »

Criterion would be classified as an edition. Typically the edition would be listed between the year and the resolution but how that could be transferred to an edition I'm not sure unless there's a way to update the built in ones.

examples: Across.110th.Street.1972.Imprint.1080p.BluRay.x265.HEVC.FLAC-SARTRE, Carrie.1976.Arrow.1080p.BluRay.x265.hevc.10bit.AAC.5.1.commentary-[HeVK]

I did see a post on how to add a custom edition but I couldn't figure out how to make that work with multiple editions.

I also don't understand what parameters I should be using for ignoring multiple folders.

I do feel after many, many hours I've made progress though...
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Integrate FileBot with qBT and Radarr

Post by rednoah »

:idea: FileBot can certainly generate arbitrary file paths, but I'm fairly sure that Plex, Emby and friends don't allow for multiple edition markers... you can try though:

Format: Select all

{ fn =~ /Criterion/ ? ' {edition-Criterion}' : null }
{ fn =~ /Imprint/ ? ' {edition-Imprint}' : null }
{ fn =~ /Arrow/ ? ' {edition-Arrow}' : null }
{ " {edition-${tags[0]}}" }
** You may need to refine the code if you have movies / episodes with "Arrow" in the file name. That's a false positive waiting to happen, since fn =~ /Arrow/ just means "character sequence Arrow anywhere in the file name" which can hold true for different reasons.


:idea: Your --def ignore parameter value is a regular expression so a single regex pattern can check for an arbitrary number of text patterns in the input file path:

Shell: Select all

--def ignore="Criterion|Imprint|Arrow"
** The option above will ignore all files with Criterion or Imprint or Arrow anywhere in the file path.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Integrate FileBot with qBT and Radarr

Post by rednoah »

:idea: Please read the FAQ and How to Request Help.
Post Reply