Skip to content

Commit

Permalink
Fix issue #233/#234 Liked/by crawler not working
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas694 committed Apr 19, 2022
1 parent f220b82 commit 9381ef8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/TumblThree/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]
[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.MainAssembly)]
[assembly: AssemblyVersion("2.6.0.0")]
[assembly: AssemblyFileVersion("2.6.0.0")]
[assembly: AssemblyVersion("2.6.1.0")]
[assembly: AssemblyFileVersion("2.6.1.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Threading.Tasks;

using TumblThree.Applications.DataModels;
using TumblThree.Applications.DataModels.TumblrApiJson;
using TumblThree.Applications.DataModels.TumblrPosts;
using TumblThree.Applications.Downloader;
using TumblThree.Applications.Parser;
Expand Down Expand Up @@ -312,8 +313,8 @@ private void AddPhotoUrlToDownloadList(string document)
return;
}

var post = new DataModels.TumblrApiJson.Post() { Date = DateTime.Now.ToString("R"), UnixTimestamp = (int)((DateTimeOffset)DateTime.Now).ToUnixTimeSeconds(), Type = "",
Id = "", Tags = new List<string>(), Slug = "", RegularTitle = "", RebloggedFromName = "", ReblogKey = "", Tumblelog = new DataModels.TumblrApiJson.TumbleLog2() { Name = "" } };
var post = new Post() { Date = DateTime.Now.ToString("R"), DateGmt= DateTime.Now.ToString("R"), UnixTimestamp = (int)((DateTimeOffset)DateTime.Now).ToUnixTimeSeconds(), Type = "",
Id = "", Tags = new List<string>(), Slug = "", RegularTitle = "", RebloggedFromName = "", RebloggedRootName="", ReblogKey = "", Tumblelog = new TumbleLog2() { Name = "" } };
AddTumblrPhotoUrl(document, post);

if (Blog.RegExPhotos)
Expand All @@ -329,7 +330,7 @@ private void AddVideoUrlToDownloadList(string document)
return;
}

var post = new DataModels.TumblrApiJson.Post() { Id = "", Tumblelog = new DataModels.TumblrApiJson.TumbleLog2() { Name = "" },
var post = new Post() { Id = "", Tumblelog = new TumbleLog2() { Name = "" },
UnixTimestamp = (int)((DateTimeOffset)DateTime.Now).ToUnixTimeSeconds() };
AddTumblrVideoUrl(document, post);
AddInlineTumblrVideoUrl(document, TumblrParser.GetTumblrVVideoUrlRegex(), TumblrParser.GetTumblrThumbnailUrlRegex());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ public class Post : ICloneable

public List<string> DownloadedFilenames { get; set; }

public Post()
{
DownloadedUrls = new List<string>();
DownloadedFilenames = new List<string>();
}

public object Clone()
{
return MemberwiseClone();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,12 @@ public class Post : ICloneable

public List<string> DownloadedFilenames { get; private set; }

public Post()
{
DownloadedUrls = new List<string>();
DownloadedFilenames = new List<string>();
}

public object Clone()
{
return MemberwiseClone();
Expand Down

0 comments on commit 9381ef8

Please sign in to comment.