mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Use MBID type from go.uploadedlobster.com/mbtypes
This commit is contained in:
parent
04eddfda33
commit
8fff19ceac
12 changed files with 82 additions and 188 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue