mirror of
https://gitverse.ru/ot/DownOnSpot
synced 2025-12-18 09:24:17 +00:00
fix: Don't crash when attempting to download local tracks by skipping them (#88)
Co-authored-by: 0xnf <0xnf@winetech.com>
This commit is contained in:
parent
606a561689
commit
cc7a03b774
1 changed files with 5 additions and 1 deletions
|
|
@ -84,7 +84,11 @@ impl Downloader {
|
|||
let uri = Spotify::parse_uri(uri)?;
|
||||
let item = self.spotify.resolve_uri(&uri).await?;
|
||||
match item {
|
||||
SpotifyItem::Track(t) => self.add_to_queue(t.into()).await,
|
||||
SpotifyItem::Track(t) => {
|
||||
if !t.is_local {
|
||||
self.add_to_queue(t.into()).await;
|
||||
}
|
||||
}
|
||||
SpotifyItem::Album(a) => {
|
||||
let tracks = self.spotify.full_album(&a.id).await?;
|
||||
let queue: Vec<Download> = tracks.into_iter().map(|t| t.into()).collect();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue