mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-23 01:05:30 +01:00
Bump youtube.ts
This commit is contained in:
parent
d02249e1bb
commit
c1f64486e1
|
@ -109,7 +109,7 @@
|
|||
"spotify-uri": "^2.2.0",
|
||||
"spotify-web-api-node": "^5.0.2",
|
||||
"xbytes": "^1.7.0",
|
||||
"youtube.ts": "^0.2.3",
|
||||
"youtube.ts": "^0.2.5",
|
||||
"ytdl-core": "^4.9.2",
|
||||
"ytsr": "^3.5.3"
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ export default class {
|
|||
this.ytsrQueue = new PQueue({concurrency: 4});
|
||||
}
|
||||
|
||||
async youtubeVideoSearch(query: string): Promise<QueuedSongWithoutChannel | null> {
|
||||
async youtubeVideoSearch(query: string): Promise<QueuedSongWithoutChannel> {
|
||||
const {items} = await this.ytsrQueue.add(async () => this.cache.wrap(
|
||||
ytsr,
|
||||
query,
|
||||
|
@ -70,7 +70,7 @@ export default class {
|
|||
return this.youtubeVideo(firstVideo.id);
|
||||
}
|
||||
|
||||
async youtubeVideo(url: string): Promise<QueuedSongWithoutChannel | null> {
|
||||
async youtubeVideo(url: string): Promise<QueuedSongWithoutChannel> {
|
||||
const videoDetails = await this.cache.wrap(
|
||||
this.youtube.videos.get,
|
||||
cleanUrl(url),
|
||||
|
@ -271,7 +271,7 @@ export default class {
|
|||
return [songs as QueuedSongWithoutChannel[], nSongsNotFound, originalNSongs];
|
||||
}
|
||||
|
||||
private async spotifyToYouTube(track: SpotifyApi.TrackObjectSimplified, _: QueuedPlaylist | null): Promise<QueuedSongWithoutChannel | null> {
|
||||
private async spotifyToYouTube(track: SpotifyApi.TrackObjectSimplified, _: QueuedPlaylist | null): Promise<QueuedSongWithoutChannel> {
|
||||
return this.youtubeVideoSearch(`"${track.name}" "${track.artists[0].name}"`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3799,10 +3799,10 @@ yocto-queue@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251"
|
||||
integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==
|
||||
|
||||
youtube.ts@^0.2.3:
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/youtube.ts/-/youtube.ts-0.2.3.tgz#5bfb618df4f3f31c2720eb667980e9152aae370d"
|
||||
integrity sha512-KUowS4ixsIciDKo7qWAjqb+cTV37wCDQFd4YQ7Wk5nw6ZTcihCiqVfW24LKaX4kp7lH6Xj93fxVcaj78zJ/oow==
|
||||
youtube.ts@^0.2.5:
|
||||
version "0.2.5"
|
||||
resolved "https://registry.yarnpkg.com/youtube.ts/-/youtube.ts-0.2.5.tgz#392e8d037ade0287afd9373bb56cb6aa783ec5a3"
|
||||
integrity sha512-C0UAVLk8NRJEw378sKkQPzjN2C3n/UpjXJbVQr498pLs2xv/yjPO/qzkHlApeR/B3rKZFgGxGBmRUsk/Ovbd4w==
|
||||
dependencies:
|
||||
axios "^0.19.0"
|
||||
ytdl-core "^4.9.1"
|
||||
|
|
Loading…
Reference in a new issue