mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-21 15:08:22 +03:00
Merge pull request #162 from ajayyy/experimental
Don't allow dots in videoID
This commit is contained in:
@@ -19,6 +19,11 @@ if (config.mode === "test") {
|
||||
|
||||
// YouTubeAPI.videos.list wrapper with cacheing
|
||||
exportObject.listVideos = (videoID, part, callback) => {
|
||||
if (videoID.length !== 11 || videoID.includes(".")) {
|
||||
callback("Invalid video ID");
|
||||
return;
|
||||
}
|
||||
|
||||
let redisKey = "youtube.video." + videoID + "." + part;
|
||||
redis.get(redisKey, (getErr, result) => {
|
||||
if (getErr || !result) {
|
||||
|
||||
Reference in New Issue
Block a user