feat: allow checking whether a channel has optional tabs (#296)

This commit is contained in:
absidue
2023-01-29 18:37:09 +01:00
committed by GitHub
parent 315d89f84a
commit ceefbed98c
4 changed files with 37 additions and 0 deletions

View File

@@ -196,6 +196,26 @@ export default class Channel extends TabbedFeed {
return new Channel(this.actions, page, true);
}
get has_videos(): boolean {
return this.hasTabWithURL('videos');
}
get has_shorts(): boolean {
return this.hasTabWithURL('shorts');
}
get has_live_streams(): boolean {
return this.hasTabWithURL('streams');
}
get has_playlists(): boolean {
return this.hasTabWithURL('playlists');
}
get has_community(): boolean {
return this.hasTabWithURL('community');
}
/**
* Retrives list continuation.
*/