- Moved several variable assignments outside of try blocks
- Added and clarified various comments and docstrings
- Modified the command loop in `get_im_version()` to a slightly more
readable approach
- `get_im_version()` now returns None when ImageMagick is unavailable
- Updated `ArtResizer._check_method` to handle our new returns in a way
that is more readable
- Fixed an issue where `get_im_version()` could crash if the regex
search failed to find a match
`get_im_version` should now always return a tuple containing:
- index 0: a tuple representing the version
- index 1: a bool or None, representing legacy status
- Refactored convert and identify command names to an ArtResizer
member variable, set on ArtResizer init. Functions that use this info
will now access it from there.
- Changed the way `cmd` variables are written so that the command name
and command args are assigned directly to `cmd`, rather than doing
`command_output(cmd + args)`
- `get_im_version()` will now always return a tuple containing two
values: a tuple representing the version, and either a bool or None
flag representing whether we should send legacy commands to ImageMagick
- Improved readability of successful return value in `get_im_version()`
`get_im_version` now returns an additional bool `isLegacy`, which
indicates whether the the `magick` binary is accessible. It is stored
in `self.im_legacy` on initialization of an `ArtResizer` object, and
can be accessed via `ArtResizer.shared.im_legacy`
Updated artresizer's ImageMagick commands to use the magick binary
added in ImageMagick 7.x, rather than the legacy utilities ('convert',
'identify', etc.) This resolves an issue where beets is failing to
detect or use ImageMagick on Windows even when it is set correctly
on the PATH, which in turn restores functionality to the fetchart and
embedart plugins on Windows.
Closes#2093
This uses GStreamer APIs to extract a list of audio decoders and the
relevant MIME types and file extensions. Some clients like ncmpcpp use
this command to fetch a list of supported file extensions.