mirror of
https://github.com/beetbox/beets.git
synced 2026-01-04 06:53:27 +01:00
Use correct methods for ImageMagick and PIL info
This commit is contained in:
parent
8317a20bcd
commit
79d602b2a0
2 changed files with 4 additions and 4 deletions
|
|
@ -92,11 +92,11 @@ class ThumbnailsPlugin(BeetsPlugin):
|
|||
if not os.path.exists(dir):
|
||||
os.makedirs(dir)
|
||||
|
||||
if has_IM():
|
||||
if get_im_version():
|
||||
self.write_metadata = write_metadata_im
|
||||
tool = "IM"
|
||||
else:
|
||||
assert has_PIL() # since we're local
|
||||
assert get_pil_version() # since we're local
|
||||
self.write_metadata = write_metadata_pil
|
||||
tool = "PIL"
|
||||
self._log.debug(u"using {0} to write metadata", tool)
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ class ThumbnailsTest(unittest.TestCase, TestHelper):
|
|||
|
||||
@patch('beetsplug.thumbnails.os')
|
||||
@patch('beetsplug.thumbnails.ArtResizer')
|
||||
@patch('beetsplug.thumbnails.has_IM')
|
||||
@patch('beetsplug.thumbnails.has_PIL')
|
||||
@patch('beetsplug.thumbnails.get_im_version')
|
||||
@patch('beetsplug.thumbnails.get_pil_version')
|
||||
@patch('beetsplug.thumbnails.GioURI')
|
||||
def test_check_local_ok(self, mock_giouri, mock_pil, mock_im,
|
||||
mock_artresizer, mock_os):
|
||||
|
|
|
|||
Loading…
Reference in a new issue