mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-22 17:16:19 -07:00
feat(anime): remember the default Anime Browser source
- Add `anime.defaultSource` with installed-source fallback - Let the source picker save a source or All sources as default
This commit is contained in:
@@ -218,6 +218,8 @@ export interface AnimeBrowserSnapshot {
|
||||
bridge: AnimeBrowserBridgeState;
|
||||
sources: AnimeBrowserSource[];
|
||||
selectedSourceId: string | null;
|
||||
/** Configured `anime.defaultSource`, verbatim; null when unset. */
|
||||
defaultSourceId: string | null;
|
||||
loadFailures: ExtensionLoadFailure[];
|
||||
/** Every extension on disk, whether or not it loaded. */
|
||||
installed: InstalledExtensionView[];
|
||||
@@ -287,6 +289,8 @@ export interface AnimeBrowserAPI {
|
||||
*/
|
||||
updateBridge: () => Promise<AnimeBrowserBridgeState>;
|
||||
selectSource: (sourceId: string) => Promise<void>;
|
||||
/** Persist the source (or `all`) new browser sessions open on. */
|
||||
setDefaultSource: (sourceId: string) => Promise<void>;
|
||||
search: (query: string, page?: number) => Promise<AnimeBrowserSearchResult>;
|
||||
getPopular: (page?: number) => Promise<AnimeBrowserSearchResult>;
|
||||
/** `sourceId` is required after an all-sources search; pass the entry's own. */
|
||||
|
||||
@@ -325,6 +325,7 @@ export interface ResolvedConfig {
|
||||
extensionsDir: string;
|
||||
repos: string[];
|
||||
preferredQuality: string;
|
||||
defaultSource: string;
|
||||
bridgeDir: string;
|
||||
};
|
||||
jimaku: JimakuConfig & {
|
||||
|
||||
@@ -63,6 +63,11 @@ export interface AnimeConfig {
|
||||
repos?: string[];
|
||||
/** Preferred stream label, matched as a substring, e.g. "1080". */
|
||||
preferredQuality?: string;
|
||||
/**
|
||||
* Source id (`<package>:<source>`) selected when the browser opens, or
|
||||
* "all" for every installed source. Empty selects the first installed one.
|
||||
*/
|
||||
defaultSource?: string;
|
||||
/**
|
||||
* Directory holding an M-Extension-Server bundle (java runtime plus server
|
||||
* jar) to run instead of the copy SubMiner downloads. Empty checks the
|
||||
|
||||
Reference in New Issue
Block a user