Ignore some files when renaming or deleting due to an upgrade #9175

Closed
opened 2026-02-20 00:11:09 -05:00 by deekerman · 4 comments
Owner

Originally created by @randellhodges on GitHub (May 17, 2025).

Is there an existing issue for this?

  • I have searched the existing open and closed issues

I use Emby and the plugins that download theme songs. That plugin creates a file in the root of the movie folder named theme.mp3 (or various other audio extensions).

When a movie is renamed or I think even scanned in, these are getting renamed to moviename.ext. It also downloads theme videos into a subfolder called backdrops. I'd like to make sure that is also ignored (I haven't confirmed if it messes with those yet).

Describe the solution you'd like

I would like an option enter a pattern to ignore when renaming or upgrading (I don't want Radarr to delete these either).

Maybe a multi line input field that lets you enter a globbing patterns like gitignore or just regexs or something similar that is applied on rename/upgrade?

This is sort of related to:
https://github.com/Radarr/Radarr/issues/10473

The gitignore globbing might be complicated. It might just be easier to allow multiple regexs. For each file that wants to delete or rename, it calls each of the regexs with the relative path and if any of them match, it ignores it.

Describe alternatives you've considered

I am attempting to rename them back using a custom connect script.

Anything else?

n/a

Originally created by @randellhodges on GitHub (May 17, 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 use Emby and the plugins that download theme songs. That plugin creates a file in the root of the movie folder named theme.mp3 (or various other audio extensions). When a movie is renamed or I think even scanned in, these are getting renamed to moviename.ext. It also downloads theme videos into a subfolder called backdrops. I'd like to make sure that is also ignored (I haven't confirmed if it messes with those yet). ### Describe the solution you'd like I would like an option enter a pattern to ignore when renaming or upgrading (I don't want Radarr to delete these either). Maybe a multi line input field that lets you enter a globbing patterns like gitignore or just regexs or something similar that is applied on rename/upgrade? This is sort of related to: https://github.com/Radarr/Radarr/issues/10473 The gitignore globbing might be complicated. It might just be easier to allow multiple regexs. For each file that wants to delete or rename, it calls each of the regexs with the relative path and if any of them match, it ignores it. ### Describe alternatives you've considered I am attempting to rename them back using a custom connect script. ### Anything else? n/a
Author
Owner

@randellhodges commented on GitHub (May 17, 2025):

That was probably the fastest close with no feedback I have ever seen.

I would consider adding the functionality and submit a PR but I have a feeling it would not be welcomed.

@randellhodges commented on GitHub (May 17, 2025): That was probably the fastest close with no feedback I have ever seen. I would consider adding the functionality and submit a PR but I have a feeling it would not be welcomed.
Author
Owner

@mynameisbogdan commented on GitHub (May 18, 2025):

It's a duplicate of #4650, which is expected to delete files on upgrades.

I need to check which metadata provider handles mp3 files in this case, but it's indeed the norm to be renamed to moviename.ext.

I would consider adding the functionality and submit a PR but I have a feeling it would not be welcomed.

As you please. There's already #10836 where I brought up some possible issues in the future, and also it could not be ported to Sonarr or others too since they handle episodes, tracks, books as sub-entities of series/artist/author.

@mynameisbogdan commented on GitHub (May 18, 2025): It's a duplicate of #4650, which is expected to delete files on upgrades. I need to check which metadata provider handles mp3 files in this case, but it's indeed the norm to be renamed to moviename.ext. > I would consider adding the functionality and submit a PR but I have a feeling it would not be welcomed. As you please. There's already #10836 where I brought up some possible issues in the future, and also it could not be ported to Sonarr or others too since they handle episodes, tracks, books as sub-entities of series/artist/author.
Author
Owner

@randellhodges commented on GitHub (May 18, 2025):

Thank you for pointing out that issue and that other PR. I failed spectacularly when I did my search before posting this.

@randellhodges commented on GitHub (May 18, 2025): Thank you for pointing out that issue and that other PR. I failed spectacularly when I did my search before posting this.
Author
Owner

@mynameisbogdan commented on GitHub (May 18, 2025):

Seems to be handled by the OtherExtraService, which seems to be intentional in github.com/Radarr/Radarr@83632f91e6/src/NzbDrone.Core/Extras/Files/ExtraFileManager.cs (L98-L109)

Removal on upgrade falls as a duplicate of #4650 and renaming a duplicate of #5472.

Looking at movie renaming and theme.mp3, this might require a new MetadataType but this would mean only handling new files without generating new files which is the purpose of "metadata consumers". But testing new Regex(@"^(?<type>theme)\.mp3") with XbmcMetadata seems to produce the expected behavior of ignoring theme.mp3 on renaming.

@mynameisbogdan commented on GitHub (May 18, 2025): Seems to be handled by the OtherExtraService, which seems to be intentional in https://github.com/Radarr/Radarr/blob/83632f91e636735894f513015efb955f7c893809/src/NzbDrone.Core/Extras/Files/ExtraFileManager.cs#L98-L109 Removal on upgrade falls as a duplicate of #4650 and renaming a duplicate of #5472. Looking at movie renaming and `theme.mp3`, this might require a new MetadataType but this would mean only handling new files without generating new files which is the purpose of "metadata consumers". But testing `new Regex(@"^(?<type>theme)\.mp3")` with `XbmcMetadata` seems to produce the expected behavior of ignoring `theme.mp3` on renaming.
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#9175
No description provided.