Ejemplo n.º 1
0
        public int GetPlayingSongIndex()
        {
            if (Library.Broadcast.PlayingSongQueueID == 0)
            {
                return(-1);
            }

            return(CurrentQueue.FindIndex(p_Item => p_Item.QueueID == Library.Broadcast.PlayingSongQueueID));
        }
Ejemplo n.º 2
0
        internal void RemoveSongFromQueue(Int64 p_QueueID)
        {
            lock (CurrentQueue)
            {
                var s_SongIndex = CurrentQueue.FindIndex(p_Item => p_Item.QueueID == p_QueueID);

                if (s_SongIndex == -1)
                {
                    return;
                }

                CurrentQueue.RemoveAt(s_SongIndex);
            }
        }
Ejemplo n.º 3
0
        internal void MoveSong(Int64 p_QueueID, int p_Index)
        {
            lock (CurrentQueue)
            {
                var s_SongIndex = CurrentQueue.FindIndex(p_Item => p_Item.QueueID == p_QueueID);

                if (s_SongIndex == -1)
                {
                    return;
                }

                var s_SongData = CurrentQueue[s_SongIndex];
                CurrentQueue.RemoveAt(s_SongIndex);

                AddToQueue(s_SongData, p_Index);
            }
        }
Ejemplo n.º 4
0
 public int GetInternalIndexForSong(Int64 p_QueueID)
 {
     return(CurrentQueue.FindIndex(p_Item => p_Item.QueueID == p_QueueID));
 }