mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-25 07:42:11 +00:00
chore: v4.1.0 release
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user