Skip to content

Commit bf0554b

Browse files
committed
Revert resolution change
1 parent 4dd484d commit bf0554b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

providers/SoundCloud/mod.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,19 @@ export class SoundCloudReleaseLookup extends ReleaseLookup<SoundCloudProvider, R
219219
rawReleaseUrl: URL | undefined;
220220

221221
constructReleaseApiUrl(): URL | undefined {
222-
return undefined;
222+
const { method, value } = this.lookup;
223+
let lookupUrl: URL;
224+
const query = new URLSearchParams();
225+
if (method === 'gtin') {
226+
throw new ProviderError(this.provider.name, 'GTIN lookups are not supported');
227+
} else {
228+
const entityId = this.provider.parseProviderId(value, 'release');
229+
const releaseUrl = this.provider.constructUrl(entityId);
230+
lookupUrl = new URL(`resolve`, this.provider.apiBaseUrl);
231+
query.set('url', releaseUrl.href);
232+
}
233+
lookupUrl.search = query.toString();
234+
return lookupUrl;
223235
}
224236

225237
async getRawRelease(): Promise<RawReponse> {
@@ -333,7 +345,7 @@ export class SoundCloudReleaseLookup extends ReleaseLookup<SoundCloudProvider, R
333345
if (artworkUrl) {
334346
artworks.push({
335347
thumbUrl: artworkUrl.replace(/-(large|medium|small)\./, '-t300x300.'),
336-
url: artworkUrl.replace(/-(large|medium|small)\./, '-original.'),
348+
url: artworkUrl.replace(/-(large|medium|small)\./, '-t500x500.'),
337349
types: ['front' as ArtworkType],
338350
provider: this.provider.name,
339351
});

0 commit comments

Comments
 (0)