build spotify-to-navidrome migrator with recovery flow

This commit is contained in:
2026-04-09 03:10:58 +02:00
parent 650a0c6a87
commit c1360a6423
23 changed files with 3383 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package qobuz
import (
"encoding/json"
"testing"
)
func TestFlexStringUnmarshal(t *testing.T) {
var s flexString
if err := json.Unmarshal([]byte(`"0724384960650"`), &s); err != nil {
t.Fatalf("unmarshal string id failed: %v", err)
}
if string(s) != "0724384960650" {
t.Fatalf("unexpected value %q", string(s))
}
if err := json.Unmarshal([]byte(`12345`), &s); err != nil {
t.Fatalf("unmarshal numeric id failed: %v", err)
}
if string(s) != "12345" {
t.Fatalf("unexpected numeric value %q", string(s))
}
}