mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-12-22 08:20:17 +00:00
improve error logging
This commit is contained in:
parent
2c60c8c6cf
commit
0bb420a1a3
1 changed files with 8 additions and 0 deletions
|
@ -86,7 +86,10 @@ const module = {
|
|||
let results = new Array();
|
||||
youtubeSearch(text, (videos) => {
|
||||
for (const i in videos) {
|
||||
|
||||
|
||||
if (video.compactVideoRenderer) {
|
||||
//--- If Entry Is A Video ---//
|
||||
const video = videos[i];
|
||||
results.push({
|
||||
id: video.compactVideoRenderer.videoId,
|
||||
|
@ -96,7 +99,12 @@ const module = {
|
|||
thumbnails: video.compactVideoRenderer.thumbnail.thumbnails,
|
||||
raw: video
|
||||
})
|
||||
} else {
|
||||
//--- If Entry Is Not A Video ---//
|
||||
logger("search", { type: "Error Caught Successfully, Code Continued to run.", error: video }, true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
callback(results);
|
||||
|
|
Loading…
Reference in a new issue