Bump youtube.ts

This commit is contained in:
Max Isom 2022-01-07 12:26:17 -06:00
parent d02249e1bb
commit c1f64486e1
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
3 changed files with 8 additions and 8 deletions

View file

@ -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}"`);
}
}