mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-25 07:42:11 +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,4 +1,4 @@
|
||||
import TabbedFeed from '../../core/TabbedFeed.js';
|
||||
import TabbedFeed from '../../core/mixins/TabbedFeed.js';
|
||||
import C4TabbedHeader from '../classes/C4TabbedHeader.js';
|
||||
import CarouselHeader from '../classes/CarouselHeader.js';
|
||||
import ChannelAboutFullMetadata from '../classes/ChannelAboutFullMetadata.js';
|
||||
@@ -10,8 +10,8 @@ import ExpandableTab from '../classes/ExpandableTab.js';
|
||||
import SectionList from '../classes/SectionList.js';
|
||||
import Tab from '../classes/Tab.js';
|
||||
|
||||
import Feed from '../../core/Feed.js';
|
||||
import FilterableFeed from '../../core/FilterableFeed.js';
|
||||
import Feed from '../../core/mixins/Feed.js';
|
||||
import FilterableFeed from '../../core/mixins/FilterableFeed.js';
|
||||
import ChipCloudChip from '../classes/ChipCloudChip.js';
|
||||
import FeedFilterChipBar from '../classes/FeedFilterChipBar.js';
|
||||
import ChannelSubMenu from '../classes/ChannelSubMenu.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import FilterableFeed from '../../core/FilterableFeed.js';
|
||||
import FilterableFeed from '../../core/mixins/FilterableFeed.js';
|
||||
import { InnertubeError } from '../../utils/Utils.js';
|
||||
import HashtagHeader from '../classes/HashtagHeader.js';
|
||||
import RichGrid from '../classes/RichGrid.js';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type Actions from '../../core/Actions.js';
|
||||
import Feed from '../../core/Feed.js';
|
||||
import Feed from '../../core/mixins/Feed.js';
|
||||
import ItemSection from '../classes/ItemSection.js';
|
||||
import BrowseFeedActions from '../classes/BrowseFeedActions.js';
|
||||
import type { IBrowseResponse } from '../types/ParsedResponse.js';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type Actions from '../../core/Actions.js';
|
||||
import FilterableFeed from '../../core/FilterableFeed.js';
|
||||
import FilterableFeed from '../../core/mixins/FilterableFeed.js';
|
||||
import ChipCloudChip from '../classes/ChipCloudChip.js';
|
||||
import FeedTabbedHeader from '../classes/FeedTabbedHeader.js';
|
||||
import RichGrid from '../classes/RichGrid.js';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type Actions from '../../core/Actions.js';
|
||||
import { InnertubeError } from '../../utils/Utils.js';
|
||||
|
||||
import Feed from '../../core/Feed.js';
|
||||
import Feed from '../../core/mixins/Feed.js';
|
||||
import History from './History.js';
|
||||
import Playlist from './Playlist.js';
|
||||
import Menu from '../classes/menus/Menu.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Feed from '../../core/Feed.js';
|
||||
import Feed from '../../core/mixins/Feed.js';
|
||||
import Message from '../classes/Message.js';
|
||||
import Thumbnail from '../classes/misc/Thumbnail.js';
|
||||
import NavigationEndpoint from '../classes/NavigationEndpoint.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Feed from '../../core/Feed.js';
|
||||
import Feed from '../../core/mixins/Feed.js';
|
||||
import { InnertubeError } from '../../utils/Utils.js';
|
||||
import HorizontalCardList from '../classes/HorizontalCardList.js';
|
||||
import ItemSection from '../classes/ItemSection.js';
|
||||
|
||||
@@ -32,7 +32,7 @@ import type { ApiResponse } from '../../core/Actions.js';
|
||||
import { ObservedArray, YTNode } from '../helpers.js';
|
||||
|
||||
import { InnertubeError } from '../../utils/Utils.js';
|
||||
import { MediaInfo } from '../../core/MediaInfo.js';
|
||||
import { MediaInfo } from '../../core/mixins/index.js';
|
||||
|
||||
class VideoInfo extends MediaInfo {
|
||||
#watch_next_continuation?: ContinuationItem;
|
||||
|
||||
Reference in New Issue
Block a user