Remove old refresh code

This commit is contained in:
Deluan
2022-12-19 11:23:57 -05:00
committed by Deluan Quintão
parent 83ff44f5f4
commit 566ae93950
4 changed files with 19 additions and 332 deletions
@@ -4,6 +4,7 @@ import (
"database/sql"
"strings"
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/log"
"github.com/pressly/goose"
)
@@ -13,9 +14,9 @@ func init() {
}
func upFixAlbumComments(tx *sql.Tx) error {
const zwsp = string('\u200b')
//nolint:gosec
rows, err := tx.Query(`
SELECT album.id, group_concat(media_file.comment, '` + zwsp + `') FROM album, media_file WHERE media_file.album_id = album.id GROUP BY album.id;
SELECT album.id, group_concat(media_file.comment, '` + consts.Zwsp + `') FROM album, media_file WHERE media_file.album_id = album.id GROUP BY album.id;
`)
if err != nil {
return err
@@ -37,7 +38,7 @@ func upFixAlbumComments(tx *sql.Tx) error {
if !comments.Valid {
continue
}
comment := getComment(comments.String, zwsp)
comment := getComment(comments.String, consts.Zwsp)
_, err = stmt.Exec(comment, id)
if err != nil {