Files
wehub-resource-sync ead81af521
Deploy to GitHub Pages / deploy (push) Failing after 0s
CI / go (push) Has been cancelled
CI / build (darwin, macos-14) (push) Has been cancelled
CI / build (windows, windows-2025) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:31:13 +08:00

27 lines
832 B
Go

package qobuz
import "sync"
// streamURLs records the signed CDN URLs that the provider has resolved via
// track/getFileUrl. The player consults IsStreamURL through a registered
// buffered-URL matcher so Qobuz FLAC streams are routed through the
// buffer-while-playing + ffmpeg pipeline (which auto-detects the codec and
// supports seeking), exactly like Navidrome's raw streams.
var streamURLs sync.Map // map[string]struct{}
// registerStreamURL marks u as a Qobuz stream URL.
func registerStreamURL(u string) {
if u == "" {
return
}
streamURLs.Store(u, struct{}{})
}
// IsStreamURL reports whether u is a Qobuz signed stream URL previously
// resolved by the provider. It is registered with the player's buffered-URL
// matcher in main.go.
func IsStreamURL(u string) bool {
_, ok := streamURLs.Load(u)
return ok
}