Exemple #1
0
 void session_EndOfTrack(ISession sender, SessionEventArgs e)
 {
     if (TrackEnded != null)
     {
         TrackEnded(this, new EventArgs());
     }
 }
Exemple #2
0
 void session_DisposeAll(ISession sender, SessionEventArgs e)
 {
     Dispose();
 }
Exemple #3
0
 void session_ConnectionError(ISession sender, SessionEventArgs e)
 {
     if (e == null) throw new ArgumentNullException("e");
     logger.Error("session_connectionError {0}", e.Message);
     Login();
 }
Exemple #4
0
 void spotify_StartPlayback(ISession sender, SessionEventArgs e)
 {
     if (trackPauseTime != DateTime.MinValue)
     {
         trackStartTime = trackStartTime + DateTime.Now.Subtract(trackPauseTime);
         trackPauseTime = DateTime.MinValue;
         playing = true;
         MessageClients(c => c.PlaybackStarted());
     }
 }
Exemple #5
0
 void spotify_StopPlayback(ISession sender, SessionEventArgs e)
 {
     if (trackPauseTime == DateTime.MinValue)
     {
         trackPauseTime = DateTime.Now;
         playing = false;
         MessageClients(c => c.PlaybackEnded());
     }
 }
Exemple #6
0
 void spotify_LoginComplete(ISession sender, SessionEventArgs e)
 {
     loginComplete.Set();
 }
Exemple #7
0
 void spotify_LogoutComplete(ISession sender, SessionEventArgs e)
 {
     // Message about logout.
 }
Exemple #8
0
 void spotify_EndOfTrack(ISession sender, SessionEventArgs e)
 {
     if (playQueue.Count > 0)
     {
         ITrack track = playQueue.Dequeue();
         spotify.PlayerLoad(track);
         spotify.PlayerPlay();
         spotify_SongStarted(spotify, new EventArgs());
     }
     else
     {
         playQueue.Dequeue(true);
     }
 }
Exemple #9
0
        void spotify_EndOfTrack(ISession sender, SessionEventArgs e)
        {
            Console.WriteLine("End Of a track");
            if (playQueue.Count > 0)
            {
                var track = playQueue.Dequeue();
                spotify.PlayerLoad(track);
                spotify.PlayerPlay();
            }
            else
            {
                playQueue.Dequeue(true);
            }

            playing = true;
        }
Exemple #10
0
 void session_DisposeAll(ISession sender, SessionEventArgs e)
 {
     Dispose();
 }
 void session_Exception(ISession sender, SessionEventArgs e)
 {
     logger.Info("session_Exception occurred {0}", e.Message);
 }
 void session_ConnectionError(ISession sender, SessionEventArgs e)
 {
     logger.Error("session_connectionError {0}", e.Message);
     Login();
 }