Stream beets imports over HTTP.

fix(beets,server): validate MusicBrainz release URLs and pass UUID to beet #20

Merged glerp.sullen.net
targeting main from glerp.sullen.net/goosefoot:fix/validate-mb-url
Merged opened by and assigned to glerp.sullen.net
targeting main from glerp.sullen.net/goosefoot:fix/validate-mb-url

Summary #

  • Replace unanchored regex extraction (beets.ExtractMBID) with beets.ParseReleaseURL, validating mb_url at the request boundary via net/url.Parse as an https release URL on musicbrainz.org, www.musicbrainz.org, or beta.musicbrainz.org with /release/<uuid> path and no credentials, explicit port, query parameters, or fragments.
  • Normalize the extracted release UUID (releaseID) to lowercase and construct a canonical https://musicbrainz.org/release/<uuid> URL for post-import hooks (MB_URL) and SSE complete events.
  • Update CLIBeetsRunner.DryRun, CLIBeetsRunner.Import, and server.Runner to accept releaseID instead of mbURL, passing only the normalized UUID to beet import -S.
  • Update existing tests and add behavioral unit tests covering URL scheme, host, port, credential, path, query, and fragment validation as well as pipeline releaseID and canonical mb_url propagation.
Commits 0