From bb7defbe7228cab3a8b951b8e9317c56f8ae5472 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 26 Jul 2024 02:35:50 +0200 Subject: [PATCH] fix: Don't crash when attempting to download local tracks in playlists by filtering them --- src/downloader.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/downloader.rs b/src/downloader.rs index d8b45c7..d382a96 100644 --- a/src/downloader.rs +++ b/src/downloader.rs @@ -97,7 +97,11 @@ impl Downloader { } SpotifyItem::Playlist(p) => { let tracks = self.spotify.full_playlist(&p.id).await?; - let queue: Vec = tracks.into_iter().map(|t| t.into()).collect(); + let queue: Vec = tracks + .into_iter() + .filter(|t| !t.is_local) + .map(|t| t.into()) + .collect(); self.add_to_queue_multiple(queue).await; } SpotifyItem::Artist(a) => {