Fix innertube failure handling

This commit is contained in:
Ajay
2025-04-12 00:44:10 -04:00
parent 46580322fc
commit 300642fd4f

View File

@@ -46,7 +46,10 @@ async function newLeafWrapper(videoId: string, ignoreCache: boolean) {
export function getVideoDetails(videoId: string, ignoreCache = false): Promise<videoDetails> {
if (!config.newLeafURLs) {
return getPlayerData(videoId, ignoreCache)
.then(data => convertFromInnerTube(data));
.then(data => convertFromInnerTube(data))
.catch(() => {
return null;
});
}
return Promise.any([
newLeafWrapper(videoId, ignoreCache)