1
- using Flow . Launcher . Plugin . BrowserBookmark . Models ;
2
- using Microsoft . Data . Sqlite ;
3
- using System ;
1
+ using System ;
4
2
using System . Collections . Generic ;
5
3
using System . IO ;
6
4
using System . Linq ;
7
- using Flow . Launcher . Infrastructure . Logger ;
5
+ using Flow . Launcher . Plugin . BrowserBookmark . Models ;
6
+ using Microsoft . Data . Sqlite ;
8
7
9
8
namespace Flow . Launcher . Plugin . BrowserBookmark ;
10
9
11
10
public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
12
11
{
12
+ private static readonly string ClassName = nameof ( FirefoxBookmarkLoaderBase ) ;
13
+
13
14
private readonly string _faviconCacheDir ;
14
15
15
16
protected FirefoxBookmarkLoaderBase ( )
@@ -52,7 +53,7 @@ protected List<Bookmark> GetBookmarksFromPath(string placesPath)
52
53
}
53
54
catch ( Exception ex )
54
55
{
55
- Log . Exception ( $ "Failed to register Firefox bookmark file monitoring: { placesPath } ", ex ) ;
56
+ Main . _context . API . LogException ( ClassName , $ "Failed to register Firefox bookmark file monitoring: { placesPath } ", ex ) ;
56
57
}
57
58
58
59
// Use a copy to avoid lock issues with the original file
@@ -93,12 +94,12 @@ protected List<Bookmark> GetBookmarksFromPath(string placesPath)
93
94
}
94
95
catch ( Exception ex )
95
96
{
96
- Log . Exception ( $ "Failed to delete temporary favicon DB: { tempDbPath } ", ex ) ;
97
+ Main . _context . API . LogException ( ClassName , $ "Failed to delete temporary favicon DB: { tempDbPath } ", ex ) ;
97
98
}
98
99
}
99
100
catch ( Exception ex )
100
101
{
101
- Log . Exception ( $ "Failed to load Firefox bookmarks: { placesPath } ", ex ) ;
102
+ Main . _context . API . LogException ( ClassName , $ "Failed to load Firefox bookmarks: { placesPath } ", ex ) ;
102
103
}
103
104
104
105
return bookmarks ;
@@ -177,7 +178,7 @@ ORDER BY i.width DESC -- Select largest icon available
177
178
}
178
179
catch ( Exception ex )
179
180
{
180
- Log . Exception ( $ "Failed to extract Firefox favicon: { bookmark . Url } ", ex ) ;
181
+ Main . _context . API . LogException ( ClassName , $ "Failed to extract Firefox favicon: { bookmark . Url } ", ex ) ;
181
182
}
182
183
}
183
184
@@ -192,12 +193,12 @@ ORDER BY i.width DESC -- Select largest icon available
192
193
}
193
194
catch ( Exception ex )
194
195
{
195
- Log . Exception ( $ "Failed to delete temporary favicon DB: { tempDbPath } ", ex ) ;
196
+ Main . _context . API . LogException ( ClassName , $ "Failed to delete temporary favicon DB: { tempDbPath } ", ex ) ;
196
197
}
197
198
}
198
199
catch ( Exception ex )
199
200
{
200
- Log . Exception ( $ "Failed to load Firefox favicon DB: { faviconDbPath } ", ex ) ;
201
+ Main . _context . API . LogException ( ClassName , $ "Failed to load Firefox favicon DB: { faviconDbPath } ", ex ) ;
201
202
}
202
203
}
203
204
@@ -218,7 +219,7 @@ private static void SaveBitmapData(byte[] imageData, string outputPath)
218
219
}
219
220
catch ( Exception ex )
220
221
{
221
- Log . Exception ( $ "Failed to save image: { outputPath } ", ex ) ;
222
+ Main . _context . API . LogException ( ClassName , $ "Failed to save image: { outputPath } ", ex ) ;
222
223
}
223
224
}
224
225
}
0 commit comments