mirror of
https://github.com/beetbox/beets.git
synced 2026-02-01 04:55:38 +01:00
Fix #1806: handle OSError in stats -e
This commit is contained in:
parent
d4e11f0af9
commit
231981de0c
2 changed files with 6 additions and 1 deletions
|
|
@ -1232,7 +1232,10 @@ def show_stats(lib, query, exact):
|
|||
|
||||
for item in items:
|
||||
if exact:
|
||||
total_size += os.path.getsize(item.path)
|
||||
try:
|
||||
total_size += os.path.getsize(item.path)
|
||||
except OSError as exc:
|
||||
log.info('could not get size of {}: {}', item.path, exc)
|
||||
else:
|
||||
total_size += int(item.length * item.bitrate / 8)
|
||||
total_time += item.length
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ Fixes:
|
|||
* :doc:`/plugins/lyrics`: The Genius backend has been re-enabled.
|
||||
* :doc:`/plugins/edit`: Editing metadata now moves files, when appropriate
|
||||
(like the :ref:`modify-cmd` command). :bug:`1804`
|
||||
* The :ref:`stats-cmd` command no longer crashes when files are missing or
|
||||
inaccessible. :bug:`1806`
|
||||
|
||||
.. _beets.io: http://beets.io/
|
||||
.. _Beetbox: https://github.com/beetbox
|
||||
|
|
|
|||
Loading…
Reference in a new issue