mirror of
https://github.com/beetbox/beets.git
synced 2025-12-14 20:43:41 +01:00
fix crash when WMA is missing cover art (#75)
This commit is contained in:
parent
e25b2ec740
commit
10dfa780d1
2 changed files with 11 additions and 11 deletions
|
|
@ -618,15 +618,15 @@ class ImageField(object):
|
|||
return None
|
||||
|
||||
elif obj.type == 'asf':
|
||||
pictures = obj.mgfile['WM/Picture']
|
||||
if pictures:
|
||||
data = pictures[0].value
|
||||
try:
|
||||
return _unpack_asf_image(data)[1]
|
||||
except:
|
||||
return None
|
||||
else:
|
||||
return None
|
||||
if 'WM/Picture' in obj.mgfile:
|
||||
pictures = obj.mgfile['WM/Picture']
|
||||
if pictures:
|
||||
data = pictures[0].value
|
||||
try:
|
||||
return _unpack_asf_image(data)[1]
|
||||
except:
|
||||
return None
|
||||
return None
|
||||
|
||||
else:
|
||||
# Here we're assuming everything but MP3, MPEG-4, and FLAC
|
||||
|
|
|
|||
|
|
@ -198,11 +198,11 @@ READ_ONLY_CORRECT_DICTS = {
|
|||
|
||||
'full.wma': {
|
||||
'length': 1.0,
|
||||
'bitrate': 23,
|
||||
'bitrate': 128000,
|
||||
'format': 'Windows Media',
|
||||
'samplerate': 44100,
|
||||
'bitdepth': 0,
|
||||
'channels': 2,
|
||||
'channels': 1,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue