diff options
| author | Jokler <jokler@protonmail.com> | 2020-01-24 18:29:17 +0100 |
|---|---|---|
| committer | Jokler <jokler@protonmail.com> | 2020-01-29 20:39:27 +0100 |
| commit | 87973e2dd3d28293e661045cde1a5e90bc017613 (patch) | |
| tree | 95d9f2d671e755f152c669f1202a0aabf9e9296c /src/youtube_dl.rs | |
| parent | f8f986f9e17caac8dc246637de1c9063803d2699 (diff) | |
| download | pokebot-87973e2dd3d28293e661045cde1a5e90bc017613.tar.gz pokebot-87973e2dd3d28293e661045cde1a5e90bc017613.zip | |
Initial multibot draft
Diffstat (limited to 'src/youtube_dl.rs')
| -rw-r--r-- | src/youtube_dl.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/youtube_dl.rs b/src/youtube_dl.rs index a917c54..c6012f0 100644 --- a/src/youtube_dl.rs +++ b/src/youtube_dl.rs @@ -1,8 +1,8 @@ +use futures::compat::Future01CompatExt; use std::process::{Command, Stdio}; use tokio_process::CommandExt; -use futures::compat::Future01CompatExt; -use serde::{Serialize, Deserialize}; +use serde::{Deserialize, Serialize}; use log::debug; @@ -13,13 +13,7 @@ pub struct AudioMetadata { } pub async fn get_audio_download_url(uri: String) -> Result<AudioMetadata, String> { - let ytdl_args = [ - "--no-playlist", - "-f", - "bestaudio/best", - "-j", - &uri, - ]; + let ytdl_args = ["--no-playlist", "-f", "bestaudio/best", "-j", &uri]; let mut cmd = Command::new("youtube-dl"); cmd.args(&ytdl_args); |
