mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-09 14:18:11 +02:00
8e6cbcbc2a
- Add configurable YouTube Opus (96-256kbps) and MP3 (96-320kbps) bitrates - Improve title matching with loose normalization for symbol-heavy tracks - Add SpotubeDL engine v2 fallback for MP3 requests - Improve filename sanitization in track metadata screen - Bump version to 3.6.9+82
35 lines
928 B
Go
35 lines
928 B
Go
package gobackend
|
|
|
|
import "testing"
|
|
|
|
func TestNormalizeLooseTitle_Separators(t *testing.T) {
|
|
got := normalizeLooseTitle("Doctor / Cops")
|
|
if got != "doctor cops" {
|
|
t.Fatalf("expected doctor cops, got %q", got)
|
|
}
|
|
|
|
got = normalizeLooseTitle("Doctor _ Cops")
|
|
if got != "doctor cops" {
|
|
t.Fatalf("expected doctor cops, got %q", got)
|
|
}
|
|
}
|
|
|
|
func TestNormalizeLooseTitle_EmojiAndSymbols(t *testing.T) {
|
|
got := normalizeLooseTitle("Music Of The Spheres 🌎✨")
|
|
if got != "music of the spheres" {
|
|
t.Fatalf("expected music of the spheres, got %q", got)
|
|
}
|
|
}
|
|
|
|
func TestTitlesMatch_SeparatorVariants(t *testing.T) {
|
|
if !titlesMatch("Doctor / Cops", "Doctor _ Cops") {
|
|
t.Fatal("expected tidal titlesMatch to accept / vs _ variant")
|
|
}
|
|
}
|
|
|
|
func TestQobuzTitlesMatch_SeparatorVariants(t *testing.T) {
|
|
if !qobuzTitlesMatch("Doctor / Cops", "Doctor _ Cops") {
|
|
t.Fatal("expected qobuzTitlesMatch to accept / vs _ variant")
|
|
}
|
|
}
|