feat: add MusicSortFilterButton (#151)

This commit is contained in:
Patrick Kan
2022-08-25 13:06:52 +08:00
committed by GitHub
parent f4ce4d2f74
commit 6fe4d235ff
12 changed files with 183 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ class MusicShelf extends YTNode {
endpoint: NavigationEndpoint | null;
continuation: string | null;
bottom_text: Text | null;
subheaders?: Array<any>;
constructor(data: any) {
super();
@@ -24,6 +25,9 @@ class MusicShelf extends YTNode {
data.continuations?.[0].nextContinuationData?.continuation ||
data.continuations?.[0].reloadContinuationData?.continuation || null;
this.bottom_text = Reflect.has(data, 'bottomText') ? new Text(data.bottomText) : null;
if (data.subheaders) {
this.subheaders = Parser.parseArray(data.subheaders);
}
}
}