mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-30 19:38:28 +03:00
Fix innertube failure handling
This commit is contained in:
@@ -46,7 +46,10 @@ async function newLeafWrapper(videoId: string, ignoreCache: boolean) {
|
|||||||
export function getVideoDetails(videoId: string, ignoreCache = false): Promise<videoDetails> {
|
export function getVideoDetails(videoId: string, ignoreCache = false): Promise<videoDetails> {
|
||||||
if (!config.newLeafURLs) {
|
if (!config.newLeafURLs) {
|
||||||
return getPlayerData(videoId, ignoreCache)
|
return getPlayerData(videoId, ignoreCache)
|
||||||
.then(data => convertFromInnerTube(data));
|
.then(data => convertFromInnerTube(data))
|
||||||
|
.catch(() => {
|
||||||
|
return null;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return Promise.any([
|
return Promise.any([
|
||||||
newLeafWrapper(videoId, ignoreCache)
|
newLeafWrapper(videoId, ignoreCache)
|
||||||
|
|||||||
Reference in New Issue
Block a user