public void Play() { if (!playlist.Any()) { Console.WriteLine("There are no items on the playlist. Please load some."); return; } MediaEntity currentPlaylistItem = playlist.ElementAtOrDefault(currentIndex); if (currentPlaylistItem == null) { Console.WriteLine("The item was not found!"); return; } Console.WriteLine("Started playing {0}.{1}", currentPlaylistItem.Title, currentPlaylistItem.FileExtention); }
public void Add(MediaEntity media) { this.availableMedia.Add(media); }
public void Load(MediaEntity media) { this.playlist.Add(media); Console.WriteLine("Loaded {0}.{1}", media.Title, media.FileExtention); }