Conditional if / else support in Movie / Folder Naming #9246

Closed
opened 2026-02-20 00:12:01 -05:00 by deekerman · 2 comments
Owner

Originally created by @ravioldev on GitHub (Aug 3, 2025).

Is there an existing issue for this?

  • I have searched the existing open and closed issues

I need different naming patterns depending on whether a movie belongs to a collection.
Today Radarr can only hide an entire block when all tokens inside it are empty. That means:

  • I can’t put {Release Year} in one position only when {Movie Collection} exists and in another position when it doesn’t.
  • Work-arounds duplicate the year or leave stray characters in movie folders.

Describe the solution you'd like

Add simple conditionals to the naming engine, e.g.:

{{#if Movie Collection}}
{Movie Collection} ({Release Year}) - {Movie Title}
{{else}}
{Movie Title} ({Release Year})
{{/if}}

  • Handlebars-style syntax (or any similar syntax already used internally).
  • Support #unless and shallow nesting.
  • Fully documented in Settings → Media Management → Movie Naming.

Describe alternatives you've considered

  • Duplicating {Release Year} to get acceptable output — messy.
  • Renaming afterwards with FileBot + API rescan — extra complexity and API calls.
  • Accepting collection sub-folders — changes library layout.

Anything else?

  • Conditionally re-ordering tokens would benefit other edge cases (e.g. edition tags, release group, language variants).
  • Existing templates should remain 100 % backward-compatible if they don’t use the new syntax.
Originally created by @ravioldev on GitHub (Aug 3, 2025). ### Is there an existing issue for this? - [x] I have searched the existing open and closed issues ### Is your feature request related to a problem? Please describe I need different naming patterns depending on whether a movie belongs to a collection. Today Radarr can only hide an entire block when all tokens inside it are empty. That means: - I can’t put {Release Year} in one position only when {Movie Collection} exists and in another position when it doesn’t. - Work-arounds duplicate the year or leave stray characters in movie folders. ### Describe the solution you'd like Add simple conditionals to the naming engine, e.g.: {{#if Movie Collection}} {Movie Collection} ({Release Year}) - {Movie Title} {{else}} {Movie Title} ({Release Year}) {{/if}} - Handlebars-style syntax (or any similar syntax already used internally). - Support #unless and shallow nesting. - Fully documented in Settings → Media Management → Movie Naming. ### Describe alternatives you've considered - Duplicating {Release Year} to get acceptable output — messy. - Renaming afterwards with FileBot + API rescan — extra complexity and API calls. - Accepting collection sub-folders — changes library layout. ### Anything else? - Conditionally re-ordering tokens would benefit other edge cases (e.g. edition tags, release group, language variants). - Existing templates should remain 100 % backward-compatible if they don’t use the new syntax.
Author
Owner

@bakerboy448 commented on GitHub (Aug 3, 2025):

  • Release year is a property of the movie not the collection.
  • is not a valid naming format. Movies shall be in the format of Name.Year
@bakerboy448 commented on GitHub (Aug 3, 2025): - Release year is a property of the movie not the collection. - <release year> <movie title> is not a valid naming format. Movies shall be in the format of Name.Year
Author
Owner

@ravioldev commented on GitHub (Aug 3, 2025):

  • Release year is a property of the movie not the collection.
  • is not a valid naming format. Movies shall be in the format of Name.Year

I may have not explained well, but I know it is part of the movie not the collection, however I would like to put it after the collection name and before the movie name, except for those movies that are not part of a collection.

Anyway, the request is not about that, but about having conditional renaming rules. Why not to implement that? If anything, then any other thing.

And also why cannot have multiple {{ }} to hide things? In example why something like this cannot be done? "{{Movie Collection} ({Release Year}) - }{Movie Title}" in order to hide everything before Movie Tittle if the "Movie Collection" doesn't exist?

@ravioldev commented on GitHub (Aug 3, 2025): > * Release year is a property of the movie not the collection. > * is not a valid naming format. Movies shall be in the format of Name.Year I may have not explained well, but I know it is part of the movie not the collection, however I would like to put it after the collection name and before the movie name, except for those movies that are not part of a collection. Anyway, the request is not about that, but about having conditional renaming rules. Why not to implement that? If anything, then any other thing. And also why cannot have multiple {{ }} to hide things? In example why something like this cannot be done? "{{Movie Collection} ({Release Year}) - }{Movie Title}" in order to hide everything before Movie Tittle if the "Movie Collection" doesn't exist?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Radarr#9246
No description provided.