Add MBIDs to media_file, album and artist

This commit is contained in:
Deluan
2020-08-27 16:51:55 -04:00
parent 64ccb4d188
commit 6663c079e0
9 changed files with 138 additions and 2 deletions
+1
View File
@@ -161,6 +161,7 @@ func (r *albumRepository) refresh(ids ...string) error {
sel := Select(`f.album_id as id, f.album as name, f.artist, f.album_artist, f.artist_id, f.album_artist_id,
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.mbz_album_id, f.mbz_album_artist_id, f.mbz_album_type, f.mbz_album_comment, f.catalog_num,
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,
+1
View File
@@ -144,6 +144,7 @@ func (r *artistRepository) refresh(ids ...string) error {
}
var artists []refreshArtist
sel := Select("f.album_artist_id as id", "f.album_artist as name", "count(*) as album_count", "a.id as current_id",
"f.mbz_album_artist_id as mbz_artist_id",
"f.sort_album_artist_name as sort_artist_name", "f.order_album_artist_name as order_artist_name",
"sum(f.song_count) as song_count", "sum(f.size) as size").
From("album f").