Improve thumbnail quality for Soundcloud service#159
Merged
theScrabi merged 1 commit intoTeamNewPipe:devfrom Jun 27, 2019
Merged
Improve thumbnail quality for Soundcloud service#159theScrabi merged 1 commit intoTeamNewPipe:devfrom
theScrabi merged 1 commit intoTeamNewPipe:devfrom
Conversation
and fallback to avatar thumbnail if track thumbnail isn't found
Contributor
Author
|
Some tests are failing but those don't seem to be related to this PR. |
theScrabi
approved these changes
Jun 27, 2019
Member
|
Thanks :) Although I think the big issue here right now is that soundcloud support seems broken right now. |
Contributor
|
@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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_urlkey as null in the API response. Previously, the thumbnail for such tracks wouldn't show up in NewPipe. This PR will fallback to theavatar_urlifartwork_urlisnull(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)