chore: v4.1.0 release

This commit is contained in:
LuanRT
2023-03-24 04:35:40 +00:00
parent 7668ebc98e
commit 31a7de6437
11 changed files with 73 additions and 28 deletions

View File

@@ -1,20 +1,25 @@
import { YTNode } from '../helpers.ts';
import type { RawNode } from '../index.ts';
import Text from './misc/Text.ts';
import NavigationEndpoint from './NavigationEndpoint.ts';
import { YTNode } from '../helpers.ts';
class ShowingResultsFor extends YTNode {
export default class ShowingResultsFor extends YTNode {
static type = 'ShowingResultsFor';
corrected_query: Text;
endpoint: NavigationEndpoint;
original_query: Text;
corrected_query_endpoint: NavigationEndpoint;
original_query_endpoint: NavigationEndpoint;
search_instead_for: Text;
showing_results_for: Text;
constructor(data: any) {
constructor(data: RawNode) {
super();
this.corrected_query = new Text(data.correctedQuery);
this.endpoint = new NavigationEndpoint(data.correctedQueryEndpoint);
this.original_query = new Text(data.originalQuery);
this.corrected_query_endpoint = new NavigationEndpoint(data.correctedQueryEndpoint);
this.original_query_endpoint = new NavigationEndpoint(data.originalQueryEndpoint);
this.search_instead_for = new Text(data.searchInsteadFor);
this.showing_results_for = new Text(data.showingResultsFor);
}
}
export default ShowingResultsFor;
}

View File

@@ -6,6 +6,7 @@ import Thumbnail from './misc/Thumbnail.ts';
import NavigationEndpoint from './NavigationEndpoint.ts';
import MetadataBadge from './MetadataBadge.ts';
import ExpandableMetadata from './ExpandableMetadata.ts';
import ThumbnailOverlayTimeStatus from './ThumbnailOverlayTimeStatus.ts';
import { timeToSeconds } from '../../utils/Utils.ts';
import { YTNode } from '../helpers.ts';
@@ -98,7 +99,7 @@ class Video extends YTNode {
return this.badges.some((badge) => {
if (badge.style === 'BADGE_STYLE_TYPE_LIVE_NOW' || badge.label === 'LIVE')
return true;
});
}) || this.thumbnail_overlays.firstOfType(ThumbnailOverlayTimeStatus)?.style === 'LIVE';
}
get is_upcoming(): boolean | undefined {