From a60ce8a9d993aa6fd9515319d40e84a4ecfaabf5 Mon Sep 17 00:00:00 2001 From: ashley Date: Sat, 10 Aug 2024 18:43:50 +0000 Subject: [PATCH] try this Signed-off-by: ashley --- src/libpoketube/libpoketube-core.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/libpoketube/libpoketube-core.js b/src/libpoketube/libpoketube-core.js index 2d0fa6e6..77429cf7 100644 --- a/src/libpoketube/libpoketube-core.js +++ b/src/libpoketube/libpoketube-core.js @@ -122,7 +122,13 @@ class InnerTubePokeVidious { ); } - if (this.checkUnexistingObject(vid)) { + var vidOBJECT = "" + if(vid.error) { + var vidOBJECT = vid.error + } else { + var vidOBJECT = vid + } + if (this.checkUnexistingObject(vid)) { const fe = await getdislikes(v); try { @@ -133,7 +139,7 @@ class InnerTubePokeVidious { result: { json: json?.video, video, - vid, + vidOBJECT, comments, channel_uploads: p, engagement: fe.engagement, @@ -150,6 +156,8 @@ class InnerTubePokeVidious { }; return this.cache[v].result; + + } catch (error) { this.initError("Error getting video", error); }