mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-26 01:18:40 +03:00
Make hasStartSegment result optional
This commit is contained in:
@@ -11,10 +11,12 @@ export async function getVideoLabelsByHash(req: Request, res: Response): Promise
|
||||
}
|
||||
hashPrefix = hashPrefix.toLowerCase() as VideoIDHash;
|
||||
|
||||
const checkHasStartSegment = req.query.hasStartSegment === "true";
|
||||
|
||||
const service: Service = getService(req.query.service, req.body.service);
|
||||
|
||||
// Get all video id's that match hash prefix
|
||||
const segments = await getLabelsByHash(hashPrefix, service);
|
||||
const segments = await getLabelsByHash(hashPrefix, service, checkHasStartSegment);
|
||||
|
||||
if (!segments) return res.status(404).json([]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user