add innerTube as primary videoInfo endpoint

- drop videoInfo.genreUrl since it's always empty
- bump ts target to ES2021 for Promise.any
- fix mocks to return err: false
- get maxResThumbnail from static endpoint
This commit is contained in:
Michael C
2022-09-15 17:02:33 -04:00
parent 3c09033267
commit 62a9b0eddd
15 changed files with 130 additions and 109 deletions

View File

@@ -15,7 +15,7 @@ export class YouTubeApiMock {
if (obj.id === "noDuration" || obj.id === "full_video_duration_segment") {
return {
err: null,
err: false,
data: {
title: "Example Title",
lengthSeconds: 0,
@@ -32,7 +32,7 @@ export class YouTubeApiMock {
};
} else if (obj.id === "duration-update") {
return {
err: null,
err: false,
data: {
title: "Example Title",
lengthSeconds: 500,
@@ -49,7 +49,7 @@ export class YouTubeApiMock {
};
} else if (obj.id === "channelid-convert") {
return {
err: null,
err: false,
data: {
title: "Video Lookup Title",
author: "ChannelAuthor",
@@ -58,14 +58,14 @@ export class YouTubeApiMock {
};
} else if (obj.id === "duration-changed") {
return {
err: null,
err: false,
data: {
lengthSeconds: 100,
} as APIVideoData
};
} else {
return {
err: null,
err: false,
data: {
title: "Example Title",
authorId: "ExampleChannel",