Summary #
- Replace unanchored regex extraction (
beets.ExtractMBID) withbeets.ParseReleaseURL, validatingmb_urlat the request boundary vianet/url.Parseas anhttpsrelease URL onmusicbrainz.org,www.musicbrainz.org, orbeta.musicbrainz.orgwith/release/<uuid>path and no credentials, explicit port, query parameters, or fragments. - Normalize the extracted release UUID (
releaseID) to lowercase and construct a canonicalhttps://musicbrainz.org/release/<uuid>URL for post-import hooks (MB_URL) and SSEcompleteevents. - Update
CLIBeetsRunner.DryRun,CLIBeetsRunner.Import, andserver.Runnerto acceptreleaseIDinstead ofmbURL, passing only the normalized UUID tobeet 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
releaseIDand canonicalmb_urlpropagation.