mirror of
https://github.com/VueTubeApp/VueTube
synced 2025-01-03 14:11:08 +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();
|
let results = new Array();
|
||||||
youtubeSearch(text, (videos) => {
|
youtubeSearch(text, (videos) => {
|
||||||
for (const i in videos) {
|
for (const i in videos) {
|
||||||
|
|
||||||
|
|
||||||
if (video.compactVideoRenderer) {
|
if (video.compactVideoRenderer) {
|
||||||
|
//--- If Entry Is A Video ---//
|
||||||
const video = videos[i];
|
const video = videos[i];
|
||||||
results.push({
|
results.push({
|
||||||
id: video.compactVideoRenderer.videoId,
|
id: video.compactVideoRenderer.videoId,
|
||||||
|
@ -96,7 +99,12 @@ const module = {
|
||||||
thumbnails: video.compactVideoRenderer.thumbnail.thumbnails,
|
thumbnails: video.compactVideoRenderer.thumbnail.thumbnails,
|
||||||
raw: video
|
raw: video
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
//--- If Entry Is Not A Video ---//
|
||||||
|
logger("search", { type: "Error Caught Successfully, Code Continued to run.", error: video }, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
callback(results);
|
callback(results);
|
||||||
|
|
Loading…
Reference in a new issue