Esempio n. 1
0
        public static int PlaylistCount()
        {
            if (SongHelper.playlists == null)
            {
                SongHelper.GetSongs();
            }

            return(playlists.Count);
        }
Esempio n. 2
0
        public static int SongCount()
        {
            if (SongHelper.songs == null)
            {
                SongHelper.GetSongs();
            }

            return(songs.Count);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
        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);
        }
Esempio n. 8
0
        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);
        }