Skip to content
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

[SoundCloud] Fix extraction of non-JPG images #1113

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

AudricV
Copy link
Member

@AudricV AudricV commented Oct 1, 2023

Default image qualities were removed in image URLs with the jpg extension, causing the addition of the image suffix to full non-JPG images URLs and so to invalid image URLs.

Only the image quality name with its leading - character and the . character after the name is now removed and replaced by a string format replaced itself with the image quality name for each quality.

As the image suffixes do not contain the image extension, the name of image qualities lists has been adapted with these changes and some related comments have been also improved.

The documentation of the ImageSuffix class has been also updated in order to reflect the change of the non-requirement of the extension in the suffix property introduced by this fix.

…to a possibility

Some services may provide different image formats using the same suffix,
without we know what format the service provide. Enforcing an image extension
could so lead to provide invalid image URLs, like for SoundCloud PNG images
currently.

With this documentation change, it is now clear that users of this class decide
of whether they want to include image extensions in the suffix. The previous
behavior described in the Javadoc was not enforced.
Default image qualities were removed in image URLs with the jpg extension,
causing the addition of the image suffix to full non-JPG images URLs and so to
invalid image URLs.

Only the image quality name with its leading "-" character and the "."
character after the name is now removed and replaced by a string format
replaced itself with the image quality name for each quality.

As the image suffixes do not contain the image extension, the name of image
qualities lists has been adapted with these changes and some related comments
have been also improved.
@AudricV AudricV added bug soundcloud service, https://soundcloud.com/ labels Oct 1, 2023
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Stypox Stypox merged commit bb13216 into TeamNewPipe:dev Oct 2, 2023
4 checks passed
@AudricV AudricV deleted the snd_fix-non-jpg-images branch October 2, 2023 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug soundcloud service, https://soundcloud.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants