Fixed pulling of notes when API returns NULL
This commit is contained in:
@@ -109,6 +109,7 @@ namespace URLNotesGrabberCORE
|
||||
connection.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddPost(string blogName, long postID, string reblogURL, string postDate, string postURL, string slug, string reblogKey, string reblogName, string summary, string quote, string body, string tags, string link, string photoURL, string photoCaption, string downloadedFiles, string audioCaption, string question, string answer, string title, bool hasImage, string DBPath = @"TL.db")
|
||||
{
|
||||
try { AddBlog(blogName, DBPath); } catch { }
|
||||
@@ -208,7 +209,6 @@ namespace URLNotesGrabberCORE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static bool AddNote(string rootBlogName, string noteBlogName, long postID, long timestamp, string type, string DBPath = @"TL.db")
|
||||
{
|
||||
//try { AddPost(rootBlogName, postID, DBPath); } catch { }
|
||||
@@ -323,6 +323,7 @@ namespace URLNotesGrabberCORE
|
||||
}
|
||||
return posts;
|
||||
}
|
||||
|
||||
public static List<Tuple<string, long>> GetReplies(string DBPath = @"TL.db")
|
||||
{
|
||||
SQLiteConnection connection = new SQLiteConnection("Data Source=" + DBPath);
|
||||
@@ -365,7 +366,6 @@ namespace URLNotesGrabberCORE
|
||||
return posts;
|
||||
}
|
||||
|
||||
|
||||
public static int GetAPICount(string DBPath = @"TL.db")
|
||||
{
|
||||
SQLiteConnection connection = new SQLiteConnection("Data Source=" + DBPath);
|
||||
@@ -407,7 +407,6 @@ namespace URLNotesGrabberCORE
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
public static List<string> GetBlogs(bool reblogsOnly, int from, int to, int top, string DBPath = @"TL.db")
|
||||
{
|
||||
SQLiteConnection connection = new SQLiteConnection("Data Source=" + DBPath);
|
||||
@@ -447,7 +446,6 @@ namespace URLNotesGrabberCORE
|
||||
return blogs;
|
||||
}
|
||||
|
||||
|
||||
public static List<string> GetBlogsAll(bool reblogsOnly, int from, int to, int top, string DBPath = @"TL.db")
|
||||
{
|
||||
SQLiteConnection connection = new SQLiteConnection("Data Source=" + DBPath);
|
||||
@@ -515,7 +513,6 @@ namespace URLNotesGrabberCORE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void UpdatePostMarkNotFound(string blogName, long postID, string DBPath = @"TL.db")
|
||||
{
|
||||
SQLiteConnection connection = new SQLiteConnection("Data Source=" + DBPath);
|
||||
@@ -540,7 +537,6 @@ namespace URLNotesGrabberCORE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void UpdatePostSetDate(string blogName, long postID, string postDate, string DBPath = @"TL.db")
|
||||
{
|
||||
SQLiteConnection connection = new SQLiteConnection("Data Source=" + DBPath);
|
||||
@@ -565,7 +561,6 @@ namespace URLNotesGrabberCORE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static bool UpdateNote(string rootBlogName, string noteBlogName, long postID, long timestamp, string type, string DBPath = @"TL.db")
|
||||
{
|
||||
//try { AddPost(rootBlogName, postID, DBPath); } catch { }
|
||||
@@ -600,7 +595,6 @@ namespace URLNotesGrabberCORE
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static void UpdatePost(string blogName, long postID, string reblogURL, string postDate, string postURL, string slug, string reblogKey, string reblogName, string summary, string quote, string body, string tags, string link, string photoURL, string photoCaption, string downloadedFiles, string audioCaption, string question, string answer, string title, bool hasImage, string DBPath = @"TL.db")
|
||||
{
|
||||
SQLiteConnection connection = new SQLiteConnection("Data Source=" + DBPath);
|
||||
@@ -646,7 +640,6 @@ namespace URLNotesGrabberCORE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateBlogOutput(string blogName, string DBPath = @"TL.db")
|
||||
{
|
||||
SQLiteConnection connection = new SQLiteConnection("Data Source=" + DBPath);
|
||||
@@ -671,7 +664,6 @@ namespace URLNotesGrabberCORE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static int UpdateAPICount(string DBPath = @"TL.db")
|
||||
{
|
||||
SQLiteConnection connection = new SQLiteConnection("Data Source=" + DBPath);
|
||||
|
||||
Reference in New Issue
Block a user