mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove firefox bookmark with no title
This commit is contained in:
parent
9fc0e03b3d
commit
50144ea8f4
1 changed files with 11 additions and 13 deletions
|
|
@ -9,10 +9,10 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
{
|
||||
public class FirefoxBookmarkLoader : IBookmarkLoader
|
||||
{
|
||||
private const string queryAllBookmarks = @"SELECT moz_places.url, moz_bookmarks.title
|
||||
private const string QueryAllBookmarks = @"SELECT moz_places.url, moz_bookmarks.title
|
||||
FROM moz_places
|
||||
INNER JOIN moz_bookmarks ON (
|
||||
moz_bookmarks.fk NOT NULL AND moz_bookmarks.fk = moz_places.id
|
||||
moz_bookmarks.fk NOT NULL AND moz_bookmarks.title NOT NULL AND moz_bookmarks.fk = moz_places.id
|
||||
)
|
||||
ORDER BY moz_places.visit_count DESC
|
||||
";
|
||||
|
|
@ -32,18 +32,16 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
|
||||
// create the connection string and init the connection
|
||||
string dbPath = string.Format(dbPathFormat, PlacesPath);
|
||||
using (var dbConnection = new SQLiteConnection(dbPath))
|
||||
{
|
||||
// Open connection to the database file and execute the query
|
||||
dbConnection.Open();
|
||||
var reader = new SQLiteCommand(queryAllBookmarks, dbConnection).ExecuteReader();
|
||||
using var dbConnection = new SQLiteConnection(dbPath);
|
||||
// Open connection to the database file and execute the query
|
||||
dbConnection.Open();
|
||||
var reader = new SQLiteCommand(QueryAllBookmarks, dbConnection).ExecuteReader();
|
||||
|
||||
// return results in List<Bookmark> format
|
||||
bookmarkList = reader.Select(
|
||||
x => new Bookmark(x["title"] is DBNull ? string.Empty : x["title"].ToString(),
|
||||
x["url"].ToString())
|
||||
).ToList();
|
||||
}
|
||||
// return results in List<Bookmark> format
|
||||
bookmarkList = reader.Select(
|
||||
x => new Bookmark(x["title"] is DBNull ? string.Empty : x["title"].ToString(),
|
||||
x["url"].ToString())
|
||||
).ToList();
|
||||
|
||||
return bookmarkList;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue