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

scraper: Validate cover image for VirtualReal websites #1458

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

tarrawhitefan
Copy link
Contributor

Some of the covers provided by the VirtualReal websites are using a pixel format that is not compatible with golang's image/jpeg decoder and also with some VR players like HereSphere. It should be kinda safe to assume that if a image can't be decoded by the golang decoders it may not work in some players.

This patch validates the cover images against the golang decoders, and tries to use some gallery image as cover, if no valid coner image is found.

This is the only scraper I had this issue so far, but more scrapers may need the same changes.

Some of the covers provided by the VirtualReal websites are using a
pixel format that is not compatible with golang's `image/jpeg` decoder
and also with some VR players like HereSphere. It should be kinda safe
to assume that if a image can't be decoded by the golang decoders it may
not work in some players.

This patch validates the cover images against the golang decoders, and
tries to use some gallery image as cover, if no valid coner image is
found.

This is the only scraper I had this issue so far, but more scrapers may
need the same changes.
@crwxaj crwxaj merged commit 98b72a0 into xbapps:master Nov 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants