Added [] return rather than 404 for no segments with matching hash

This commit is contained in:
Joe Dowd
2020-10-01 00:51:58 +01:00
parent 211562a0d6
commit 4cea3c2a3b
2 changed files with 18 additions and 3 deletions

View File

@@ -20,10 +20,10 @@ module.exports = async function (req, res) {
// Get all video id's that match hash prefix
const videoIds = db.prepare('all', 'SELECT DISTINCT videoId, hashedVideoID from sponsorTimes WHERE hashedVideoID LIKE ?', [hashPrefix+'%']);
if (videoIds.length === 0) {
/*if (videoIds.length === 0) {
res.sendStatus(404);
return;
}
}*/
let segments = videoIds.map((video) => {
return {