4434 Commits

Author SHA1 Message Date
deluan
de773b9bcd test(scan): suppress unused return value from SetUserLibraries in tests 2025-11-13 12:04:45 -05:00
deluan
f1f4615966 refactor(scan): move ParseTargets function to model package 2025-11-13 11:55:41 -05:00
deluan
a2d48e5138 feat(scan): update scanning parameters from 'path' to 'target' for selective scans. 2025-11-13 11:54:10 -05:00
Deluan
6ea249608c feat(ui): add Scan buttonsto the LibraryList
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-13 10:19:57 -05:00
Deluan
8cebf82590 feat(ui): add quick and full scan options for individual libraries
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:21:01 -05:00
Deluan
acae163b0f feat(ui): add selective scan options and update translations
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
62a8d85772 test(scanner): refactor tests
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
e898deaa9f fix(library): update PRAGMA optimize to check table sizes without ANALYZE
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
d8dfbc0732 test(scanner): add tests for ScanBegin and ScanEnd functionality
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
5eb867b639 refactor(scanner): replace parseTargets function with direct call to scanner.ParseTargets
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan Quintão
d30f6cfc92 Update scanner/phase_1_folders.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 16:19:18 -05:00
Deluan
2998cd3f7c fix(scanner, watcher): handle errors when pushing ignore patterns for folders
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
e222d8d8db refactor(scanner): enhance walkDirTree to support target folder scanning
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
08bccad020 docs(scanner): comments
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
587249bf81 feat(watcher): enhance .ndignore handling for folder deletions and file changes
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
7ed817c1c0 feat(configuration): add DevSelectiveWatcher configuration option
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
71acd02d1b refactor(tests): rename selective scan test file to scanner_selective_test.go
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
78904257df refactor(scanner): move initialization logic from phase_1 to the scanner itself
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
b9f368ad0d refactor(scanner): streamline phase folder and album creation by removing unnecessary library parameter
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
fadaaf3ad1 refactor(scanner): simplify selective scan logic using slice.Filter
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
4386c3a876 test(folder_repository): add comprehensive tests for folder retrieval and child exclusion
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
eeb73d24f0 refactor(folder_repository): normalize target path handling by using filepath.Clean
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
bfa31a246f refactor(scanner): update scanner interface and implementations to use model.Scanner
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
ed781e8da0 refactor: move scanner types to model,implement MockScanner
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
54f19c598a refactor(scanner): move scanner.ScanTarget to model.ScanTarget
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
63c3a95814 test: enhance mockScanner for thread safety and improve test reliability
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
dec658c235 refactor(scanner): streamline scanning logic by removing scanAll method
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
7e396fd6ce refactor(scanner): update CallScan to handle specific library/folder pairs
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
265a6973bc feat(subsonic): allow selective scan in the /startScan endpoint
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
847cc92e88 feat(scanner): update folder scanning to include all descendants of specified folders
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
33704edc1c refactor(scanner): simplify GC method by removing library ID parameter
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
01f68f4a75 fix(scanner): validate library ID to prevent negative values
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
f64b51f161 refactor(scanner): enhance ScanTarget struct with String method for better target representation
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
b06d90a4db refactor(ignore_checker): rename scanner to lineScanner for clarity
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
0b06ecb034 refactor(scanner): implement IgnoreChecker for managing .ndignore patterns
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
3cbbb440c2 feat(watcher): implement path ignoring based on .ndignore patterns
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
b361837f50 refactor(watcher): add resolveFolderPath function for testability
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
1bd58a14ab feat(watcher): implement folder scanning notifications with deduplication
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
712bf2815e refactor(scanner): simplify scanner methods
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
1250647dc3 refactor(folder): enhance external scanner to support target-specific scanning
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
305148e124 refactor(folder): remove unused LibraryPath struct and update GC logging message
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
36a7040df3 test: update parseTargets test to handle folder names with spaces
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
f1dbd88024 feat(folder): replace GetByPaths with GetFolderUpdateInfo for improved folder updates retrieval
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:19:18 -05:00
Deluan
8f1a6116fe feat: Add selective folder scanning capability
Implement targeted scanning of specific library/folder pairs without
full recursion. This enables efficient rescanning of individual folders
when changes are detected, significantly reducing scan time for large
libraries.

Key changes:
- Add ScanTarget struct and ScanFolders API to Scanner interface
- Implement CLI flag --targets for specifying libraryID:folderPath pairs
- Add FolderRepository.GetByPaths() for batch folder info retrieval
- Create loadSpecificFolders() for non-recursive directory loading
- Scope GC operations to affected libraries only (with TODO for full impl)
- Add comprehensive tests for selective scanning behavior

The selective scan:
- Only processes specified folders (no subdirectory recursion)
- Maintains library isolation
- Runs full maintenance pipeline scoped to affected libraries
- Supports both full and quick scan modes

Examples:
  navidrome scan --targets "1:Music/Rock,1:Music/Jazz"
  navidrome scan --full --targets "2:Classical"
2025-11-12 16:19:18 -05:00
Deluan
f939ad84f3 fix(ui): increase contrast of button text in the Dark theme
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 16:17:41 -05:00
Deluan
c3e8c67116 feat(ui): update totalSize formatting to display two decimal places
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 13:23:18 -05:00
Deluan
d57a8e6d84 refactor(scanner): refactor legacyReleaseDate logic and add tests for date mapping
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 13:11:33 -05:00
Deluan
73ec89e1af feat(ui): add SizeField to display total size in LibraryList
Signed-off-by: Deluan <deluan@navidrome.org>
2025-11-12 13:01:17 -05:00
Rob Emery
131c0c565c
feat(insights): detecting packaging method (#3841)
* Adding environmental variable so that navidrome can detect
if its running as an MSI install for insights

* Renaming to be ND_PACKAGE_TYPE so we can reuse this for the
.deb/.rpm stats as well

* Packaged implies a bool, this is a description so it should
be packaging or just package imo

* wixl currently doesn't support <Environment> so I'm swapping out
to a file next-door to the configuration file, we should be
able to reuse this for deb/rpm as well

* Using a file we should be able to add support for linux like this
also

* MSI should copy the package into place for us, it's not a KeyPath
as older versions won't have it, so it's presence doesn't indicate
the installed status of the package

* OK this doesn't exist, need to find another way to do it

* package to .package and moving to the datadir

* fix(scanner): better log message when AutoImportPlaylists is disabled

Fix #3861

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(scanner): support ID3v2 embedded images in WAV files

Fix #3867

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): show bitDepth in song info dialog

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(server): don't break if the ND_CONFIGFILE does not exist

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(docker): automatically loads a navidrome.toml file from /data, if available

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(server): custom ArtistJoiner config (#3873)

* feat(server): custom ArtistJoiner config

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(ui): organize ArtistLinkField, add tests

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): use display artist

* feat(ui): use display artist

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>

* chore: remove some BFR-related TODOs that are not valid anymore

Signed-off-by: Deluan <deluan@navidrome.org>

* chore: remove more outdated TODOs

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(scanner): elapsed time for folder processing is wrong in the logs

Signed-off-by: Deluan <deluan@navidrome.org>

* Should be able to reuse this mechanism with deb and rpm, I think
it would be nice to know which specific one it is without guessing
based on /etc/debian_version or something; but it doesn't look like
that is exposed by goreleaser into an env or anything :/

* Need to reference the installed file and I think Id's don't require []

* Need to add into the root directory for this to work

* That was not deliberately removed

* feat: add RPM and DEB package configuration files for Navidrome

Signed-off-by: Deluan <deluan@navidrome.org>

* Don't need this as goreleaser will sort it out

---------

Signed-off-by: Deluan <deluan@navidrome.org>
Co-authored-by: Deluan Quintão <deluan@navidrome.org>
v0.58.5
2025-11-09 12:57:55 -05:00
Kendall Garner
53ff33866d
feat(subsonic): implement indexBasedQueue extension (#4244)
* redo this whole PR, but clearner now that better errata is in

* update play queue types
2025-11-09 12:52:05 -05:00