Fix outputs
This commit is contained in:
parent
cc816c1ee2
commit
ffdfb37f9d
2 changed files with 9 additions and 5 deletions
|
@ -34,8 +34,14 @@ impl serenity::framework::standard::Command for List {
|
|||
if playlist.len() == 1 { "song" } else { "songs" }
|
||||
);
|
||||
|
||||
let max_output = 15;
|
||||
|
||||
for (i, song) in playlist.iter().enumerate() {
|
||||
if i < max_output {
|
||||
output += &format!("\t{}.\t{}\n", i + 1, song.name.clone());
|
||||
} else {
|
||||
output += &format!("\t... and {} more", playlist.len() - max_output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -193,10 +193,10 @@ impl MediaData {
|
|||
if playlist.is_empty() {
|
||||
return false;
|
||||
} else {
|
||||
let first = playlist.remove(0);
|
||||
|
||||
handler.stop();
|
||||
|
||||
let first = playlist.remove(0);
|
||||
|
||||
let source = match ffmpeg(first.name.clone()) {
|
||||
Ok(mpeg) => mpeg,
|
||||
Err(_) => {
|
||||
|
@ -216,8 +216,6 @@ impl MediaData {
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
fn set_song() {}
|
||||
}
|
||||
|
||||
impl Default for MediaData {
|
||||
|
|
Loading…
Reference in a new issue