quintodrome/model
Deluan Quintão e5e2d860ef
fix(scanner): ensure full scans update the DB (#4252)
* fix: ensure full scan refreshes all artist stats

After PR #4059, full scans were not forcing a refresh of all artists.
This change ensures that during full scans, all artist stats are refreshed
instead of only those with recently updated media files.

Changes:
- Set changesDetected=true at start of full scans to ensure maintenance operations run
- Add allArtists parameter to RefreshStats() method
- Pass fullScan state to RefreshStats to control refresh scope
- Update mock repository to match new interface

Fixes #4246
Related to PR #4059

* fix: add tests for full and incremental scans

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

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2025-06-23 13:26:48 -04:00
..
criteria feat(server): allow multiple sort fields in smart playlists (#4214) 2025-06-11 11:34:17 -04:00
id feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
metadata fix: Allow nullable ReplayGain and support 0.0 (#4239) 2025-06-17 12:02:25 -04:00
request feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
album.go chore: remove some BFR-related TODOs that are not valid anymore 2025-03-23 11:37:20 -04:00
album_test.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
annotation.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
artist.go fix(scanner): ensure full scans update the DB (#4252) 2025-06-23 13:26:48 -04:00
artist_info.go Get Similar Artists in parallel 2020-10-21 21:44:03 -04:00
artwork_id.go Add lastUpdated to coverArt ids. Helps with invalidating art cache client-side. 2023-02-08 20:03:31 -05:00
artwork_id_test.go Add lastUpdated to coverArt ids. Helps with invalidating art cache client-side. 2023-02-08 20:03:31 -05:00
bookmark.go Use structs lib to map models to DB. Fix #1266 2021-08-01 12:04:45 -04:00
datastore.go fix(server): reduce SQLite "database busy" errors (#3760) 2025-02-26 22:01:49 -05:00
errors.go Add share download endpoint 2023-03-10 23:33:29 -05:00
file_types.go Fix M3U mimetype on Debian Bullseye 2024-05-09 22:26:15 -04:00
file_types_test.go Refactor file type functions 2022-12-28 15:31:56 -05:00
folder.go feat(scanner): add folder hash for smarter quick scan change detection (#4220) 2025-06-12 13:17:34 -04:00
folder_test.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
genre.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
get_entity.go Handle "naked" CoverArtIDs (IDs of album, mediafiles and playlists) 2022-12-28 15:31:56 -05:00
library.go feat(scanner): add library stats to DB (#4229) 2025-06-14 15:58:33 -04:00
lyrics.go feat:(server): support reading lyrics from filesystem (#2897) 2025-04-30 08:10:19 -04:00
lyrics_test.go feat:(server): support reading lyrics from filesystem (#2897) 2025-04-30 08:10:19 -04:00
mediafile.go fix: Allow nullable ReplayGain and support 0.0 (#4239) 2025-06-17 12:02:25 -04:00
mediafile_internal_test.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
mediafile_test.go refactor: unify logic to export to M3U8 2025-05-27 12:37:57 -04:00
model_suite_test.go Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
participants.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
participants_test.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
player.go chore: remove more outdated TODOs 2025-03-23 11:53:43 -04:00
playlist.go feat(ui): add 'Show in Playlist' context menu (#4139) 2025-05-30 21:26:35 -04:00
playlist_test.go refactor: unify logic to export to M3U8 2025-05-27 12:37:57 -04:00
playqueue.go feat(server): add update and clear play queue endpoints to native API (#4215) 2025-06-11 12:02:31 -04:00
properties.go Associate main entities with library 2024-05-12 21:37:42 -04:00
radio.go Replace beego/orm with dbx (#2693) 2023-12-09 13:52:17 -05:00
scrobble_buffer.go Fix scrobble error spam in the logs. 2024-04-26 16:59:14 -04:00
searchable.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
share.go refactor: unify logic to export to M3U8 2025-05-27 12:37:57 -04:00
tag.go feat(subsonic): add ISRC support for OpenSubsonic Child (#4088) 2025-05-20 12:37:27 -04:00
tag_mappings.go fix(server): fix numeric comparisons for float custom tags in smart playlists (#4116) 2025-05-25 17:52:27 -04:00
tag_test.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
transcoding.go Replace beego/orm with dbx (#2693) 2023-12-09 13:52:17 -05:00
user.go Replace beego/orm with dbx (#2693) 2023-12-09 13:52:17 -05:00
user_props.go Pass userId explicitly to UserPropsRepository methods 2021-06-25 22:21:37 -04:00