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 (
"testing"
"github.com/stretchr/testify/assert"
"go.uploadedlobster.com/mbtypes"
"go.uploadedlobster.com/scotty/internal/models"
"go.uploadedlobster.com/scotty/internal/similarity"
)
@ -74,13 +75,13 @@ func TestCompareTracksSameMBID(t *testing.T) {
t1 := models.Track{
ArtistNames: []string{"Paradise Lost"},
TrackName: "Forever After",
RecordingMbid: models.MBID("2886d15c-09b0-43c6-af56-932f70dde164"),
RecordingMbid: mbtypes.MBID("2886d15c-09b0-43c6-af56-932f70dde164"),
}
t2 := models.Track{
ArtistNames: []string{"Paradise Lost"},
TrackName: "Forever Failure (radio edit)",
ReleaseName: "Draconian Times",
RecordingMbid: models.MBID("2886d15c-09b0-43c6-af56-932f70dde164"),
RecordingMbid: mbtypes.MBID("2886d15c-09b0-43c6-af56-932f70dde164"),
}
assert.Equal(t, 1.0, similarity.CompareTracks(t1, t2))
}