mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-23 18:39:46 +01:00
fix(scanner): filter folders by num_audio_files to ensure accurate statistics
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
177de7269b
commit
cfa1d7fa81
2 changed files with 8 additions and 3 deletions
|
|
@ -30,7 +30,7 @@ update library set
|
|||
join artist a on la.artist_id = a.id
|
||||
where la.library_id = library.id and a.missing = 0
|
||||
),
|
||||
total_folders = (select count(*) from folder where library_id = library.id and missing = 0),
|
||||
total_folders = (select count(*) from folder where library_id = library.id and missing = 0 and num_audio_files > 0),
|
||||
total_files = (
|
||||
select ifnull(sum(num_audio_files + num_playlists + json_array_length(image_files)),0)
|
||||
from folder where library_id = library.id and missing = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue