//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); }
//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; }
//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); }
//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; }