From a7e99e477095a39d5d2c6b66a6e423ebe17a23e8 Mon Sep 17 00:00:00 2001 From: Michael Wiencek Date: Tue, 28 May 2024 21:25:56 -0500 Subject: [PATCH] fix(Bandcamp): Fall back to raw release URL for custom domains For releases with custom domains, the code currently falls back to retrieving the Bandcamp URL from the `packages` array. If there are no packages, this fails. This commit caches the raw release URL we construct in `getRawRelease` as an alternative fallback. --- providers/Bandcamp/mod.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/providers/Bandcamp/mod.ts b/providers/Bandcamp/mod.ts index 4d2f6efb..b07836f7 100644 --- a/providers/Bandcamp/mod.ts +++ b/providers/Bandcamp/mod.ts @@ -130,6 +130,8 @@ export default class BandcampProvider extends MetadataProvider { } export class BandcampReleaseLookup extends ReleaseLookup { + rawReleaseUrl: URL | undefined; + constructReleaseApiUrl(): URL | undefined { return undefined; } @@ -140,6 +142,7 @@ export class BandcampReleaseLookup extends ReleaseLookup( webUrl, this.options.snapshotMaxTimestamp, @@ -153,10 +156,10 @@ export class BandcampReleaseLookup extends ReleaseLookup