Refactor: separate Spotify API from player logic

The separation is not perfect yet, but it's a start and makes the entire codebase much easier to read.
This commit is contained in:
Henrik Friedrichsen
2021-08-23 22:15:54 +02:00
parent 3b0586b46a
commit faad362f55
15 changed files with 583 additions and 486 deletions

View File

@@ -213,7 +213,7 @@ impl CommandManager {
Ok(None)
}
Command::NewPlaylist(name) => {
match self.spotify.create_playlist(name, None, None) {
match self.spotify.api.create_playlist(name, None, None) {
Some(_) => self.library.update_library(),
None => error!("could not create playlist {}", name),
}