public int GetPlayingSongIndex() { if (Library.Broadcast.PlayingSongQueueID == 0) { return(-1); } return(CurrentQueue.FindIndex(p_Item => p_Item.QueueID == Library.Broadcast.PlayingSongQueueID)); }
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); } }
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); } }
public int GetInternalIndexForSong(Int64 p_QueueID) { return(CurrentQueue.FindIndex(p_Item => p_Item.QueueID == p_QueueID)); }