Add size to album details (#561)

* add size to album details

for #534

* addressing review comments:

* create index album(size)
* remove unneeded Size field from refresh struct
* add whitespace to album details
* add size to album list view

* prettier
This commit is contained in:
Jay R. Wren
2020-10-12 11:10:07 -04:00
committed by GitHub
parent c60e56828b
commit fd6edf967f
6 changed files with 39 additions and 4 deletions
+2 -1
View File
@@ -164,7 +164,8 @@ func (r *albumRepository) refresh(ids ...string) error {
f.compilation, f.genre, max(f.year) as max_year, sum(f.duration) as duration,
count(f.id) as song_count, a.id as current_id,
group_concat(f.disc_subtitle, ' ') as disc_subtitles,
group_concat(f.artist, ' ') as song_artists, group_concat(f.year, ' ') as years`).
group_concat(f.artist, ' ') as song_artists, group_concat(f.year, ' ') as years,
sum(f.size) as size`).
From("media_file f").
LeftJoin("album a on f.album_id = a.id").
Where(Eq{"f.album_id": ids}).GroupBy("f.album_id")