fix(importer): correctly strip .nzb and .nzb.gz extensions from release names#524
Merged
javi11 merged 6 commits intojavi11:mainfrom Apr 22, 2026
Merged
Conversation
…se names Introduced nzbtrim utility to handle case-insensitive removal of both .nzb and .nzb.gz extensions, preventing redundant .nzb suffixes in symlink folders and filenames.
|
altmount supports password-protected 7zip, right? I would think so but thought I'd confirm because was getting a few import error saying unable to open password-protected 7zip, but I think it's the articles themselves that are the issue. |
javi11
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue where the
.nzbextension was being included in virtual directory names and symlink filenames (e.g.,Movie.nzb/Movie.nzb.mkv).Root Cause
The issue was introduced in commit
23bfde95when transparent NZB compression (.nzb.gz) was added to persistent storage. The existing codebase relied onfilepath.Ext()to strip extensions. However,filepath.Ext()only identifies the final extension (.gz), leaving the.nzbpart intact.Changes
internal/importer/utils/nzbtrim.TrimNzbExtensionto handle case-insensitive removal of both.nzband.nzb.gz.filepath.Extandstrings.TrimSuffix(..., ".nzb")in the import and API logic to use this new utility.Impacted Areas
internal/importer/filesystem/utils.go.nzb_stremio_handlers.go) now generates clean stream names.service.go.Verification
file.nzb.gzandfile.NZBboth resolve tofile.