Removed averageRating and dislikes

This commit is contained in:
killer069 2021-12-14 14:50:05 +05:30
parent 1c3b7f812a
commit 2974efdebc
2 changed files with 0 additions and 21 deletions

View File

@ -50,14 +50,6 @@ interface VideoOptions {
* YouTube Video's likes
*/
likes: number;
/**
* YouTube Video's dislikes
*/
dislikes: number;
/**
* YouTube Video's average Rating
*/
averageRating: number;
/**
* YouTube Video live status
*/
@ -123,14 +115,6 @@ export class YouTubeVideo {
* YouTube Video's likes
*/
likes: number;
/**
* YouTube Video's dislikes
*/
dislikes: number;
/**
* YouTube Video's average Rating
*/
averageRating: number;
/**
* YouTube Video live status
*/
@ -166,8 +150,6 @@ export class YouTubeVideo {
this.thumbnails = thumbnails || [];
this.channel = new YouTubeChannel(data.channel) || {};
this.likes = data.likes || 0;
this.averageRating = data.averageRating || 0;
this.dislikes = Math.floor((this.likes * (5 - this.averageRating)) / (this.averageRating - 1)) || 0;
this.live = !!data.live;
this.private = !!data.private;
this.tags = data.tags || [];
@ -197,8 +179,6 @@ export class YouTubeVideo {
views: this.views,
tags: this.tags,
likes: this.likes,
dislikes: this.dislikes,
averageRating: this.averageRating,
live: this.live,
private: this.private
};

View File

@ -172,7 +172,6 @@ export async function video_basic_info(url: string, options: InfoOptions = {}):
},
views: vid.viewCount,
tags: vid.keywords,
averageRating: vid.averageRating,
likes: parseInt(
ratingButtons
.find((button: any) => button.toggleButtonRenderer.defaultIcon.iconType === 'LIKE')