mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-17 03:44:20 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into switch-axios
This commit is contained in:
@@ -35,12 +35,12 @@ export class YouTubeAPI {
|
||||
Logger.warn(`NewLeaf API Error for ${videoID}: ${data.error}`);
|
||||
return { err: data.error, data: null };
|
||||
}
|
||||
|
||||
DiskCache.set(cacheKey, JSON.stringify(data))
|
||||
const apiResult = data as APIVideoData;
|
||||
DiskCache.set(cacheKey, JSON.stringify(apiResult))
|
||||
.catch((err: any) => Logger.warn(err))
|
||||
.then(() => Logger.debug(`YouTube API: video information cache set for: ${videoID}`));
|
||||
|
||||
return { err: false, data };
|
||||
return { err: false, data: apiResult };
|
||||
} else {
|
||||
return { err: result.statusText, data: null };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user