prevent crash if youtube video is fucked up
ill remake a youtube function to pick a good video instead of broken one later, i just dont want cobalt to hang if one youtube cdn is down i hate youtube so much
This commit is contained in:
@@ -81,7 +81,7 @@ if (fs.existsSync('./.env')) {
|
||||
res.status(200).json({ "status": "continue" });
|
||||
} else if (req.query.t) {
|
||||
let ip = req.header('x-forwarded-for') ? req.header('x-forwarded-for') : req.ip
|
||||
stream(res, ip, req.query.t, req.query.h, req.query.e, languageCode(req));
|
||||
stream(res, ip, req.query.t, req.query.h, req.query.e);
|
||||
} else {
|
||||
let j = apiJSON(0, { t: loc(languageCode(req), 'ErrorNoStreamID') })
|
||||
res.status(j.status).json(j.body);
|
||||
|
||||
Reference in New Issue
Block a user