public SendDispatcher(AutoQueue <SendPacket> queue, ISender sender, ISendDelivery delivery) { mQueue = queue; mSender = sender; mDelivery = delivery; }
public static void QueueSong(string mp3) { var file = new AudioFile(mp3); var duration = file.Properties.Duration; var song = new Song { Name = Path.GetFileNameWithoutExtension(mp3), Stream = "/" + Path.GetFileName(mp3), Download = "/download/" + Path.GetFileName(mp3), Duration = duration, UserAdded = false }; AutoQueue.Enqueue(song); }
public static Song PlayNextSong() { Song song; if (UserQueue.Any()) { while (!UserQueue.TryDequeue(out song)) { } } else { while (!AutoQueue.TryDequeue(out song)) { } QueueRandomSong(); } NowPlaying = song; return(song); }