fix: naming tokens, multi-season search, and NAS CPU spike - #435
Merged
Conversation
- show all TMDB collection parts (not just library siblings), with missing entries dimmed and grayed out - add Add Collection CTA that bulk-adds missing parts, inheriting rootFolderId and scoringProfileId from the current movie - add per-movie hover overlay with + (add) (add individually) and i (info) (Discover page) buttons - add POST /api/library/collections/[tmdbId]/track endpoint that fetches collection from TMDB, skips existing library entries, and bulk-inserts missing movies using the standard add pipeline - add contextual header buttons: search (missing-file tracked movies) and subtitle auto-download, each hidden when there is nothing to act on
…rch state - show a primary "Search in Discover" button when no movies/tv match a library search, which links to ` /discover?type=movie` or `/discover?type=tv` depending on where the search is intiated - Both links carry the current search query via ?q= so Discover loads results without the user having to retype search query
- replace filteredOutResults.length === 0 guard in debug $effect with a debugResultsLoaded flag - set debugResultsLoaded = true in the finally block after each load
- add clearAllFiles() to logHistoryService - add DELETE handler to /api/settings/logs/history
…ng manual import - resolveTvEpisodeMapping now returns episodeNumbers[] instead of a single episodeNumber - buildEpisodeNamingInfo receives the full episode array so NamingService generates the correct multi-episode filename (e.g. S01E02-E03 instead of S01E02) - add parsedEpisodes?: number[] to ManualImportDetectionData and DetectionGroup - populate from resolveTvEpisodeIdentifier when episodeNumbers.length > 1 - replace editable episode input with a read-only E1-E2 (auto) display for multi-episode files
…lder scan - add a global ffprobe concurrency semaphore (default 1, configurable via FFPROBE_CONCURRENCY env var) to prevent D-state ffprobe processes accumulating on NAS mounts where SIGKILL has no effect - change processUnmatchedByRootFolder per-file yield from setImmediate to 250ms delay, matching processAllUnmatched, to prevent back-to-back NAS I/O saturation during the match phase
- change Phase 1 complete-series filter from ?? to || so the seasons-length fallback actually runs; ?? never falls through because isCompleteSeries is always a boolean (never undefined) - remove season: startSeason from Phase 2 search criteria; passing a season caused filterBySeasonEpisode to strip multi-season packs before Phase 2's own range filter could see them - add parser tests confirming S01-S07, S01-07, and bracketed [S01-S07] in localized titles are correctly detected as complete-series packs
- fix series folder naming on add: generateSeriesFolderName wrapper in series POST handler was omitting tmdbId, imdbId, and originalTitle - fix RenamePreviewService: movie and series folder name calls missing originalTitle, collectionName (movie), and imdbId (series) - fix SmartListService: movie add/auto-add called generateMovieFolderName before fetchMovieExternalIds; reordered and added all missing fields to both movie and series add/auto-add paths - fix manual-import-service: movie and series new-folder paths missing originalTitle, imdbId, collectionName - fix LibraryDestinationPlanner: widen MoviePlanInput and EpisodePlanInput to accept originalTitle, collectionName, imdbId; pass all fields through to MediaNamingInfo in planMovie and planEpisode - fix ReadyProviderFileMapper: widen MovieContext and SeriesContext to accept originalTitle, collectionName (movie), tmdbId, imdbId (series) - fix DebridPollService: mediaContext now passes originalTitle, collectionName (movie) and originalTitle, tmdbId, imdbId (series) into the context objects consumed by ReadyProviderFileMapper - fix StrmService: widen SeriesData interface and buildMovieStrmPath / buildEpisodeStrmPath inputs to include originalTitle, collectionName, imdbId; propagate fields through all DB-to-SeriesData assignments and createStrmFileDirect's inline show object
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
MediaNamingInfocall sites so tokens like{TmdbId},{OriginalTitle},{ImdbId}, and{CollectionName}are populated at every folder/file naming point without requiring a manual renameS01-S07/S01-07notation from BitmagnetffprobeprocessesRelated Issues
N/A
Type of Change
Changes Made
Naming token coverage (
fix: populate all MediaNamingInfo tokens at every naming call site)+server.ts(series POST):generateSeriesFolderNamewrapper was omittingtmdbId,imdbId, andoriginalTitle- the root cause of{TmdbId}not applying on series addRenamePreviewService: movie/series folder name calls missingoriginalTitle,collectionName, andimdbIdSmartListService: movie add/auto-add calledgenerateMovieFolderNamebeforefetchMovieExternalIds; reordered fetch and added all missing fields to movie and series add/auto-add pathsmanual-import-service: movie and series new-folder paths missingoriginalTitle,imdbId,collectionNameLibraryDestinationPlanner: widenedMoviePlanInputandEpisodePlanInputto accept and pass throughoriginalTitle,collectionName,imdbIdReadyProviderFileMapper: widenedMovieContextandSeriesContextto accept the same fieldsDebridPollService:mediaContextnow passesoriginalTitle,collectionName(movie) andoriginalTitle,tmdbId,imdbId(series) into context objectsStrmService: widenedSeriesDatainterface and bothbuildMovieStrmPath/buildEpisodeStrmPathinputs; propagated fields through all DB-to-SeriesDataassignmentsMulti-season search (
fix(search): fix multi-season pack search missing S01-S07 style releases)MultiSeasonSearchStrategyPhase 1: changed??to||in complete-series filter -??never fell through becauseisCompleteSeriesis always a boolean, making theseasons.lengthfallback dead codeMultiSeasonSearchStrategyPhase 2: removedseason: startSeasonfrom search criteria - it causedfilterBySeasonEpisodeto strip multi-season packs before Phase 2's own range check could see themS01-S07,S01-07, and bracketed[S01-S07]formats are all correctly detected as complete-series packsNAS CPU lockout (
fix(scan): prevent CPU lockout on NAS-backed Docker volumes during folder scan)ffprobe.ts: added a global concurrency semaphore (default 1, configurable viaFFPROBE_CONCURRENCYenv var) to prevent D-stateffprobeprocesses accumulating on NAS mounts whereSIGKILLhas no effectmedia-matcher.ts: changed per-file yield inprocessUnmatchedByRootFolderfromsetImmediateto a 250ms delay to prevent back-to-back NAS I/O saturation during the match phaseAreas Affected
Testing
npm run test)npm run check)Checklist
npm run formatfeat:,fix:, etc.)$state,$derived,$effect,$props)Screenshots
N/A