mirror of
https://github.com/beetbox/beets.git
synced 2025-12-29 12:02:44 +01:00
Don't fail if there are no areas listed in a release event.
This commit is contained in:
parent
51115ac2cd
commit
45bed808d3
1 changed files with 5 additions and 2 deletions
|
|
@ -118,8 +118,11 @@ def _preferred_release_event(release):
|
|||
|
||||
for event in release.get('release-event-list', {}):
|
||||
for country in countries:
|
||||
if country in event['area']['iso-3166-1-code-list']:
|
||||
return country, event['date']
|
||||
try:
|
||||
if country in event['area']['iso-3166-1-code-list']:
|
||||
return country, event['date']
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
return release.get('country'), release.get('date')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue