From c01d81802dbd116e121c5692ac4c3ccd968e6531 Mon Sep 17 00:00:00 2001 From: Deluan Date: Mon, 29 Jun 2020 11:35:51 -0400 Subject: [PATCH] Fix album's songCount. Fixes #373 --- persistence/album_repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/persistence/album_repository.go b/persistence/album_repository.go index 3a4f3e59e..a244569e2 100644 --- a/persistence/album_repository.go +++ b/persistence/album_repository.go @@ -128,7 +128,7 @@ func (r *albumRepository) Refresh(ids ...string) error { f.sort_album_name, f.sort_artist_name, f.sort_album_artist_name, f.order_album_name, f.order_album_artist_name, f.path, f.compilation, f.genre, max(f.year) as max_year, sum(f.duration) as duration, - count(*) as song_count, a.id as current_id, + count(distinct(f.id)) as song_count, a.id as current_id, f2.id as cover_art_id, f2.path as cover_art_path, f2.has_cover_art, group_concat(f.disc_subtitle, ' ') as disc_subtitles, group_concat(f.artist, ' ') as song_artists, group_concat(f.year, ' ') as years`).