mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Fixed Playlist toJSON function
This commit is contained in:
@@ -94,7 +94,7 @@ export class YouTubePlayList {
|
||||
this.views = data.views || 0;
|
||||
this.link = data.link || undefined;
|
||||
this.channel = data.author || undefined;
|
||||
this.thumbnail = data.thumbnail || undefined;
|
||||
this.thumbnail = new YouTubeThumbnail(data.thumbnail) || undefined;
|
||||
this.videos = data.videos || [];
|
||||
this.__count++;
|
||||
this.fetched_videos.set(`${this.__count}`, this.videos as YouTubeVideo[]);
|
||||
@@ -110,7 +110,7 @@ export class YouTubePlayList {
|
||||
this.id = data.id || undefined;
|
||||
this.url = this.id ? `https://www.youtube.com/playlist?list=${this.id}` : undefined;
|
||||
this.title = data.title || undefined;
|
||||
this.thumbnail = data.thumbnail || undefined;
|
||||
this.thumbnail = new YouTubeThumbnail(data.thumbnail) || undefined;
|
||||
this.channel = data.channel || undefined;
|
||||
this.videos = [];
|
||||
this.videoCount = data.videos || 0;
|
||||
|
||||
@@ -152,7 +152,7 @@ export class YouTubeVideo {
|
||||
this.durationInSec = (data.duration < 0 ? 0 : data.duration) || 0;
|
||||
this.uploadedAt = data.uploadedAt || undefined;
|
||||
this.views = parseInt(data.views) || 0;
|
||||
this.thumbnail = data.thumbnail || {};
|
||||
this.thumbnail = new YouTubeThumbnail(data.thumbnail) || {};
|
||||
this.channel = new YouTubeChannel(data.channel) || {};
|
||||
this.likes = data.likes || 0;
|
||||
this.dislikes = data.dislikes || 0;
|
||||
|
||||
Reference in New Issue
Block a user