fix: assign MetadataBadge's label (#311)

This commit is contained in:
ChunkyProgrammer
2023-02-13 01:15:06 -05:00
committed by GitHub
parent 567fdbaf52
commit e37cf62732
3 changed files with 8 additions and 8 deletions

View File

@@ -58,18 +58,18 @@ class CompactVideo extends YTNode {
}
get is_fundraiser(): boolean {
return this.badges.some((badge) => badge.style === 'Fundraiser');
return this.badges.some((badge) => badge.label === 'Fundraiser');
}
get is_live(): boolean {
return this.badges.some((badge) => {
if (badge.label === 'BADGE_STYLE_TYPE_LIVE_NOW' || badge.style === 'LIVE')
if (badge.style === 'BADGE_STYLE_TYPE_LIVE_NOW' || badge.label === 'LIVE')
return true;
});
}
get is_new(): boolean {
return this.badges.some((badge) => badge.style === 'New');
return this.badges.some((badge) => badge.label === 'New');
}
get is_premiere(): boolean {