try to debug song loading

This commit is contained in:
Gabriel Fontes
2022-01-28 14:47:37 -03:00
parent 2300e44554
commit 042dbb71a6
3 changed files with 3 additions and 5 deletions

2
Cargo.lock generated
View File

@@ -486,7 +486,7 @@ dependencies = [
[[package]] [[package]]
name = "disconic" name = "disconic"
version = "0.1.2-pre.1" version = "0.1.2-pre.2"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"dotenv", "dotenv",

View File

@@ -1,7 +1,7 @@
[package] [package]
name = "disconic" name = "disconic"
description = "Discord bot for interacting with subsonic music libraries" description = "Discord bot for interacting with subsonic music libraries"
version = "0.1.2-pre.1" version = "0.1.2-pre.2"
authors = [ "Gabriel Fontes <eu@misterio.me>" ] authors = [ "Gabriel Fontes <eu@misterio.me>" ]
edition = "2018" edition = "2018"
homepage = "https://misterio.me" homepage = "https://misterio.me"

View File

@@ -281,11 +281,8 @@ async fn queue_song(
client: &sunk::Client, client: &sunk::Client,
) -> Result<()> { ) -> Result<()> {
let input = load_song(song, client).await?; let input = load_song(song, client).await?;
println!("{:?}", input);
let call = join_channel(&ctx, &msg).await?; let call = join_channel(&ctx, &msg).await?;
println!("{:?}", call);
let mut handler = call.lock().await; let mut handler = call.lock().await;
println!("{:?}", handler);
handler.enqueue_source(input); handler.enqueue_source(input);
let song_info = format!( let song_info = format!(
@@ -337,5 +334,6 @@ async fn join_channel(
async fn load_song(song: &Song, client: &sunk::Client) -> Result<Input> { async fn load_song(song: &Song, client: &sunk::Client) -> Result<Input> {
let url = song.stream_url(&client)?; let url = song.stream_url(&client)?;
println!("{:?}", url);
Ok(songbird::ffmpeg(url).await?) Ok(songbird::ffmpeg(url).await?)
} }