bump ytdl-core
This commit is contained in:
parent
f02422366c
commit
56a0cd6374
3 changed files with 12 additions and 8 deletions
|
@ -54,7 +54,7 @@
|
||||||
"soundcloud-scraper": "^5.0.0",
|
"soundcloud-scraper": "^5.0.0",
|
||||||
"spotify-url-info": "^2.2.0",
|
"spotify-url-info": "^2.2.0",
|
||||||
"youtube-sr": "^4.0.7",
|
"youtube-sr": "^4.0.7",
|
||||||
"ytdl-core": "^4.7.0"
|
"ytdl-core": "^4.8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.13.16",
|
"@babel/cli": "^7.13.16",
|
||||||
|
|
|
@ -326,12 +326,13 @@ export class Player extends EventEmitter {
|
||||||
const queue = this._addTracksToQueue(message, tracks);
|
const queue = this._addTracksToQueue(message, tracks);
|
||||||
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, pl);
|
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, pl);
|
||||||
} else {
|
} else {
|
||||||
const track = tracks.shift();
|
const track = tracks[0];
|
||||||
const queue = (await this._createQueue(message, track).catch(
|
const queue = (await this._createQueue(message, track).catch(
|
||||||
(e) => void this.emit(PlayerEvents.ERROR, e, message)
|
(e) => void this.emit(PlayerEvents.ERROR, e, message)
|
||||||
)) as Queue;
|
)) as Queue;
|
||||||
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, pl);
|
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, pl);
|
||||||
this.emit(PlayerEvents.TRACK_START, message, queue.tracks[0], queue);
|
this.emit(PlayerEvents.TRACK_START, message, queue.tracks[0], queue);
|
||||||
|
tracks.shift();
|
||||||
this._addTracksToQueue(message, tracks);
|
this._addTracksToQueue(message, tracks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,12 +383,13 @@ export class Player extends EventEmitter {
|
||||||
const queue = this._addTracksToQueue(message, tracks);
|
const queue = this._addTracksToQueue(message, tracks);
|
||||||
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, playlist);
|
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, playlist);
|
||||||
} else {
|
} else {
|
||||||
const track = tracks.shift();
|
const track = tracks[0];
|
||||||
const queue = (await this._createQueue(message, track).catch(
|
const queue = (await this._createQueue(message, track).catch(
|
||||||
(e) => void this.emit(PlayerEvents.ERROR, e, message)
|
(e) => void this.emit(PlayerEvents.ERROR, e, message)
|
||||||
)) as Queue;
|
)) as Queue;
|
||||||
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, playlist);
|
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, playlist);
|
||||||
this.emit(PlayerEvents.TRACK_START, message, queue.tracks[0], queue);
|
this.emit(PlayerEvents.TRACK_START, message, queue.tracks[0], queue);
|
||||||
|
tracks[0];
|
||||||
this._addTracksToQueue(message, tracks);
|
this._addTracksToQueue(message, tracks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,12 +439,13 @@ export class Player extends EventEmitter {
|
||||||
const queue = this._addTracksToQueue(message, res.tracks);
|
const queue = this._addTracksToQueue(message, res.tracks);
|
||||||
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, res);
|
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, res);
|
||||||
} else {
|
} else {
|
||||||
const track = res.tracks.shift();
|
const track = res.tracks[0];
|
||||||
const queue = (await this._createQueue(message, track).catch(
|
const queue = (await this._createQueue(message, track).catch(
|
||||||
(e) => void this.emit(PlayerEvents.ERROR, e, message)
|
(e) => void this.emit(PlayerEvents.ERROR, e, message)
|
||||||
)) as Queue;
|
)) as Queue;
|
||||||
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, res);
|
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, res);
|
||||||
this.emit(PlayerEvents.TRACK_START, message, queue.tracks[0], queue);
|
this.emit(PlayerEvents.TRACK_START, message, queue.tracks[0], queue);
|
||||||
|
res.tracks.shift();
|
||||||
this._addTracksToQueue(message, res.tracks);
|
this._addTracksToQueue(message, res.tracks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1549,6 +1552,7 @@ export default Player;
|
||||||
* The type of Track source, either:
|
* The type of Track source, either:
|
||||||
* * `soundcloud` - a stream from SoundCloud
|
* * `soundcloud` - a stream from SoundCloud
|
||||||
* * `youtube` - a stream from YouTube
|
* * `youtube` - a stream from YouTube
|
||||||
|
* * `spotify` - a spotify track
|
||||||
* * `arbitrary` - arbitrary stream
|
* * `arbitrary` - arbitrary stream
|
||||||
* @typedef {String} TrackSource
|
* @typedef {String} TrackSource
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4642,10 +4642,10 @@ youtube-sr@^4.0.7:
|
||||||
"@types/node-fetch" "^2.5.10"
|
"@types/node-fetch" "^2.5.10"
|
||||||
node-fetch "^2.6.1"
|
node-fetch "^2.6.1"
|
||||||
|
|
||||||
ytdl-core@^4.7.0:
|
ytdl-core@^4.8.0:
|
||||||
version "4.7.0"
|
version "4.8.0"
|
||||||
resolved "https://registry.yarnpkg.com/ytdl-core/-/ytdl-core-4.7.0.tgz#2c92023536484d8a2760d1aa504df2778f87ae21"
|
resolved "https://registry.yarnpkg.com/ytdl-core/-/ytdl-core-4.8.0.tgz#d9f037a370a4b984f1f937e7a11b4531e8959443"
|
||||||
integrity sha512-G09HeYsyLMsUCPEuK2asDqmLnOx+n5SxVV3QqGJd+iYuw5Z/qiwx7x0gxZTiAkHBsbG3WuluJWBPswZyrygKmQ==
|
integrity sha512-LFhhwqFojReoaME17VpsFeiamygM0W/YNG8O02mrmS2O6Em5LjCPiJYdq7Af3CmJtBEOCdptSZ3Ql+3LGWDGvg==
|
||||||
dependencies:
|
dependencies:
|
||||||
m3u8stream "^0.8.3"
|
m3u8stream "^0.8.3"
|
||||||
miniget "^4.0.0"
|
miniget "^4.0.0"
|
||||||
|
|
Loading…
Reference in a new issue