diff options
Diffstat (limited to 'src/connection.rs')
| -rwxr-xr-x | src/connection.rs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/connection.rs b/src/connection.rs index a929385..1ec76ae 100755 --- a/src/connection.rs +++ b/src/connection.rs @@ -160,16 +160,9 @@ impl Connection { } /// Push all songs of a playlist into queue - pub fn push_playlist(&mut self, playlist: &str) -> Result<()> { - let songs: Vec<Song> = self.conn.playlist(playlist)?; - - for song in songs { - if self.songs_filenames.contains(&song.file) { - let song = self.get_song_with_only_filename(&song.file); - self.conn.push(&song)?; - self.conn.play()?; - } - } + pub fn load_playlist(&mut self, playlist: &str) -> Result<()> { + self.conn.load(playlist, ..)?; + self.conn.play()?; Ok(()) } |
