aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2022-01-07 12:26:17 -0600
committerMax Isom <[email protected]>2022-01-07 12:26:17 -0600
commitc1f64486e1574bab7bd275774a3cc3b26b8844e3 (patch)
treeb36ef986c34cebed7d4f26760c3a55cb0e1692c9 /src
parentd02249e1bb96df17ab220ddba16679b3f893b584 (diff)
downloadmuse-c1f64486e1574bab7bd275774a3cc3b26b8844e3.tar.xz
muse-c1f64486e1574bab7bd275774a3cc3b26b8844e3.zip
Bump youtube.ts
Diffstat (limited to 'src')
-rw-r--r--src/services/get-songs.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/services/get-songs.ts b/src/services/get-songs.ts
index 55fb260..780f7ec 100644
--- a/src/services/get-songs.ts
+++ b/src/services/get-songs.ts
@@ -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}"`);
}
}