コード例 #1
0
 public string GetPath(ResultData.MediaElement element)
 {
     if (_nameTopicTitle)
     {
         var extension = ".mp4";
         return(_folder + element.topic + "-" + element.title + extension);
     }
     return(_filename);
 }
コード例 #2
0
    public Uri GetUri(ResultData.MediaElement element)
    {
        switch (_quality)
        {
        case Quality.low:
            return(new Uri(element.url_video_low));

        case Quality.medium:
            return(new Uri(element.url_video));

        case Quality.high:
            return(new Uri(element.url_video_low));

        default:
            return(new Uri(element.url_video));
        }
    }
コード例 #3
0
    public void Download(ResultData.MediaElement element, string saveLocation)
    {
        Uri uri = new Uri(element.url_video_hd);

        Download(uri, saveLocation);
    }
コード例 #4
0
 public Task DownloadAsync(ResultData.MediaElement element, MediathekDownloadOptions options)
 {
     return(DownloadAsync(options.GetUri(element), options.GetPath(element)));
 }
コード例 #5
0
 public void Download(ResultData.MediaElement element, MediathekDownloadOptions options)
 {
     Download(options.GetUri(element), options.GetPath(element));
 }
コード例 #6
0
    public Task DownloadAsync(ResultData.MediaElement element, string saveLocation)
    {
        Uri uri = new Uri(element.url_video_hd);

        return(DownloadAsync(uri, saveLocation));
    }