public void Enqueue(MusicItem item)
 {
     lock (this.QueueInternal) {
         if (this.RepeatMode == RepeatMode.All && this.QueueInternal.Count == 1)
         {
             this.QueueInternal.Insert(0, item);
         }
         else
         {
             this.QueueInternal.Add(item);
         }
     }
 }
        public TimeSpan GetTimeBeforeNext()
        {
            lock (this.QueueInternal) {
                if (this.NowPlaying.Track.TrackString == null)
                {
                    return(TimeSpan.Zero);
                }

                var time = this.Player.CurrentState.CurrentTrack.Length - this.Player.CurrentState.PlaybackPosition;
                for (int i = 0; i < QueueInternal.Count - 1; i++)
                {
                    MusicItem track = this.QueueInternal[i];
                    time += track.Track.Length;
                }
                return(time);
            }
        }
 public MusicItemSerializable(MusicItem mi)
 {
     this.Track    = mi.Track.TrackString;
     this.MemberId = mi.RequestedBy.Id;
 }