コード例 #1
0
        //Returns VideoInfo List (Shared by both audio and video models)
        public static IEnumerable <VideoInfo> GetVideoInfos(YouTubeModel model)
        {
            //Get the available video formats.
            IEnumerable <VideoInfo> videoInfos = DownloadUrlResolver.GetDownloadUrls(model.Link);

            return(videoInfos);
        }
コード例 #2
0
        //Returns filepath string (Shared by both models)
        public static string GetPath(YouTubeModel model)
        {
            //Decrypts Video if necessary
             if (model.Video.RequiresDecryption)
                 DownloadUrlResolver.DecryptDownloadUrl(model.Video);

             //Remove illegal characters from video.Title
             string title = model.Video.Title;
             string cleanTitle = CleanFileName(title);

             //Set FilePath property
             string path = Path.Combine(model.FolderPath, cleanTitle);
             return path;
        }
コード例 #3
0
        //Returns filepath string (Shared by both models)
        public static string GetPath(YouTubeModel model)
        {
            //Decrypts Video if necessary
            if (model.Video.RequiresDecryption)
            {
                DownloadUrlResolver.DecryptDownloadUrl(model.Video);
            }


            //Remove illegal characters from video.Title
            string title      = model.Video.Title;
            string cleanTitle = CleanFileName(title);


            //Set FilePath property
            string path = Path.Combine(model.FolderPath, cleanTitle);

            return(path);
        }
コード例 #4
0
 //Returns VideoInfo List (Shared by both audio and video models)
 public static IEnumerable<VideoInfo> GetVideoInfos(YouTubeModel model)
 {
     //Get the available video formats.
      IEnumerable<VideoInfo> videoInfos = DownloadUrlResolver.GetDownloadUrls(model.Link);
      return videoInfos;
 }