mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 11:58:14 +01:00
fix a issue
This commit is contained in:
parent
1f8695893f
commit
808852cdd9
1 changed files with 13 additions and 2 deletions
|
@ -93,7 +93,17 @@ async function video(v) {
|
||||||
|
|
||||||
var vid = await JSON.parse(video_new_info);
|
var vid = await JSON.parse(video_new_info);
|
||||||
|
|
||||||
const c = await channel(video.Video.Channel.id);
|
const c = await fetch(
|
||||||
|
`${config.tubeApi}channel?id=${video.Video.Channel.id}&tab=videos`
|
||||||
|
)
|
||||||
|
.then((res) => res.text())
|
||||||
|
.then((xml) => JSON.parse(toJson(xml)));
|
||||||
|
|
||||||
|
const a = await fetch(
|
||||||
|
`${config.tubeApi}channel?id=${video.Video.Channel.id}&tab=about`
|
||||||
|
)
|
||||||
|
.then((res) => res.text())
|
||||||
|
.then((xml) => JSON.parse(toJson(xml)));
|
||||||
|
|
||||||
const summary = await wiki
|
const summary = await wiki
|
||||||
.summary(video.Video.Channel.Name)
|
.summary(video.Video.Channel.Name)
|
||||||
|
@ -107,10 +117,11 @@ async function video(v) {
|
||||||
json: data.video.Player,
|
json: data.video.Player,
|
||||||
video,
|
video,
|
||||||
vid,
|
vid,
|
||||||
|
channel: c,
|
||||||
comments,
|
comments,
|
||||||
engagement: data.engagement,
|
engagement: data.engagement,
|
||||||
wiki: summary,
|
wiki: summary,
|
||||||
desc: c.about.Channel.Contents.ItemSection.About.Description,
|
desc: a.Channel.Contents.ItemSection.About.Description,
|
||||||
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()),
|
||||||
|
|
Loading…
Reference in a new issue