mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Fix PNG metadata type: string only
instead of int
This commit is contained in:
parent
39183cd539
commit
d299f40a72
2 changed files with 4 additions and 2 deletions
|
|
@ -163,7 +163,7 @@ class ThumbnailsPlugin(BeetsPlugin):
|
|||
See http://standards.freedesktop.org/thumbnail-spec/latest/x142.html
|
||||
"""
|
||||
metadata = {"Thumb::URI": PurePosixPath(album.artpath).as_uri(),
|
||||
"Thumb::MTime": os.stat(album.artpath).st_mtime}
|
||||
"Thumb::MTime": unicode(os.stat(album.artpath).st_mtime)}
|
||||
try:
|
||||
self.write_metadata(image_path, metadata)
|
||||
except Exception:
|
||||
|
|
|
|||
|
|
@ -57,10 +57,12 @@ class ThumbnailsTest(unittest.TestCase, TestHelper):
|
|||
plugin = ThumbnailsPlugin()
|
||||
plugin.write_metadata = Mock()
|
||||
album = Mock(artpath=b"/path/to/cover")
|
||||
mock_stat.return_value.st_mtime = 12345
|
||||
|
||||
plugin.add_tags(album, b"/path/to/thumbnail")
|
||||
|
||||
metadata = {"Thumb::URI": b"file:///path/to/cover",
|
||||
"Thumb::MTime": mock_stat.return_value.st_mtime}
|
||||
"Thumb::MTime": "12345"}
|
||||
plugin.write_metadata.assert_called_once_with(b"/path/to/thumbnail",
|
||||
metadata)
|
||||
mock_stat.assert_called_once_with(album.artpath)
|
||||
|
|
|
|||
Loading…
Reference in a new issue