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

fetchart: enforce_ratio option silently fails (and causes tests to fail) if backend isn't available #1460

Closed
3 tasks done
sampsyo opened this issue May 14, 2015 · 3 comments
Closed
3 tasks done
Assignees
Labels
feature features we would like to implement

Comments

@sampsyo
Copy link
Member

sampsyo commented May 14, 2015

The new enforce_ratio option requires an imaging backend (PIL or ImageMagick) to get the size of an image. If it can't get the image, then ArtResizer.get_size() returns None and the plugin (rightly!) will not embed the image.

The trouble is that this failure mode isn't logged anywhere. I propose the following:

  • Log a warning (or at least a debug message) when the plugin gets None back from ArtResizer.
  • Add to the documentation for fetchart that you need ImageMagick or PIL.
  • Skip the tests for enforce_ratio if ArtResizer is using the fallback (proxy) backend.

Does that sound OK, @tomjaspers?

@sampsyo sampsyo added the feature features we would like to implement label May 14, 2015
@tomjaspers
Copy link
Contributor

Right! Seems like a pretty bad oversight on my part, woops. I'll be away until Monday, but I'll get right on it when I'm back (if it can wait that long).

@sampsyo
Copy link
Member Author

sampsyo commented May 14, 2015

Only a medium-sized oversight! And no hurry; please don't let it interfere with your travels.

@sampsyo
Copy link
Member Author

sampsyo commented May 18, 2015

This all looks awesome. Thank you!

tomjaspers added a commit that referenced this issue May 20, 2015
The `enforce_ratio` and `minwidth` options depend on PIL or ImageMagick.
Previously it silently fails. Now it will log a warning, and accept the
image.

Tests concerning these options are skipped when no imaging backend is available.

Fix #1460
LordSputnik pushed a commit to LordSputnik/beets that referenced this issue Jul 6, 2015
The `enforce_ratio` and `minwidth` options depend on PIL or ImageMagick.
Previously it silently fails. Now it will log a warning, and accept the
image.

Tests concerning these options are skipped when no imaging backend is available.

Fix beetbox#1460
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature features we would like to implement
Projects
None yet
Development

No branches or pull requests

2 participants