mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-07 19:21:32 -07:00
ee08512988
- Add `subminer anime` / `--anime` and a tray entry to open a browser that searches installed Aniyomi extension sources, shows cover art and episodes, and plays into mpv with overlay/mining attached - Add an Extensions tab to add repos and install/update/remove sources, and per-source settings for sources needing config - Support searching all sources at once with streaming, per-source results and status - Prefer Japanese audio/subtitle tracks from the source and keep the primary subtitle slot reserved for Japanese - Fix window/tray/Dock handling so the browser and mpv can be switched between without quitting the app or losing the Dock icon - Add anime.repos, anime.extensionsDir, anime.preferredQuality config keys (no bundled repos or discovery)
101 lines
3.6 KiB
TypeScript
101 lines
3.6 KiB
TypeScript
export function createBuildResolveTrayIconPathMainDepsHandler(deps: {
|
|
resolveTrayIconPathRuntime: (options: {
|
|
platform: string;
|
|
resourcesPath: string;
|
|
appPath: string;
|
|
dirname: string;
|
|
joinPath: (...parts: string[]) => string;
|
|
fileExists: (path: string) => boolean;
|
|
}) => string | null;
|
|
platform: string;
|
|
resourcesPath: string;
|
|
appPath: string;
|
|
dirname: string;
|
|
joinPath: (...parts: string[]) => string;
|
|
fileExists: (path: string) => boolean;
|
|
}) {
|
|
return () => ({
|
|
resolveTrayIconPathRuntime: deps.resolveTrayIconPathRuntime,
|
|
platform: deps.platform,
|
|
resourcesPath: deps.resourcesPath,
|
|
appPath: deps.appPath,
|
|
dirname: deps.dirname,
|
|
joinPath: deps.joinPath,
|
|
fileExists: deps.fileExists,
|
|
});
|
|
}
|
|
|
|
export function createBuildTrayMenuTemplateMainDepsHandler<TMenuItem>(deps: {
|
|
buildTrayMenuTemplateRuntime: (handlers: {
|
|
platform?: string;
|
|
openSessionHelp: () => void;
|
|
openChangelog: () => void;
|
|
openTexthookerInBrowser: () => void;
|
|
showTexthookerPage: boolean;
|
|
openFirstRunSetup: () => void;
|
|
showFirstRunSetup: boolean;
|
|
openWindowsMpvLauncherSetup: () => void;
|
|
showWindowsMpvLauncherSetup: boolean;
|
|
openYomitanSettings: () => void;
|
|
openConfigSettings: () => void;
|
|
openSyncUi: () => void;
|
|
openAnimeBrowser: () => void;
|
|
exportLogs: () => void;
|
|
openJellyfinSetup: () => void;
|
|
showJellyfinDiscovery: boolean;
|
|
jellyfinDiscoveryActive: boolean;
|
|
toggleJellyfinDiscovery: (checked: boolean) => void;
|
|
openAnilistSetup: () => void;
|
|
checkForUpdates: () => void;
|
|
quitApp: () => void;
|
|
}) => TMenuItem[];
|
|
initializeOverlayRuntime: () => void;
|
|
isOverlayRuntimeInitialized: () => boolean;
|
|
openSessionHelpModal: () => void;
|
|
openChangelogModal: () => void;
|
|
openTexthookerInBrowser: () => void;
|
|
showTexthookerPage: () => boolean;
|
|
showFirstRunSetup: () => boolean;
|
|
openFirstRunSetupWindow: (force?: boolean) => void;
|
|
showWindowsMpvLauncherSetup: () => boolean;
|
|
openYomitanSettings: () => void;
|
|
openConfigSettingsWindow: () => void;
|
|
openSyncUiWindow: () => void;
|
|
openAnimeBrowserWindow: () => void;
|
|
exportLogs: () => void;
|
|
openJellyfinSetupWindow: () => void;
|
|
isJellyfinConfigured: () => boolean;
|
|
isJellyfinDiscoveryActive: () => boolean;
|
|
toggleJellyfinDiscovery: (checked: boolean) => void | Promise<void>;
|
|
platform?: string;
|
|
openAnilistSetupWindow: () => void;
|
|
checkForUpdates: () => void;
|
|
quitApp: () => void;
|
|
}) {
|
|
return () => ({
|
|
buildTrayMenuTemplateRuntime: deps.buildTrayMenuTemplateRuntime,
|
|
platform: deps.platform,
|
|
initializeOverlayRuntime: deps.initializeOverlayRuntime,
|
|
isOverlayRuntimeInitialized: deps.isOverlayRuntimeInitialized,
|
|
openSessionHelpModal: deps.openSessionHelpModal,
|
|
openChangelogModal: deps.openChangelogModal,
|
|
openTexthookerInBrowser: deps.openTexthookerInBrowser,
|
|
showTexthookerPage: deps.showTexthookerPage,
|
|
showFirstRunSetup: deps.showFirstRunSetup,
|
|
openFirstRunSetupWindow: deps.openFirstRunSetupWindow,
|
|
showWindowsMpvLauncherSetup: deps.showWindowsMpvLauncherSetup,
|
|
openYomitanSettings: deps.openYomitanSettings,
|
|
openConfigSettingsWindow: deps.openConfigSettingsWindow,
|
|
openSyncUiWindow: deps.openSyncUiWindow,
|
|
openAnimeBrowserWindow: deps.openAnimeBrowserWindow,
|
|
exportLogs: deps.exportLogs,
|
|
openJellyfinSetupWindow: deps.openJellyfinSetupWindow,
|
|
isJellyfinConfigured: deps.isJellyfinConfigured,
|
|
isJellyfinDiscoveryActive: deps.isJellyfinDiscoveryActive,
|
|
toggleJellyfinDiscovery: deps.toggleJellyfinDiscovery,
|
|
openAnilistSetupWindow: deps.openAnilistSetupWindow,
|
|
checkForUpdates: deps.checkForUpdates,
|
|
quitApp: deps.quitApp,
|
|
});
|
|
}
|