feat(cover): let users pick the default provider for cover search

Cover search always opened on DuckDuckGo, so anyone who prefers another source had to switch it by
hand for every book. Store the choice per user and apply it when the drawer opens. Cache the value
client-side so the drawer never waits on a request to become usable, and save it to the account
rather than the device so it reaches the iOS client too. AudiobookCovers is not offered as a
default because it only returns results for audiobooks.

Closes #983
This commit is contained in:
neon
2026-08-11 20:02:49 +00:00
parent 37c3f3acd2
commit 7afc128bcb
13 changed files with 529 additions and 17 deletions
@@ -0,0 +1,9 @@
export const COVER_SEARCH_DEFAULT_PROVIDERS = ["duckduckgo", "itunes", "all"] as const;
export type CoverSearchDefaultProvider = (typeof COVER_SEARCH_DEFAULT_PROVIDERS)[number];
export const DEFAULT_COVER_SEARCH_PROVIDER: CoverSearchDefaultProvider = "duckduckgo";
export interface CoverSearchPreferences {
defaultProvider: CoverSearchDefaultProvider;
}
+1
View File
@@ -58,3 +58,4 @@ export * from "./readwise";
export * from "./storygraph";
export * from "./path";
export * from "./sidebar";
export * from "./cover-search-preferences";