mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 12:49:29 +02:00
Fixed import crashing when no acoustid found
This commit is contained in:
parent
1955005a4f
commit
2354721cd9
1 changed files with 4 additions and 5 deletions
|
@ -33,8 +33,7 @@ def _do_import(import_job, replace):
|
|||
# we try to deduce mbid from acoustid
|
||||
client = get_acoustid_client()
|
||||
match = client.get_best_match(import_job.audio_file.path)
|
||||
if not match:
|
||||
raise ValueError('Cannot get match')
|
||||
if match:
|
||||
duration = match['recordings'][0]['duration']
|
||||
mbid = match['recordings'][0]['id']
|
||||
acoustid_track_id = match['id']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue