Skip to content

Commit

Permalink
update rspotify crate to v0.12.0 (#249)
Browse files Browse the repository at this point in the history
* updated rpsotify v0.11.6 -> v0.11.7

* updated rpspotify to 0.12.0

* fix clippy lints

* fix cargo fmt check
  • Loading branch information
SimonStjernholm authored Feb 28, 2024
1 parent d13c701 commit fcf9338
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 54 deletions.
104 changes: 57 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dotenv = "0.15.0"
lazy_static = "1.4.0"
rand = "0.8.5"
regex = "1.5.5"
rspotify = "0.11.6"
rspotify = "0.12.0"
serde_json = "1.0.79"
url = "2.3.1"
serde = "1.0.152"
Expand Down
11 changes: 8 additions & 3 deletions src/commands/play.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ pub async fn play(
.ok_or(ParrotError::Other("failed to fetch playlist"))?;

for url in urls.iter() {
let Ok(queue) = enqueue_track(&call, &QueryType::VideoLink(url.to_string())).await else {
let Ok(queue) =
enqueue_track(&call, &QueryType::VideoLink(url.to_string())).await
else {
continue;
};
update_queue_messages(&ctx.http, &ctx.data, &queue, guild_id).await;
Expand All @@ -194,7 +196,8 @@ pub async fn play(
.ok_or(ParrotError::Other("failed to fetch playlist"))?;

for (idx, url) in urls.into_iter().enumerate() {
let Ok(queue) = insert_track(&call, &QueryType::VideoLink(url), idx + 1).await else {
let Ok(queue) = insert_track(&call, &QueryType::VideoLink(url), idx + 1).await
else {
continue;
};
update_queue_messages(&ctx.http, &ctx.data, &queue, guild_id).await;
Expand Down Expand Up @@ -227,7 +230,9 @@ pub async fn play(
let mut insert_idx = 1;

for (i, url) in urls.into_iter().enumerate() {
let Ok(mut queue) = insert_track(&call, &QueryType::VideoLink(url), insert_idx).await else {
let Ok(mut queue) =
insert_track(&call, &QueryType::VideoLink(url), insert_idx).await
else {
continue;
};

Expand Down
Loading

0 comments on commit fcf9338

Please sign in to comment.