refactor: Clean up & fix old code

Other changes:
- Renamed "getShortsWatchItem" to "getShortsVideoInfo".
- Fixed `ShortFormVideoInfo`. This never worked for me ever since it was introduced. Turned out it was just implemented incorrectly.
- Moved `basic_info` extraction to `MediaInfo`. Less of a pain to maintain as we only have to modify one file.
- Removed unneeded tsdoc comments.
- Fixed `Innertube#getStreamingData()`. Now it actually returns a deciphered format.
- Simplified some types.
This commit is contained in:
Luan
2024-07-30 18:49:24 -03:00
parent 3153375bca
commit 9b9fb82131
52 changed files with 362 additions and 557 deletions

View File

@@ -6,6 +6,7 @@ import InfoPanelContainer from './InfoPanelContainer.js';
import LikeButton from './LikeButton.js';
import ReelPlayerHeader from './ReelPlayerHeader.js';
import PivotButton from './PivotButton.js';
import SubscribeButton from './SubscribeButton.js';
export default class ReelPlayerOverlay extends YTNode {
static type = 'ReelPlayerOverlay';
@@ -29,7 +30,7 @@ export default class ReelPlayerOverlay extends YTNode {
this.menu = Parser.parseItem(data.menu, Menu);
this.next_item_button = Parser.parseItem(data.nextItemButton, Button);
this.prev_item_button = Parser.parseItem(data.prevItemButton, Button);
this.subscribe_button_renderer = Parser.parseItem(data.subscribeButtonRenderer, Button);
this.subscribe_button_renderer = Parser.parseItem(data.subscribeButtonRenderer, [ Button, SubscribeButton ]);
this.style = data.style;
this.view_comments_button = Parser.parseItem(data.viewCommentsButton, Button);
this.share_button = Parser.parseItem(data.shareButton, Button);