From 194764ba037fd75845419cada39a5242575c9e64 Mon Sep 17 00:00:00 2001 From: Ashley Date: Fri, 4 Aug 2023 16:52:04 +0000 Subject: [PATCH] optimize code owo --- src/libpoketube/libpoketube-core.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/libpoketube/libpoketube-core.js b/src/libpoketube/libpoketube-core.js index f7b34621..fb32e8d4 100644 --- a/src/libpoketube/libpoketube-core.js +++ b/src/libpoketube/libpoketube-core.js @@ -99,18 +99,6 @@ class PokeTubeCore { } if (this.checkUnexistingObject(vid)) { - let a; - - try { - a = await fetch(`${this.config.tubeApi}channel?id=${vid.authorId}&tab=about`) - .then((res) => res.text()) - .then((xml) => this.getJson(toJson(xml))); - } catch (error) { - this.initError("Error getting channel info", error); - a = ""; - } - - desc = a.Channel?.Contents?.ItemSection?.About?.Description; const fe = await fetcher(v); try { @@ -137,7 +125,7 @@ class PokeTubeCore { comments, engagement: fe.engagement, wiki: summary, - desc: desc, + desc: "", color: await getColors( `https://i.ytimg.com/vi/${v}/hqdefault.jpg?sqp=${this.sqp}` ).then((colors) => colors[0].hex()),