Added failed socket call for frontend
This commit is contained in:
parent
96b68746e2
commit
46d2480857
|
@ -412,6 +412,8 @@ def downloadTrackObj(dz, trackAPI, settings, bitrate, queueItem, extraTrack=None
|
||||||
'message': "Track not yet encoded and no alternative found!",
|
'message': "Track not yet encoded and no alternative found!",
|
||||||
'data': track
|
'data': track
|
||||||
}
|
}
|
||||||
|
if socket:
|
||||||
|
socket.emit("updateQueue", {'uuid': queueItem['uuid'], 'failed': True, 'data': track, 'error': "Track not yet encoded and no alternative found!"})
|
||||||
return result
|
return result
|
||||||
else:
|
else:
|
||||||
print("ERROR: Track not yet encoded!")
|
print("ERROR: Track not yet encoded!")
|
||||||
|
@ -419,6 +421,8 @@ def downloadTrackObj(dz, trackAPI, settings, bitrate, queueItem, extraTrack=None
|
||||||
'message': "Track not yet encoded!",
|
'message': "Track not yet encoded!",
|
||||||
'data': track
|
'data': track
|
||||||
}
|
}
|
||||||
|
if socket:
|
||||||
|
socket.emit("updateQueue", {'uuid': queueItem['uuid'], 'failed': True, 'data': track, 'error': "Track not yet encoded!"})
|
||||||
return result
|
return result
|
||||||
|
|
||||||
# Get the selected bitrate
|
# Get the selected bitrate
|
||||||
|
@ -429,6 +433,8 @@ def downloadTrackObj(dz, trackAPI, settings, bitrate, queueItem, extraTrack=None
|
||||||
'message': "Track not found at desired bitrate.",
|
'message': "Track not found at desired bitrate.",
|
||||||
'data': track
|
'data': track
|
||||||
}
|
}
|
||||||
|
if socket:
|
||||||
|
socket.emit("updateQueue", {'uuid': queueItem['uuid'], 'failed': True, 'data': track, 'error': "Track not found at desired bitrate."})
|
||||||
return result
|
return result
|
||||||
elif format == -200:
|
elif format == -200:
|
||||||
print("ERROR: This track is not available in 360 Reality Audio format. Please select another format.")
|
print("ERROR: This track is not available in 360 Reality Audio format. Please select another format.")
|
||||||
|
@ -436,6 +442,8 @@ def downloadTrackObj(dz, trackAPI, settings, bitrate, queueItem, extraTrack=None
|
||||||
'message': "Track is not available in Reality Audio 360.",
|
'message': "Track is not available in Reality Audio 360.",
|
||||||
'data': track
|
'data': track
|
||||||
}
|
}
|
||||||
|
if socket:
|
||||||
|
socket.emit("updateQueue", {'uuid': queueItem['uuid'], 'failed': True, 'data': track, 'error': "Track is not available in Reality Audio 360."})
|
||||||
return result
|
return result
|
||||||
track['selectedFormat'] = format
|
track['selectedFormat'] = format
|
||||||
track['selectedFilesize'] = filesize
|
track['selectedFilesize'] = filesize
|
||||||
|
@ -548,6 +556,8 @@ def downloadTrackObj(dz, trackAPI, settings, bitrate, queueItem, extraTrack=None
|
||||||
'message': "Track not available on deezer's servers and no alternative found!",
|
'message': "Track not available on deezer's servers and no alternative found!",
|
||||||
'data': track
|
'data': track
|
||||||
}
|
}
|
||||||
|
if socket:
|
||||||
|
socket.emit("updateQueue", {'uuid': queueItem['uuid'], 'failed': True, 'data': track, 'error': "Track not available on deezer's servers and no alternative found!"})
|
||||||
return result
|
return result
|
||||||
else:
|
else:
|
||||||
print("ERROR: Track not available on deezer's servers!")
|
print("ERROR: Track not available on deezer's servers!")
|
||||||
|
@ -555,6 +565,8 @@ def downloadTrackObj(dz, trackAPI, settings, bitrate, queueItem, extraTrack=None
|
||||||
'message': "Track not available on deezer's servers!",
|
'message': "Track not available on deezer's servers!",
|
||||||
'data': track
|
'data': track
|
||||||
}
|
}
|
||||||
|
if socket:
|
||||||
|
socket.emit("updateQueue", {'uuid': queueItem['uuid'], 'failed': True, 'data': track, 'error': "Track not available on deezer's servers!"})
|
||||||
return result
|
return result
|
||||||
if track['selectedFormat'] in [3, 1, 8]:
|
if track['selectedFormat'] in [3, 1, 8]:
|
||||||
tagID3(writepath, track, settings['tags'])
|
tagID3(writepath, track, settings['tags'])
|
||||||
|
|
Loading…
Reference in New Issue