public static int PlaylistCount() { if (SongHelper.playlists == null) { SongHelper.GetSongs(); } return(playlists.Count); }
public static int SongCount() { if (SongHelper.songs == null) { SongHelper.GetSongs(); } return(songs.Count); }
public bool OnEnable(IRecognitionServer server) { this.server = server; server.GetLogger().Info("Enabling Media.dll Plugin"); server.GetLogger().Info("Updating Song Library"); SongHelper.GetSongs(); commands.Add(new Commands.Play(this)); commands.Add(new Commands.Controls(this)); return(true); }
public static Choices GeneratePlaylistChoices() { if (SongHelper.songs == null) { SongHelper.GetSongs(); } Choices choices = new Choices(); foreach (Playlist p in SongHelper.playlists) { choices.Add(p.Name); } return(choices); }
public static Choices GenerateSongChoices() { if (SongHelper.songs == null) { SongHelper.GetSongs(); } Choices choices = new Choices(); foreach (Song s in SongHelper.songs) { choices.Add(s.Name); } return(choices); }
public static bool PlaySong(String name) { if (SongHelper.songs == null) { SongHelper.GetSongs(); } foreach (Song s in SongHelper.songs) { if (s.Name.ToString().Equals(name)) { SongHelper.Play(s); return(true); } } return(false); }
public static bool PlayRandom() { if (SongHelper.songs == null) { SongHelper.GetSongs(); } if (songs.Count == 0) { return(false); } Random rand = new Random(); SongHelper.Play(SongHelper.songs, (Int32)rand.Next(songs.Count - 1)); return(true); }
public static bool PlayPlaylist(String name) { if (SongHelper.songs == null) { SongHelper.GetSongs(); } foreach (Playlist p in SongHelper.playlists) { if (p.Name.ToString().Equals(name)) { SongHelper.Playlist(p); return(true); } } return(false); }