2023-02-03 09:07:33 +00:00
|
|
|
|
using System.Collections.Generic;
|
2023-02-03 09:29:51 +00:00
|
|
|
|
using System.IO;
|
2023-02-03 05:07:46 +00:00
|
|
|
|
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
|
|
|
|
|
|
2024-04-16 07:00:19 +00:00
|
|
|
|
namespace Flow.Launcher.Plugin.BrowserBookmark;
|
|
|
|
|
|
|
|
|
|
|
|
public class CustomFirefoxBookmarkLoader : FirefoxBookmarkLoaderBase
|
2023-02-03 05:07:46 +00:00
|
|
|
|
{
|
2024-04-16 07:00:19 +00:00
|
|
|
|
public CustomFirefoxBookmarkLoader(CustomBrowser browser)
|
2023-02-03 05:07:46 +00:00
|
|
|
|
{
|
2024-04-16 07:00:19 +00:00
|
|
|
|
BrowserName = browser.Name;
|
|
|
|
|
|
BrowserDataPath = browser.DataDirectoryPath;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Path to places.sqlite
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string BrowserDataPath { get; init; }
|
2023-02-03 05:07:46 +00:00
|
|
|
|
|
2024-04-16 07:00:19 +00:00
|
|
|
|
public string BrowserName { get; init; }
|
|
|
|
|
|
|
|
|
|
|
|
public override List<Bookmark> GetBookmarks()
|
|
|
|
|
|
{
|
|
|
|
|
|
return GetBookmarksFromPath(Path.Combine(BrowserDataPath, "places.sqlite"));
|
2023-02-03 05:07:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|