-
Notifications
You must be signed in to change notification settings - Fork 17
feat: Soundcloud Support #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Looking at #35, and I should see about adding CC license detection As for GTINs, those are only available when using the v2 API, which requires a user oath and client ID, as opposed to an application auth. At the moment, this implementation only uses the public v1 API, lacking support for proper label, copyright, and barcode information. |
I have also determined that some releases simply can not be fetched with the v1 API, for example: https://soundcloud.com/stevie-wonder-official/sets/so-what-the-fuss-3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for looking into SoundCloud!
Although this is still a draft and I haven't made an account to obtain API credentials yet, I couldn't resist to review the code once.
I have left a few comments but I guess there will be more once I get to play with the v1 (and maybe v2) API.
P.S. CI is complaining about code formatting, see here how to reproduce that locally.
readonly supportedUrls = new URLPattern({ | ||
hostname: 'soundcloud.com', | ||
pathname: '/:artist/sets/:title', | ||
}); | ||
|
||
readonly trackUrlPattern = new URLPattern({ | ||
hostname: 'soundcloud.com', | ||
pathname: '/:artist/:title', | ||
}); | ||
|
||
readonly artistUrlPattern = new URLPattern({ | ||
hostname: 'soundcloud.com', | ||
pathname: '/:artist', | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we have test cases for URL extraction, we can try to combine these URL patterns.
// MB has special handling for Bandcamp artist URLs | ||
return ['discography page']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to check which link types MB uses for SC, but this looks like a leftover from BC? (special URL handling is here)
constructReleaseApiUrl(): URL | undefined { | ||
return undefined; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method should contain parts of the logic which are currently included in getRawRelease
.
It is also used to construct the API URL which is shown in the provider section of the release lookup page.
parseSoundcloudTimestamp(timestamp: string): Date | undefined { | ||
const segments = timestamp.split(' '); | ||
if (segments.length === 3) { | ||
// Convert "2025/07/30 07:13:31 +0000" to "2025-07-30T07:13:31+00:00" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to look at some examples, but if these are always in UTC we could simply extract day, month and year and don't have to worry about the rest.
}; | ||
|
||
override readonly features: FeatureQualityMap = { | ||
'cover size': 500, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to obtain bigger images (about 1500px) with Image Max URL, so we should check that again.
#5
#35
SoundCloud currently implements the following: