Skip to content

Commit 8030519

Browse files
committed
Remove unnecessary stuff
1 parent 0bb2314 commit 8030519

File tree

1 file changed

+1
-41
lines changed

1 file changed

+1
-41
lines changed

src/download.rs

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -213,47 +213,7 @@ fn download(req: Client, song_uri: String, arguments: &Arguments, is_track: bool
213213
.unwrap();
214214
logging(Severities::DEBUG, format!("{:?}",command));
215215
add_metadata(song, &mut temp_dir, &download_dir);
216-
// mp3cat magic
217-
/*let mut arguments: Vec<String> = Vec::new();
218-
download_dir.push(format!("{}.mp3",sanitize_song_name(&song.name)));
219-
220-
let mut audio = 0;
221-
while audio < song.audio_file_count {
222-
let mut a = temp_dir.clone();
223-
a.push(format!("{}.mp3", audio));
224-
arguments.push(a.to_str().unwrap().to_string());
225-
audio = audio + 1;
226-
}
227-
let command = Command::new("mp3cat")
228-
//.arg(download_dir.to_str().unwrap())
229-
.args(&arguments)
230-
.arg("-o")
231-
.arg(download_dir.to_str().unwrap())
232-
.arg("-q")
233-
.arg("-f")
234-
.spawn();//.expect("Failed to execute cmd message");
235-
match command {
236-
Ok(mut child) => {
237-
match child.wait() {
238-
Ok(_) => {
239-
add_metadata(song, &mut temp_dir, &download_dir);
240-
},
241-
Err(_) => {
242-
logging(Severities::WARNING, "Error occured while running command, skipping ID3 tags");
243-
}
244-
}
245-
},
246-
Err(err) => {
247-
println!("{}",err.to_string());
248-
if err.to_string().contains("The filename or extension is too long") {
249-
logging(Severities::CRITICAL, "Song too long");
250-
} else {
251-
logging(Severities::CRITICAL, format!("Failed to execute cmd command, make sure the mp3cat file is in the same folder as the scdownload.exe, if that doesn't work, please contact the developer with this message : {:?}",err));
252-
return;
253-
}
254-
}
255-
}*/
256-
}
216+
}
257217
FileType::M4S => {
258218
let mut buffer = Vec::new();
259219
let mut path = temp_dir.clone();

0 commit comments

Comments
 (0)