mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-29 21:27:05 +02:00
Write acronym MBID all uppercase
This commit is contained in:
parent
8fff19ceac
commit
ad1644672c
17 changed files with 149 additions and 149 deletions
|
@ -63,7 +63,7 @@ func NormalizeTitle(s string) string {
|
|||
// Compare two tracks for similarity.
|
||||
func CompareTracks(t1 models.Track, t2 models.Track) float64 {
|
||||
// Identical recording MBID always compares 100%
|
||||
if t1.RecordingMbid == t2.RecordingMbid && t1.RecordingMbid != "" {
|
||||
if t1.RecordingMBID == t2.RecordingMBID && t1.RecordingMBID != "" {
|
||||
return 1.0
|
||||
}
|
||||
|
||||
|
|
|
@ -75,13 +75,13 @@ func TestCompareTracksSameMBID(t *testing.T) {
|
|||
t1 := models.Track{
|
||||
ArtistNames: []string{"Paradise Lost"},
|
||||
TrackName: "Forever After",
|
||||
RecordingMbid: mbtypes.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: mbtypes.MBID("2886d15c-09b0-43c6-af56-932f70dde164"),
|
||||
RecordingMBID: mbtypes.MBID("2886d15c-09b0-43c6-af56-932f70dde164"),
|
||||
}
|
||||
assert.Equal(t, 1.0, similarity.CompareTracks(t1, t2))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue