Commit Graph
59 Commits
Author SHA1 Message Date
BinaryAlley 8ff5149b6e Serializes media library scans through a scan queue
Replaces the job queue with a scan queue that executes one media library scan at a time, in the order in which the scans were queued, so several libraries requested at once no longer run one complete job chain each on the thread pool shared with the web server.

Keeps queued scans Pending and cancellable, reports them as queued, and cancels the executing scan and the queued ones when the user cancels all scans. A media library type without a scanner now fails its own scan instead of leaving it stuck Pending, without stopping the scans queued behind it.

Makes the file system discovery job the only top level job of a scan graph, so awaiting it completes the whole scan, and leaves one logical processor free for the rest of the process while discovery and hashing read files in parallel.

Removes the per job Task.Run wrappers, links the scan cancellation with the host shutdown token in the scan processor, updates the ADR amendments, API documentation, manual, web client and tests, and normalizes the comments of the touched files.
2026-10-31 14:42:33 +02:00
BinaryAlley 6ef9592f00 Fixes large library scans hitting the SQLite parameter limit
Bounds path lookups and enrichment resets to 20,000 parameters per query, restores failed scans from their staged metadata, and clears staged data only after the materialized items are saved.
2026-10-29 20:23:24 +02:00
BinaryAlley aba803b106 Adds music stack test coverage and fixes playlist cache and stream error handling 2026-10-29 15:46:24 +02:00
BinaryAlley a75447062f Implements tests for commit 067e9a21d0 2026-10-28 23:14:47 +02:00
BinaryAlley aeefa9487e Implements tests for commit 45f9aa3bd5 2026-10-28 22:34:32 +02:00
BinaryAlley 8b8d077c6a Implements tests for commit 1aa427b1e2 2026-10-28 13:39:12 +02:00
BinaryAlley 5c436fc13d Implements tests for commit b2d274f609 2026-10-27 17:32:37 +02:00
BinaryAlley b2d274f609 Adds per-library consumption settings to the domain, storage, and API 2026-10-24 10:20:00 +03:00
BinaryAlley 7dc5953e1d Adds the playback delivery decision service 2026-10-15 09:19:36 +03:00
BinaryAlley 1aa427b1e2 Removes track path editing from the music track update flow
Stops Track.UpdateDetails and Artist.UpdateTrackInAlbum from assigning a path, so a track path can be set only when the track is created. Removes Path from UpdateTrackRequest, UpdateTrackCommand, UpdateTrackCommandValidator and UpdateMusicTrackRequest, and removes the path containment check and IPathService dependency from UpdateTrackCommandHandler. The path stays visible in TrackResponse, MusicTrackDto and the read-only field of the track page. Updates the endpoint summary, request and API docs, and the affected tests.
2026-10-13 20:14:12 +03:00
BinaryAlley 4ceb8f7360 Adds cover update endpoints for music artists and albums. 2026-10-13 13:26:41 +03:00
BinaryAlley 4f43bf352b Cleans up the artwork and the stored media of deleted music library items and libraries. 2026-10-13 13:26:26 +03:00
BinaryAlley 9d82f283e4 Extends the music library listings with covers, sorting and alpha filtering. 2026-10-13 13:26:14 +03:00
BinaryAlley a514335a10 Aligns the test fixture field names with their types and tidies the remaining tests 2026-10-10 14:24:00 +03:00
BinaryAlley 1fad9316ce Adds the music library commands and their validators 2026-10-09 07:34:00 +03:00
BinaryAlley b7db29eee5 Adds the media library item deletion strategies and their domain event handler integration 2026-10-09 01:23:00 +03:00
BinaryAlley 7ed6f05632 Adds the test suites for the library path templates and centralizes their resolution in the domain service 2026-10-05 20:15:00 +03:00
BinaryAlley ca4f308b0a Adds dynamic path templates for media libraries, so that the scanner can derive the meaning of each path part 2026-10-05 18:42:00 +03:00
BinaryAlley 3aadd6de84 Refactors the test fixtures and their consumers to compose other fixtures instead of instantiating models inline 2026-10-02 14:37:23 +03:00
BinaryAlley 385e962392 Tidies the remaining test assertions and shared fixtures 2026-09-27 23:05:11 +03:00
BinaryAlley 4d96fe10dd Removes the umbrella include flag from the fixtures and their consumers 2026-09-27 23:05:06 +03:00
BinaryAlley e73b3997bc Adds the music library artist test suite 2026-09-27 23:04:50 +03:00
BinaryAlley 5d3e430dd1 Adds the music library album test suite 2026-09-27 23:04:41 +03:00
BinaryAlley 12d310631b Adds the music library track test suite 2026-09-26 17:57:40 +03:00
BinaryAlley 64ef3a1e22 Returns the unit of work save changes result 2026-09-26 12:59:17 +03:00
BinaryAlley ea6eb9f796 Refactors the book, artist, and album slices across the stack 2026-09-17 13:30:48 -07:00
BinaryAlley 8aaf9fe64e Refactors the get book slice 2026-09-13 06:58:32 -07:00
BinaryAlley 1d35cd01db Refactors the get books and get books lite slices across the stack 2026-09-13 04:16:59 -07:00
BinaryAlley 001146eefc Refactors the update book slice across the stack 2026-09-12 12:13:18 -07:00
BinaryAlley 9a71a6d32b Refactors the add book slice and shared media contributor model across the stack 2026-09-12 12:12:22 -07:00
BinaryAlley 3a720af29f Adds domain Music aggregate 2026-09-07 09:41:57 -07:00
BinaryAlley 145185d715 Adds book editing tests and parameterizes the shared test fixtures 2026-09-06 09:37:55 -07:00
BinaryAlley 99a6159f7f Adds the scheduling module tests and centralizes domain event test fixtures 2026-09-04 00:16:41 -07:00
BinaryAlley 3a3c0c047c Adds tests for the book reading feature 2026-09-02 04:45:51 -07:00
BinaryAlley 565fe68239 Adds independent metadata and artwork enrichment
Splits the single combined enrichment phase of the media library scan into
independent, modular jobs, so that the metadata and the artwork of a book
are enriched separately and only when their respective triggers fire.

- Adds the MediaContributorRoleCategory enum (Other first, then Author,
  Translator, Illustrator, Publisher and Narrator) and makes the role
  category canonical, so that roles describing the same kind of
  contribution are never treated as distinct.
- Realizes the media contributor bounded context: a MediaContributor is a
  person, unique by display name, without a role. The role moves to the
  per-work participation (BookContributors), so that a single contributor
  can play multiple roles. Contributors are created and linked by the
  metadata enrichment job, and exposed to subsequent jobs.
- Makes the Book aggregate pure: the enrichment tracking state (metadata
  status, providers, timestamps and covers) no longer lives on the domain
  aggregate, but stays in the Books table, managed directly by the jobs.
- Models artwork generically as a BookArtwork child table (type, ordinal,
  content hash, status and provider), so that each piece of artwork is
  tracked independently and a change of one does not require the others to
  be re-fetched.
- Splits the scan DAG into ResultsSave, ProviderConfigurationInvalidation,
  MetadataEnrichment and ArtworkEnrichment jobs. The invalidation job
  fingerprints the provider configuration of a library and resets the
  enrichment state of the affected channel when it changed. The artwork job
  resolves the missing artwork, hashing it to detect identical covers and
  skip re-copying. Content-changed books are reset by the results save job.
- Deletes the book and its stored artwork when the file disappears from the
  library.
- Adds the migration creating the new tables, backfilling the existing
  covers into the artwork table, and adding the configuration fingerprints.
- Localizes the new scan job stages, and fixes the invalidation job wiping
  the library content locations by persisting the fingerprints through the
  change tracker instead of the repository update action.
2026-08-27 14:41:49 +03:00
BinaryAlley ccefb65c83 Fixes library cover image handling on save
Validates the cover image only when a new one is chosen, so an unchanged
stored cover does not block saving unrelated changes, and keeps the cover
already copied to the internal media directory instead of re-copying the
stored relative path, which was treated as an absolute file system path.
2026-08-26 19:15:49 +03:00
BinaryAlley 00dcf3d471 Adds metadata and artwork provider configuration seeding
Seeds a disabled provider configuration for every loaded plugin supporting
a library type, so that libraries list the metadata and artwork providers
they can use. Configurations are seeded on startup, on library creation,
and reconciled when the library type changes, and are removed only when a
library or a plugin is deleted. Reads the library metadata providers
through the new provider configuration store.
2026-08-26 19:14:35 +03:00
BinaryAlley f42dc709de Standardizes test conventions and documentation 2026-08-24 14:20:08 -07:00
BinaryAlley 1189bbaf36 Hardens test assertions and adds missing test coverage. 2026-08-18 08:28:16 -07:00
BinaryAlley 6fa154a2e7 Adds alpha picker filtering to the books lite query 2026-08-16 10:34:08 -07:00
BinaryAlley a7dfcbe926 Adds library ownership authorization policy 2026-08-16 04:59:06 -07:00
BinaryAlley ce4ebf36bc Adds pagination and filtering to the API 2026-08-16 03:10:47 -07:00
BinaryAlley f393b93ce7 Adds commands and queries validators unit tests 2026-08-15 06:35:07 -07:00
BinaryAlley 59e16d645a Inlines fixtures instantiation. 2026-08-15 03:19:51 -07:00
BinaryAlley b648e2f054 Centralizes and standardizes test fixtures. 2026-08-15 02:58:17 -07:00
BinaryAlley fee14afb89 Replaces reflection-based repository instantiation with unit of work property accessors 2026-08-14 09:03:30 -07:00
BinaryAlley 3b772d68ca Replaces ErrorOr library with a custom implementation. 2026-08-14 03:04:28 -07:00
BinaryAlley ac318762bf Renames test methods to match SUT method names. 2026-08-13 08:56:42 -07:00
BinaryAlley 2d1c6b1ab8 Replaces FluentValidation and Mediator command/queries handling with custom implementations. 2026-08-13 08:53:06 -07:00
BinaryAlley 5fb920caeb Fixes the failing hidden elements integration tests and the book creation handler test 2026-08-12 15:09:00 -07:00