0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-25 12:45:17 +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();
youtubeSearch(text, (videos) => {
for (const i in videos) {
const video = videos[i];
results.push({
id: video.compactVideoRenderer.videoId,
runtime: video.compactVideoRenderer.lengthText.runs[0].text,
uploaded: video.compactVideoRenderer.publishedTimeText.runs[0].text,
views: video.compactVideoRenderer.viewCountText.runs[0].text,
thumbnails: video.compactVideoRenderer.thumbnail.thumbnails,
raw: video
})
if (video.compactVideoRenderer) {
const video = videos[i];
results.push({
id: video.compactVideoRenderer.videoId,
runtime: video.compactVideoRenderer.lengthText.runs[0].text,
uploaded: video.compactVideoRenderer.publishedTimeText.runs[0].text,
views: video.compactVideoRenderer.viewCountText.runs[0].text,
thumbnails: video.compactVideoRenderer.thumbnail.thumbnails,
raw: video
})
}
}
})
callback(results);