Skip to content

Improve thumbnail quality for Soundcloud service#159

Merged
theScrabi merged 1 commit intoTeamNewPipe:devfrom
ritiek:better-soundcloud-thumbnail
Jun 27, 2019
Merged

Improve thumbnail quality for Soundcloud service#159
theScrabi merged 1 commit intoTeamNewPipe:devfrom
ritiek:better-soundcloud-thumbnail

Conversation

@ritiek
Copy link
Contributor

@ritiek ritiek commented Apr 25, 2019

The thumbnail URL provided when using the Soundcloud API defaults to 100x100 pixels image. It seems we could also fetch for better resolution thumbnails by replacing a small part in the URL. This stackoverflow post contains some valuable information on Soundcloud thumbnail quality: https://stackoverflow.com/a/13989369/.

I've added changes to the code to replace the part of the URL to fetch a 400x400 pixels thumbnail image. I didn't use the 500x500 pixels image because for some reason the part of the images were cut from the sides when displayed in NewPipe while 400x400 pixels image didn't have this problem.

Also, some Soundcloud tracks have the artwork_url key as null in the API response. Previously, the thumbnail for such tracks wouldn't show up in NewPipe. This PR will fallback to the avatar_url if artwork_url is null (this is what Soundcloud does when accessing it through a web browser, so these changes are consistent with that observed with a web browser).


Some before-After NewPipe screenshots (click to zoom):
(At left: Before, At right: This PR)



  • I carefully read the contribution guidelines and agree to them.
  • I did test the API against NewPipe.
  • [No breaking changes] I agree to ASAP create a PULL request for NewPipe for making in compatible when I changed the api.

and fallback to avatar thumbnail if track thumbnail isn't found
@ritiek
Copy link
Contributor Author

ritiek commented Apr 25, 2019

Some tests are failing but those don't seem to be related to this PR.

@TobiGr TobiGr added the soundcloud service, https://soundcloud.com/ label Jun 26, 2019
@theScrabi theScrabi merged commit 4488c21 into TeamNewPipe:dev Jun 27, 2019
@theScrabi
Copy link
Member

Thanks :)

Although I think the big issue here right now is that soundcloud support seems broken right now.

@TobiGr
Copy link
Contributor

TobiGr commented Jun 27, 2019

@theScrabi What do you mean by soundcloud is broken? I just fixed playlist extraction in 0d09a9f and 93d4299 should have fixed the other problems. We might want to add those commits to the next hotfix release.

(Restarted the tests after that)

@ritiek ritiek deleted the better-soundcloud-thumbnail branch July 11, 2019 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

soundcloud service, https://soundcloud.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants