0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-29 06:33:05 +00:00

fix for compactVideoRenderer related errors

This commit is contained in:
Kenny 2022-03-04 09:13:05 -05:00
parent 66a1704fb8
commit de3e92dc7a

View file

@ -86,15 +86,17 @@ const module = {
let results = new Array(); let results = new Array();
youtubeSearch(text, (videos) => { youtubeSearch(text, (videos) => {
for (const i in videos) { for (const i in videos) {
const video = videos[i]; if (video.compactVideoRenderer) {
results.push({ const video = videos[i];
id: video.compactVideoRenderer.videoId, results.push({
runtime: video.compactVideoRenderer.lengthText.runs[0].text, id: video.compactVideoRenderer.videoId,
uploaded: video.compactVideoRenderer.publishedTimeText.runs[0].text, runtime: video.compactVideoRenderer.lengthText.runs[0].text,
views: video.compactVideoRenderer.viewCountText.runs[0].text, uploaded: video.compactVideoRenderer.publishedTimeText.runs[0].text,
thumbnails: video.compactVideoRenderer.thumbnail.thumbnails, views: video.compactVideoRenderer.viewCountText.runs[0].text,
raw: video thumbnails: video.compactVideoRenderer.thumbnail.thumbnails,
}) raw: video
})
}
} }
}) })
callback(results); callback(results);