Print list of downloaded songs at finished download

This commit is contained in:
hodasemi 2018-11-14 15:42:56 +01:00
parent f2ab6f1314
commit 2d0a2f6497

View file

@ -86,6 +86,18 @@ impl Play {
}
};
let mut info = if source.len() == 1 {
"Finished downloading song:".to_string()
} else {
"Finished downloading songs:".to_string()
};
for song in &source {
info = format!("{}\n\t{}", info, song.name);
}
print_error!(msg.channel_id.say(info));
{
let playlist_mutex = self.media.playlist_mut();
playlist_mutex.borrow_mut().append(&mut source);