Fixed generic error
This commit is contained in:
parent
40c0c5ccde
commit
a09fcf661a
|
@ -571,13 +571,14 @@ def downloadTrackObj_wrap(dz, track, settings, bitrate, queueItem, socket):
|
||||||
result = downloadTrackObj(dz, track, settings, bitrate, queueItem, socket=socket)
|
result = downloadTrackObj(dz, track, settings, bitrate, queueItem, socket=socket)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
result = {'error': {
|
result = {'error': {
|
||||||
'message': str(e)},
|
'message': str(e),
|
||||||
'data': {
|
'data': {
|
||||||
'id': track['SNG_ID'],
|
'id': track['SNG_ID'],
|
||||||
'title': track['SNG_TITLE'] + (" "+track['VERSION'] if 'VERSION' in track and track['VERSION'] else ""),
|
'title': track['SNG_TITLE'] + (" "+track['VERSION'] if 'VERSION' in track and track['VERSION'] else ""),
|
||||||
'mainArtist': {'name': track['ART_NAME']}
|
'mainArtist': {'name': track['ART_NAME']}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def download(dz, queueItem, socket=None):
|
def download(dz, queueItem, socket=None):
|
||||||
|
@ -591,13 +592,14 @@ def download(dz, queueItem, socket=None):
|
||||||
result = downloadTrackObj(dz, queueItem['single'], settings, bitrate, queueItem, socket=socket)
|
result = downloadTrackObj(dz, queueItem['single'], settings, bitrate, queueItem, socket=socket)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
result = {'error': {
|
result = {'error': {
|
||||||
'message': str(e)},
|
'message': str(e),
|
||||||
'data': {
|
'data': {
|
||||||
'id': track['SNG_ID'],
|
'id': track['SNG_ID'],
|
||||||
'title': track['SNG_TITLE'] + (" "+track['VERSION'] if 'VERSION' in track and track['VERSION'] else ""),
|
'title': track['SNG_TITLE'] + (" "+track['VERSION'] if 'VERSION' in track and track['VERSION'] else ""),
|
||||||
'mainArtist': {'name': track['ART_NAME']}
|
'mainArtist': {'name': track['ART_NAME']}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
download_path = after_download_single(result, settings)
|
download_path = after_download_single(result, settings)
|
||||||
elif 'collection' in queueItem:
|
elif 'collection' in queueItem:
|
||||||
print("Downloading collection")
|
print("Downloading collection")
|
||||||
|
|
Loading…
Reference in New Issue