-
Notifications
You must be signed in to change notification settings - Fork 18
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 |
kellnerd
left a comment
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.
| }; | ||
|
|
||
| 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.
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.
500x500 is the highest we can get for sure. Using original in the url instead of t500x500, we can get the original file, which I've personally seen up to 3000x3000, the ending of the url changes depending on what the artist uploaded the file as: either .jpg or .png
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.
Update, just found one at 3071x3071.
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.
Further update: After messing around with my own images, there is no image resolution limit, but compression is applied to whatever you upload
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.
Since there is no way to determine the url extension for the -original urls, I think it should stay with the t500x500 URL and let the image importer userscript handle it.
Otherwise, a request could be made here to determine the extension
harmony/providers/SoundCloud/mod.ts
Lines 342 to 355 in bf0554b
| getArtwork(release: SoundcloudPlaylist | SoundcloudTrack): Artwork[] | undefined { | |
| const artworks: Artwork[] = []; | |
| const artworkUrl = release.artwork_url; | |
| if (artworkUrl) { | |
| artworks.push({ | |
| thumbUrl: artworkUrl.replace(/-(large|medium|small)\./, '-t300x300.'), | |
| url: artworkUrl.replace(/-(large|medium|small)\./, '-t500x500.'), | |
| types: ['front' as ArtworkType], | |
| provider: this.provider.name, | |
| }); | |
| return artworks; | |
| } | |
| return undefined; | |
| } |
…et --allow-write -RE providers\SoundCloud\mod.test.ts -- --download --update`
kellnerd
left a comment
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 adding a few provider tests! For today I have a couple of questions and a few refactorings which went wrong.
| if (url?.hostname.endsWith('.bandcamp.com')) { | ||
| return typeIds.bandcamp; | ||
| } | ||
| if (url?.hostname.replace('www.', '') == 'soundcloud.com') { |
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.
Do the URLs ever have a www subdomain? The provider implementation doesn't accept it at least.
|
I have taken the liberty to finally push my changes to your branch. Sorry that it took me so long, these changes are already 2-3 weeks old, lol.
|
The file extension ( |

Closes #35
SoundCloud currently implements the following: