Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
Download known and possible unknown inline videos.
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneszab committed Dec 4, 2018
1 parent 8e80ea4 commit c7bbfc3
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,9 @@ private void AddVideoUrlToDownloadList(Post post)
//var videoUrls = new HashSet<string>();

AddInlineVideoUrl(postCopy);
//AddInlineTumblrVideoUrl(videoUrls, post, new Regex("\"(https?://ve.media.tumblr.com/(tumblr_[\\w]*))"));
//AddInlineTumblrVideoUrl(videoUrls, post, new Regex("\"(https?://vtt.tumblr.com/(tumblr_[\\w]*))"));
AddInlineTumblrVideoUrl(postCopy, new Regex("\"(https?://ve.media.tumblr.com/(tumblr_[\\w]*))"));
AddInlineTumblrVideoUrl(postCopy, new Regex("\"(https?://vtt.tumblr.com/(tumblr_[\\w]*))"));
// TODO: Make generic inline video detection optional
AddGenericInlineVideoUrl(postCopy);

//AddInlineVideoUrlsToDownloader(videoUrls, postCopy);
Expand Down Expand Up @@ -486,7 +487,7 @@ private void AddInlineVideoUrl(Post post)
AddTumblrVideoUrl(InlineSearch(post));
}

private void AddInlineTumblrVideoUrl(HashSet<string> videoUrls, Post post, Regex regex)
private void AddInlineTumblrVideoUrl(Post post, Regex regex)
{
foreach (Match match in regex.Matches(InlineSearch(post)))
{
Expand All @@ -495,7 +496,7 @@ private void AddInlineTumblrVideoUrl(HashSet<string> videoUrls, Post post, Regex
if (shellService.Settings.VideoSize == 480)
videoUrl += "_480";

videoUrls.Add(videoUrl + ".mp4");
AddToDownloadList(new VideoPost(videoUrl + ".mp4", Guid.NewGuid().ToString("N")));
}
}

Expand Down

0 comments on commit c7bbfc3

Please sign in to comment.