public string GenerateTemporaryPlayList(List <AnimeEpisodeVM> episodes) { try { List <VideoDetailedVM> vids = new List <VideoDetailedVM>(); foreach (AnimeEpisodeVM ep in episodes) { if (ep.FilesForEpisode.Count > 0) { VideoDetailedVM vid = GetAutoFileForEpisode(ep); if (vid != null) { vids.Add(vid); recentlyPlayedFiles[vid.VideoLocalID] = vid.ToVideoInfo(false); } } } return(GenerateTemporaryPlayList(vids)); } catch (Exception ex) { logger.ErrorException(ex.ToString(), ex); } return(string.Empty); }
public void PlayVideo(VideoDetailedVM vid, bool forcebegining) { try { IVideoPlayer player = ResolvePlayer(); if (player == null) { throw new Exception("Please configure a Video Player"); } VideoInfo info = vid.ToVideoInfo(forcebegining); recentlyPlayedFiles[info.VideoLocalId] = info; player.Play(info); } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }
public void PlayVideo(VideoDetailedVM vid,bool forcebegining) { try { IVideoPlayer player = ResolvePlayer(); if (player == null) throw new Exception("Please configure a Video Player"); VideoInfo info = vid.ToVideoInfo(forcebegining); recentlyPlayedFiles[info.VideoLocalId] = info; player.Play(info); } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }