Use MBID type from go.uploadedlobster.com/mbtypes

This commit is contained in:
Philipp Wolfer 2025-04-03 14:56:39 +02:00
parent 04eddfda33
commit 8fff19ceac
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
12 changed files with 82 additions and 188 deletions

View file

@ -20,6 +20,7 @@ import (
"sort"
"time"
"go.uploadedlobster.com/mbtypes"
"go.uploadedlobster.com/scotty/internal/config"
"go.uploadedlobster.com/scotty/internal/i18n"
"go.uploadedlobster.com/scotty/internal/models"
@ -188,7 +189,7 @@ func (f FavoriteTrack) AsLove() models.Love {
}
func (t Track) AsTrack() models.Track {
recordingMbid := models.MBID(t.RecordingMbid)
recordingMbid := mbtypes.MBID(t.RecordingMbid)
track := models.Track{
TrackName: t.Title,
ReleaseName: t.Album.Title,
@ -196,8 +197,8 @@ func (t Track) AsTrack() models.Track {
TrackNumber: t.Position,
DiscNumber: t.DiscNumber,
RecordingMbid: recordingMbid,
ReleaseMbid: models.MBID(t.Album.ReleaseMbid),
ArtistMbids: []models.MBID{models.MBID(t.Artist.ArtistMbid)},
ReleaseMbid: mbtypes.MBID(t.Album.ReleaseMbid),
ArtistMbids: []mbtypes.MBID{mbtypes.MBID(t.Artist.ArtistMbid)},
Tags: t.Tags,
AdditionalInfo: map[string]any{
"media_player": FunkwhaleClientName,