@@ -1,6 +1,7 @@
use std::str::FromStr;
use core::spotify_id::SpotifyId;
use std::sync::mpsc::Sender;
+use player::PlayerEvent;
#[derive(Clone, Copy, Debug, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub enum Bitrate {
@@ -27,22 +28,6 @@ impl Default for Bitrate {
}
-#[derive(Debug, Clone)]
-pub enum PlayerEvent {
- Started {
- track_id: SpotifyId,
- },
-
- Changed {
- old_track_id: SpotifyId,
- new_track_id: SpotifyId,
- Stopped {
- }
-}
#[derive(Clone, Debug)]
pub struct PlayerConfig {
pub bitrate: Bitrate,
@@ -8,7 +8,7 @@ use std::sync::mpsc::{RecvError, TryRecvError, RecvTimeoutError};
use std::thread;
use std::time::Duration;
-use config::{Bitrate, PlayerConfig, PlayerEvent};
+use config::{Bitrate, PlayerConfig};
use core::session::Session;
@@ -42,6 +42,23 @@ enum PlayerCommand {
Seek(u32),
+#[derive(Debug, Clone)]
+pub enum PlayerEvent {
+ Started {
+ track_id: SpotifyId,
+ },
+
+ Changed {
+ old_track_id: SpotifyId,
+ new_track_id: SpotifyId,
+ Stopped {
+ }
+}
impl Player {
pub fn new<F>(config: PlayerConfig, session: Session,
audio_filter: Option<Box<AudioFilter + Send>>,
@@ -1,7 +1,7 @@
use std::process::Command;
use std::sync::mpsc::{channel, Sender};
-use librespot::playback::config::PlayerEvent;
+use librespot::playback::player::PlayerEvent;
fn run_program(program: &str, args: Vec<String>) {
info!("Running {}", program);