mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
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:
@@ -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;
|
||||
}
|
||||
@@ -58,3 +58,4 @@ export * from "./readwise";
|
||||
export * from "./storygraph";
|
||||
export * from "./path";
|
||||
export * from "./sidebar";
|
||||
export * from "./cover-search-preferences";
|
||||
|
||||
Reference in New Issue
Block a user