From 2ca8d57c15720a996c05985a41d0481da846e15b Mon Sep 17 00:00:00 2001 From: Ashley Date: Sat, 22 Oct 2022 16:58:54 +0200 Subject: [PATCH] Comment Improvements v2 pog --- src/pt-api.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/pt-api.js b/src/pt-api.js index 8a35dfcf..27c87fbe 100644 --- a/src/pt-api.js +++ b/src/pt-api.js @@ -1,4 +1,4 @@ - /* +/* PokeTube is a Free/Libre youtube front-end ! @@ -86,7 +86,8 @@ async function video(v) { ); var comments = await JSON.parse(inv_comments); - + + var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then((res) => res.text() ); @@ -106,7 +107,7 @@ async function video(v) { .then((xml) => JSON.parse(toJson(xml))); const summary = await wiki - .summary(video.Video.Channel.Name) + .summary(video.Video.Channel.Name + " ") .then((summary_) => (summary_.title !== "Not found." ? summary_ : "none")); const data = await fetcher(v); @@ -125,15 +126,7 @@ async function video(v) { color: await getColors( `https://i.ytimg.com/vi/${v}/maxresdefault.jpg` ).then((colors) => colors[0].hex()), - b: nightlyJsonData !== null, - ...(nightlyJsonData !== null - ? { - beta: nightlyJsonData, - badges: nightlyJsonData.channel.badges[0], - comments: nightlyJsonData.commentCount, - } - : {}), - }; + }; } async function search(query, cnt) {