feat(Parser): Add ThumbnailOverlayTitleView and PageIndicatorView classes (#1120)

Add two missing parser classes that were being JIT-generated at runtime:

- ThumbnailOverlayTitleView: Displays title/subtitle overlays on thumbnails
- PageIndicatorView: Tracks pagination state in carousels (indicator count and selected index)

These are encountered when parsing Mix/Playlist responses.
This commit is contained in:
Ian Brown
2026-03-16 12:44:35 -07:00
committed by GitHub
parent 5cc278fe6d
commit 2a33fbc85f
3 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { YTNode } from '../helpers.js';
import type { RawNode } from '../index.js';
export default class PageIndicatorView extends YTNode {
static type = 'PageIndicatorView';
public indicator_count: number;
public selected_index: number;
constructor(data: RawNode) {
super();
this.indicator_count = data.indicatorCount ?? 0;
this.selected_index = data.selectedIndex ?? 0;
}
}

View File

@@ -0,0 +1,15 @@
import { YTNode } from '../helpers.js';
import type { RawNode } from '../index.js';
export default class ThumbnailOverlayTitleView extends YTNode {
static type = 'ThumbnailOverlayTitleView';
public title: string;
public subtitle: string;
constructor(data: RawNode) {
super();
this.title = data.title?.content ?? '';
this.subtitle = data.subtitle?.content ?? '';
}
}