Esempio n. 1
0
        public bool Play(int identifier)
        {
            var item = LibraryActor.GetItem(identifier);

            if (item != null)
            {
                NowPlaying = new Playlist();
                var currentItem = NowPlaying.Enqueue(item);
                return(Play(currentItem.Value));
            }
            return(false);
        }
Esempio n. 2
0
        public bool Enqueue(int identifier)
        {
            var item = LibraryActor.GetItem(identifier);

            if (item != null)
            {
                var added = NowPlaying.Enqueue(item);
                if (added.Value != null)
                {
                    if (PlaybackState == PlaybackState.Stopped)
                    {
                        var current = NowPlaying.Forward();
                        return(Play(current.Value));
                    }
                    return(true);
                }
            }
            return(false);
        }