mirror of
https://github.com/beetbox/beets.git
synced 2026-01-04 15:03:22 +01:00
filter wide integers (closes #348)
This commit is contained in:
parent
bbac4ba109
commit
c5de56c4fd
2 changed files with 9 additions and 1 deletions
|
|
@ -471,7 +471,12 @@ class Item(LibModel):
|
|||
traceback.format_exc())
|
||||
|
||||
for key in ITEM_KEYS_META:
|
||||
setattr(self, key, getattr(f, key))
|
||||
value = getattr(f, key)
|
||||
if isinstance(value, (int, long)) and value.bit_length() > 63:
|
||||
# Filter values wider than 64 bits (in signed
|
||||
# representation). SQLite cannot store them.
|
||||
value = 0
|
||||
setattr(self, key, value)
|
||||
|
||||
# Database's mtime should now reflect the on-disk value.
|
||||
if read_path == self.path:
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ And some fixes:
|
|||
directory.
|
||||
* :doc:`/plugins/echonest_tempo`: Fix an issue where the plugin could use the
|
||||
tempo from the wrong song when the API did not contain the requested song.
|
||||
* Fix a crash when a file's metadata included a very large number (one wider
|
||||
than 64 bits). These huge numbers are now replaced with zeroes in the
|
||||
database.
|
||||
|
||||
.. _Opus: http://www.opus-codec.org/
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue