play around with input types
All checks were successful
tests / fmt (push) Successful in 1m11s
tests / clippy (push) Successful in 2m24s
tests / pre-commit (push) Successful in 2m23s
tests / build (push) Successful in 2m36s
tests / test (push) Successful in 2m40s

This commit is contained in:
2024-06-27 19:59:15 +02:00
parent 8985945659
commit 3242f23f84

View File

@@ -4,6 +4,7 @@ use crate::state::State;
use crate::{colors, db};
use serde::{Deserialize, Serialize};
use songbird::input::cached::Memory;
use songbird::input::{Compose, YoutubeDl};
use songbird::tracks::Track;
use std::io::{BufRead, BufReader};
@@ -183,6 +184,8 @@ pub(crate) async fn play(
let mut src = YoutubeDl::new(reqwest::Client::new(), url.clone());
let src_copy = src.clone();
let src_copy2 = src.clone();
let _m = Memory::new(src_copy2.into());
let track: Track = src_copy.into();
if let Ok(metadata) = src.aux_metadata().await {