feat(importer): expand ISO contents in RAR/7zip, keep only largest file - #366
Merged
Conversation
…gest file When an ISO inside a RAR or 7zip archive is expanded, only the largest media stream (main feature) is retained; smaller streams (e.g. bonus M2TS tracks) are silently discarded. - Add `ISOExpansionIndex` field to RAR and 7zip `Content` types - Add `expandISOContents` helper to both aggregators; sorts ISO files by size descending, appends only `isoFiles[0]` - Rename kept file to `releaseName.ext` (no index suffix) using the NZB basename - Thread `maxDownloadPrefetch` and `readTimeout` through `Processor` and `ProcessArchive` so the ISO reader has the required Usenet parameters - Introduce `internal/importer/archive/iso` package with ISO analysis Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ray_iso Add `expand_bluray_iso *bool` to `ImportConfig` (defaults to true when nil, preserving existing behaviour). The flag is threaded from config → service → processor → rar/sevenzip ProcessArchive → expandISOContents, where a false value short-circuits the expansion and keeps the original ISO entry unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
yoshitaka420
pushed a commit
to yoshitaka420/altmount
that referenced
this pull request
Jun 1, 2026
…le (kipsilabs#366) * feat(importer): expand ISO contents in RAR/7zip and keep only the largest file When an ISO inside a RAR or 7zip archive is expanded, only the largest media stream (main feature) is retained; smaller streams (e.g. bonus M2TS tracks) are silently discarded. - Add `ISOExpansionIndex` field to RAR and 7zip `Content` types - Add `expandISOContents` helper to both aggregators; sorts ISO files by size descending, appends only `isoFiles[0]` - Rename kept file to `releaseName.ext` (no index suffix) using the NZB basename - Thread `maxDownloadPrefetch` and `readTimeout` through `Processor` and `ProcessArchive` so the ISO reader has the required Usenet parameters - Introduce `internal/importer/archive/iso` package with ISO analysis
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.
Summary
releaseName.ext(no index suffix) using the NZB basename.internal/importer/archive/isopackage with ISO analysis logic.maxDownloadPrefetchandreadTimeoutthroughProcessorand bothProcessArchivefunctions so the ISO reader has the required Usenet segment parameters.Changes
internal/importer/archive/iso/— new package: ISO filesystem traversal and media file analysisinternal/importer/archive/rar/types.go— addISOExpansionIndexfield toContentinternal/importer/archive/rar/aggregator.go— addexpandISOContents, wire intoProcessArchive, rename expanded fileinternal/importer/archive/sevenzip/types.go— sameISOExpansionIndexadditioninternal/importer/archive/sevenzip/aggregator.go— sameexpandISOContents+ wiringinternal/importer/processor.go— store and forwardmaxDownloadPrefetch/readTimeoutTest plan
releaseName.M2TSreleaseName.M2TSexpandISOContentsskips non-ISO entries, behavior unchangedContentkept as-is (non-fatal warn)go build ./internal/importer/archive/...passes with no errors🤖 Generated with Claude Code