fix formatting
This commit is contained in:
parent
91eca478c4
commit
22659046be
3 changed files with 18 additions and 15 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use crate::track::TrackInfo;
|
||||
use std::{path::Path, process::Command};
|
||||
|
||||
use crate::track::TrackInfo;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct DownloadError;
|
||||
|
||||
|
|
@ -14,12 +15,13 @@ pub fn download_from_youtube(url: &str) -> Result<TrackInfo, DownloadError> {
|
|||
"mp3",
|
||||
"--print",
|
||||
"%(id)s",
|
||||
"--no-simulate",
|
||||
url,
|
||||
])
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
if !output.stderr.is_empty() {
|
||||
if !output.stderr.is_empty() || output.stdout.is_empty() {
|
||||
return Err(DownloadError);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue