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:
parent
66a1704fb8
commit
de3e92dc7a
1 changed files with 11 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue