Set audio format on Bandcamp track ProviderMapping (#3213)
* Set audio format and fetch fresh streaming URLs for Bandcamp
Extract _fetch_api_track from get_track so get_stream_details can
bypass the 30-day cache and always retrieve a fresh streaming URL.
Set AudioFormat (content_type, bit_rate) on both StreamDetails and
ProviderMapping instead of stashing the URL in metadata.links.
Also: guard split_id against malformed IDs, handle
BandcampMustBeLoggedInError explicitly, and fix album_from_api
for albums with no release_date.
Tests cover _fetch_api_track paths, streaming URL priority/format
selection, library async generators, split_id validation, and
error mapping.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix Bandcamp provider for unauthenticated use
- Remove early return in search() that required identity token;
the Bandcamp search API works without authentication.
- Handle non-integer media IDs in genre lookup gracefully; provider-
only items (e.g. Bandcamp compound IDs) can't have genre mappings
so return an empty list instead of crashing with ValueError.
- Update comment to reflect that unauthenticated mode supports both
search and streaming, not just search.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: David Bishop <git@gnuconsulting.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>