mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-28 21:49:04 +01:00
Comment Improvements v2 pog
This commit is contained in:
parent
54137b8170
commit
2ca8d57c15
1 changed files with 5 additions and 12 deletions
|
@ -87,6 +87,7 @@ async function video(v) {
|
||||||
|
|
||||||
var comments = await JSON.parse(inv_comments);
|
var comments = await JSON.parse(inv_comments);
|
||||||
|
|
||||||
|
|
||||||
var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then((res) =>
|
var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then((res) =>
|
||||||
res.text()
|
res.text()
|
||||||
);
|
);
|
||||||
|
@ -106,7 +107,7 @@ async function video(v) {
|
||||||
.then((xml) => JSON.parse(toJson(xml)));
|
.then((xml) => JSON.parse(toJson(xml)));
|
||||||
|
|
||||||
const summary = await wiki
|
const summary = await wiki
|
||||||
.summary(video.Video.Channel.Name)
|
.summary(video.Video.Channel.Name + " ")
|
||||||
.then((summary_) => (summary_.title !== "Not found." ? summary_ : "none"));
|
.then((summary_) => (summary_.title !== "Not found." ? summary_ : "none"));
|
||||||
|
|
||||||
const data = await fetcher(v);
|
const data = await fetcher(v);
|
||||||
|
@ -125,14 +126,6 @@ async function video(v) {
|
||||||
color: await getColors(
|
color: await getColors(
|
||||||
`https://i.ytimg.com/vi/${v}/maxresdefault.jpg`
|
`https://i.ytimg.com/vi/${v}/maxresdefault.jpg`
|
||||||
).then((colors) => colors[0].hex()),
|
).then((colors) => colors[0].hex()),
|
||||||
b: nightlyJsonData !== null,
|
|
||||||
...(nightlyJsonData !== null
|
|
||||||
? {
|
|
||||||
beta: nightlyJsonData,
|
|
||||||
badges: nightlyJsonData.channel.badges[0],
|
|
||||||
comments: nightlyJsonData.commentCount,
|
|
||||||
}
|
|
||||||
: {}),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue