transform simple queue to a preserving, more complex kind

this is a pretty big but necessary change and might not be stable yet.

some key points:
- the queue is now responsible for playback controls and track management, as
this was scattered between the queue and spotify objects.
- because the queue is now retained, it should be easier to save it as a
spotify playlist

closes #12
This commit is contained in:
Henrik Friedrichsen
2019-03-06 23:56:11 +01:00
parent c3fcb3ce21
commit 0b14fc5da7
8 changed files with 232 additions and 173 deletions

View File

@@ -1,15 +1,13 @@
use crossbeam_channel::{unbounded, Receiver, Sender, TryIter};
use cursive::{CbFunc, Cursive};
use queue::QueueChange;
use spotify::PlayerStatus;
use track::Track;
use queue::QueueEvent;
use spotify::PlayerEvent;
use ui::playlist::PlaylistEvent;
pub enum Event {
Queue(QueueChange),
PlayerStatus(PlayerStatus),
PlayerTrack(Option<Track>),
Queue(QueueEvent),
Player(PlayerEvent),
Playlist(PlaylistEvent),
}