feat: add excludeHidden parameter to search functions for improved filtering

This commit is contained in:
4gray committed 2026-02-10 08:15:46 +01:00
1 parent 6e93ec81fd
commit 639c443416
2 files changed
+6 -2

No files matched your search

@@ -261,6 +261,7 @@ ipcMain.handle(
'DB_SEARCH_CONTENT',
async (event, playlistId: string, searchTerm: string, types: string[], excludeHidden = false) => {
try {
if (!types || types.length === 0) return [];
const db = await getDatabase();
const searchTermLower = searchTerm.toLocaleLowerCase();
const likePatterns = buildLikePatterns(searchTerm);
@@ -325,6 +326,7 @@ ipcMain.handle(
'DB_GLOBAL_SEARCH',
async (event, searchTerm: string, types: string[], excludeHidden = false) => {
try {
if (!types || types.length === 0) return [];
const db = await getDatabase();
const searchTermLower = searchTerm.toLocaleLowerCase();
const likePatterns = buildLikePatterns(searchTerm);
+4 -2
View File
@@ -150,11 +150,13 @@ declare global {
dbSearchContent: (
playlistId: string,
searchTerm: string,
types: string[]
types: string[],
excludeHidden?: boolean
) => Promise<any[]>;
dbGlobalSearch: (
searchTerm: string,
types: string[]
types: string[],
excludeHidden?: boolean
) => Promise<any[]>;
dbGetRecentlyViewed: () => Promise<any[]>;
dbClearRecentlyViewed: () => Promise<{ success: boolean }>;