mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-09 04:57:04 +03:00
cleaner logging
This commit is contained in:
@@ -31,8 +31,11 @@ if (config.mode === "test") {
|
||||
// Only set cache if data returned
|
||||
if (data.items.length > 0) {
|
||||
redis.set(redisKey, JSON.stringify(data), (setErr) => {
|
||||
logger.debug("redis: video information cache set for: " + videoID);
|
||||
setErr && logger.warn(setErr);
|
||||
if(setErr) {
|
||||
logger.warn(setErr);
|
||||
} else {
|
||||
logger.debug("redis: video information cache set for: " + videoID);
|
||||
}
|
||||
callback(false, data); // don't fail
|
||||
});
|
||||
} else {
|
||||
@@ -50,10 +53,4 @@ if (config.mode === "test") {
|
||||
};
|
||||
}
|
||||
|
||||
/* YouTubeAPI.videos.list({
|
||||
part: "snippet",
|
||||
id: videoID
|
||||
}, function (err, data) {*/
|
||||
|
||||
|
||||
module.exports = exportObject;
|
||||
Reference in New Issue
Block a user