diff --git a/URLNotesGrabberCORE/DataAccess.cs b/URLNotesGrabberCORE/DataAccess.cs index 99e9490..b288d05 100644 --- a/URLNotesGrabberCORE/DataAccess.cs +++ b/URLNotesGrabberCORE/DataAccess.cs @@ -37,6 +37,7 @@ namespace URLNotesGrabberCORE public string reblogKey; public string reblogName; public string reblogURL; + public string rootURL; public string slug; public string summary; public string tags; @@ -60,6 +61,7 @@ namespace URLNotesGrabberCORE reblogKey = "."; reblogName = "."; reblogURL = "."; + rootURL = "."; slug = "."; summary = "."; tags = "."; diff --git a/URLNotesGrabberCORE/Program.cs b/URLNotesGrabberCORE/Program.cs index 1604dd8..3367d41 100644 --- a/URLNotesGrabberCORE/Program.cs +++ b/URLNotesGrabberCORE/Program.cs @@ -1410,7 +1410,7 @@ if (shouldInsert) DataAccess.AddPost(curDir, long.Parse(reblog.postID), reblog.reblogURL, reblog.date, reblog.postURL, reblog.slug, reblog.reblogKey, reblog.reblogName, reblog.summary, reblog.quote, reblog.body, reblog.tags, reblog.link, reblog.photoURL, reblog.photoCaption, reblog.downloadedFiles, reblog.audioCaption, reblog.question, reblog.answer, - reblog.title, false); + reblog.title, false, rootURL: reblog.rootURL); recordImportStopwatch.Stop(); postsAdded++; @@ -1435,6 +1435,10 @@ if (shouldInsert) { reblog.reblogName = line.Substring(13).Trim(); } + if (line.StartsWith(@"Reblog root url:", StringComparison.OrdinalIgnoreCase)) + { + reblog.rootURL = line.Substring(16).Trim(); + } if (line.StartsWith(@"Downloaded files:", StringComparison.OrdinalIgnoreCase)) { reblog.downloadedFiles = line.Substring(17).Trim(); @@ -1538,7 +1542,7 @@ if (shouldInsert) DataAccess.AddPost(curDir, long.Parse(reblog.postID), reblog.reblogURL, reblog.date, reblog.postURL, reblog.slug, reblog.reblogKey, reblog.reblogName, reblog.summary, reblog.quote, reblog.body, reblog.tags, reblog.link, reblog.photoURL, reblog.photoCaption, reblog.downloadedFiles, reblog.audioCaption, reblog.question, reblog.answer, - reblog.title, true); + reblog.title, true, rootURL: reblog.rootURL); recordImportStopwatch.Stop(); postsAdded++;