mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-02 22:57:34 -05:00
Ignore some files when renaming or deleting due to an upgrade #9175
Labels
No labels
Area: API
Area: Database
Area: Db-migration
Area: Download Clients
Area: Extras
Area: Import Lists
Area: Indexer
Area: Metadata API
Area: Notifications
Area: Organizer
Area: Parser
Area: Scanning
Area: Tooling
Area: UI
Area: Unit Tests
On Hold: MetadataAPI Blocking
On Hold: MetadataAPI Blocking
Priority: High
Priority: Low
Priority: Medium
Status: Accepted
Status: Cannot Reproduce
Status: Confirmed
Status: Help Wanted
Status: In Progress
Status: Indexer - need invite
Status: Info Needed
Status: Investigating
Status: Logs Needed
Status: Maybe One Day
Status: Needs Triage
Status: On Hold
Status: Ready for Review
Status: Unlikely
Status: Waiting for OP
Status: Won't Fix
Type: Bug
Type: Documentation
Type: Duplicate
Type: Enhancement
Type: External Bug
Type: Feature Request
Type: Regression
Type: Support
Type: Support.
conflict
lidarr-pull
no-conflict
not-pulled
readarr-pull
readarr-pull
sonarr upstream
sonarr-pull
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Radarr#9175
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @randellhodges on GitHub (May 17, 2025).
Is there an existing issue for this?
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
@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.
@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.
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.
@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.
@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 testingnew Regex(@"^(?<type>theme)\.mp3")withXbmcMetadataseems to produce the expected behavior of ignoringtheme.mp3on renaming.