fix error codes
This commit is contained in:
parent
6acf62ec26
commit
81dd09dbdf
2
index.ts
2
index.ts
|
|
@ -133,7 +133,7 @@ app.ws('/download/:id', async (ws, req) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.playabilityStatus?.status !== 'OK') {
|
if (info.playabilityStatus?.status !== 'OK') {
|
||||||
ws.send(`This video is not available for download (${info.playability_status?.status} ${info.playability_status?.reason}).`);
|
ws.send(`This video is not available for download (${info.playabilityStatus?.status} ${info.playabilityStatus?.reason}).`);
|
||||||
return ws.close()
|
return ws.close()
|
||||||
} else if (info.videoDetails.isLiveContent) {
|
} else if (info.videoDetails.isLiveContent) {
|
||||||
ws.send('This video is live, and cannot be downloaded.');
|
ws.send('This video is live, and cannot be downloaded.');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue