google-code-export / beets

Automatically exported from code.google.com/p/beets
MIT License
0 stars 0 forks source link

Skip corrupt/missing files in "update" command #338

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The "update" command (and possibly others) dies ungracefully when a file can't 
be parsed as expected. This leads to unfortunate situations like this:

header parsing failed
Traceback (most recent call last):
  File "/usr/local/bin/beet", line 8, in <module>
    load_entry_point('beets==1.0b12', 'console_scripts', 'beet')()
  File "/usr/local/lib/python2.7/site-packages/beets/ui/__init__.py", line 
711, in main
    subcommand.func(lib, config, suboptions, subargs)
  File "/usr/local/lib/python2.7/site-packages/beets/ui/commands.py", line 
851, in update_func
    update_items(lib, decargs(args), opts.album, opts.move, color, 
opts.pretend)
  File "/usr/local/lib/python2.7/site-packages/beets/ui/commands.py", line 
778, in update_items
    item.read()
  File "/usr/local/lib/python2.7/site-packages/beets/library.py", line 206, in 
read
    f = MediaFile(syspath(read_path))
  File "/usr/local/lib/python2.7/site-packages/beets/mediafile.py", line 684, 
in __init__
    raise UnreadableFileError('Mutagen could not read file')
beets.mediafile.UnreadableFileError: Mutagen could not read file

Instead of this, beets should just log an error and continue with the rest of 
the operation.

Original issue reported on code.google.com by adrian.sampson on 12 Feb 2012 at 9:11

GoogleCodeExporter commented 9 years ago

Original comment by adrian.sampson on 19 Feb 2012 at 10:46

GoogleCodeExporter commented 9 years ago
Also do this for the "embedart" plugin.

Original comment by adrian.sampson on 21 Feb 2012 at 7:23