コード例 #1
0
ファイル: VideoHandler.cs プロジェクト: RickDB/jmmclient
        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);
        }
コード例 #2
0
ファイル: VideoHandler.cs プロジェクト: RickDB/jmmclient
 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);
     }
 }
コード例 #3
0
ファイル: VideoHandler.cs プロジェクト: maxpiva/jmmclient
 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);
     }
 }