mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-30 18:06:15 +00:00
refactor!: overhaul core classes and remove redundant code (#388)
* feat(Player.ts): append `cver` to deciphered URLs * refactor(Actions.ts): remove redundant `getVideoInfo` function This is leftover code from previous versions. It had many problems and it is no longer required. * fix(Kids.ts): remove unneeded `await` keywords * dev: add more endpoints * chore: update deps * refactor: separate endpoints into files * dev: improve types * dev: add more endpoints * refactor: put clients in a separate directory inside `core` * chore: lint * refactor: move mixins and managers to separate folders * chore: fix tests * dev: add `CreateVideoEndpoint` * chore: clean up * chore: lint * chore: add some comments * chore: remove unnecessary test * dev: add `playlist/CreateEndpoint` * dev: add `playlist/DeleteEndpoint` * dev: add `browse/EditPlaylistEndpoint` * fix(parser): add a few checks to avoid parsing errors
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { CLIENTS } from '../utils/Constants.js';
|
||||
import { base64ToU8, u8ToBase64 } from '../utils/Utils.js';
|
||||
import { VideoMetadata } from '../core/Studio.js';
|
||||
import { UpdateVideoMetadataOptions } from '../types/index.js';
|
||||
|
||||
import * as VisitorData from './generated/messages/youtube/VisitorData.js';
|
||||
import * as ChannelAnalytics from './generated/messages/youtube/ChannelAnalytics.js';
|
||||
@@ -235,7 +235,7 @@ class Proto {
|
||||
return encodeURIComponent(u8ToBase64(buf));
|
||||
}
|
||||
|
||||
static encodeVideoMetadataPayload(video_id: string, metadata: VideoMetadata): Uint8Array {
|
||||
static encodeVideoMetadataPayload(video_id: string, metadata: UpdateVideoMetadataOptions): Uint8Array {
|
||||
const data: InnertubePayload.Type = {
|
||||
context: {
|
||||
client: {
|
||||
|
||||
Reference in New Issue
Block a user