From 5eceebdd7cdac9f6936d3133d88e7dbee0b45e3d Mon Sep 17 00:00:00 2001 From: titsex Date: Wed, 18 Sep 2024 00:18:01 +0300 Subject: [PATCH] fix: now getStreamURL returns a promise --- src/plugin.ts | 2 +- tests/plugin.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugin.ts b/src/plugin.ts index f662554..f189cd3 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -119,7 +119,7 @@ class VKMusicPlugin extends PlayableExtractorPlugin { return songs.map((song) => new VKMusicPluginSong(this, song)) } - getStreamURL(song: VKMusicPluginSong) { + async getStreamURL(song: VKMusicPluginSong) { if (!song.streamUrl) { throw new DisTubeError( VK_MUSIC_PLUGIN_SOURCE, diff --git a/tests/plugin.test.ts b/tests/plugin.test.ts index 03cb3a1..93c3594 100644 --- a/tests/plugin.test.ts +++ b/tests/plugin.test.ts @@ -100,7 +100,7 @@ describe('test plugin', async () => { streamUrl, } as VKMusicPluginSong - const response = plugin.getStreamURL(song) + const response = await plugin.getStreamURL(song) expect(response).toEqual(streamUrl) })