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

Skip invalid images #1068

Merged
merged 2 commits into from
May 11, 2024
Merged

Skip invalid images #1068

merged 2 commits into from
May 11, 2024

Conversation

dbhmw
Copy link
Contributor

@dbhmw dbhmw commented May 11, 2024

Downloading images with the 'no_convert_image' if the image was for example deleted the plugin pulls garbage and makes 0B image. This may solve the problem when downloading the images with no extension will result in a proper extension being applied instead of just jpg.

# doesn't have extension? use jpg.
ext='jpg'
try:
from PIL import Image
Copy link
Owner

Choose a reason for hiding this comment

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

FFF doesn't require pillow(for PIL) for CLI users who don't want images.

Are you happy with the existing error reporting for not having PIL?

FFF: INFO: 2024-05-11 13:35:07,828: story.py(1670): Failed to load or convert image,
parent:http://test1.com?sid=1010&chapter=1
skipping:file:///C:/Users/uname/fff logo images/film-reel.jpeq
Exception: No module named 'PIL'

@dbhmw
Copy link
Contributor Author

dbhmw commented May 11, 2024

Now this should handle the lack of modules better.

@JimmXinu JimmXinu merged commit eabfd1b into JimmXinu:main May 11, 2024
@JimmXinu
Copy link
Owner

It'll be in the next test version, thanks.

@dbhmw dbhmw deleted the m branch May 13, 2024 15:02
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