diff --git a/internal/urlparse/parse.go b/internal/urlparse/parse.go index daf556e..d550d93 100644 --- a/internal/urlparse/parse.go +++ b/internal/urlparse/parse.go @@ -69,6 +69,9 @@ func parseQobuz(raw string, parts []string) *ParsedURL { } mediaType := parts[0] + if mediaType == "interpreter" { + mediaType = "artist" + } if !isSupportedMedia(mediaType) { return nil } diff --git a/internal/urlparse/parse_test.go b/internal/urlparse/parse_test.go index cac7fc4..bccba5f 100644 --- a/internal/urlparse/parse_test.go +++ b/internal/urlparse/parse_test.go @@ -27,6 +27,22 @@ func TestQobuzAlbumURL(t *testing.T) { } } +func TestQobuzInterpreterURLParsesAsArtist(t *testing.T) { + inputs := []string{ + "https://www.qobuz.com/us-en/interpreter/odezenne/739874", + "https://play.qobuz.com/artist/739874", + } + for _, input := range inputs { + result := Parse(input) + if result == nil { + t.Fatalf("expected parsed url for %q", input) + } + if result.Source != "qobuz" || result.MediaType != "artist" || result.ID != "739874" { + t.Fatalf("unexpected parse result for %q: %+v", input, result) + } + } +} + func TestTidalTrackURL(t *testing.T) { inputs := []string{ "https://tidal.com/browse/track/3083287",