🐛 Fix videoData duration
This commit is contained in:
parent
269c2b49f6
commit
3db881f678
2 changed files with 3 additions and 3 deletions
|
@ -166,7 +166,7 @@ class Player extends EventEmitter {
|
|||
if (queryType === 'youtube-video-keywords') {
|
||||
await ytsr.search(updatedQuery || query, { type: 'video' }).then((results) => {
|
||||
if (results.length !== 0) {
|
||||
tracks = results.map((r) => new Track(r, message.author, null))
|
||||
tracks = results.map((r) => new Track(r, message.author, this))
|
||||
}
|
||||
}).catch(() => {})
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ class Player extends EventEmitter {
|
|||
title: item.title,
|
||||
description: item.description,
|
||||
views: item.views,
|
||||
duration: item.duration,
|
||||
durationFormatted: item.duration,
|
||||
url: item.url,
|
||||
thumbnail: item.thumbnail,
|
||||
channel: {
|
||||
|
|
|
@ -31,7 +31,7 @@ class Track {
|
|||
* The video duration (formatted).
|
||||
* @type {string}
|
||||
*/
|
||||
this.duration = videoData.duration || videoData.durationFormatted
|
||||
this.duration = videoData.durationFormatted
|
||||
/**
|
||||
* The video description
|
||||
* @type {string}
|
||||
|
|
Loading…
Reference in a new issue