mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-11 17:16:18 -07:00
refactor(main): split main.ts into focused runtime modules (#123)
This commit is contained in:
@@ -180,6 +180,21 @@ export function detectInstalledFirstRunPluginCandidates(options: {
|
||||
return candidates;
|
||||
}
|
||||
|
||||
export function detectWindowsMpvPluginRemovalCandidates(options: {
|
||||
homeDir: string;
|
||||
appDataDir: string;
|
||||
mpvExecutablePath: string;
|
||||
existsSync?: (candidate: string) => boolean;
|
||||
}): InstalledFirstRunPluginCandidate[] {
|
||||
return detectInstalledFirstRunPluginCandidates({
|
||||
platform: 'win32',
|
||||
homeDir: options.homeDir,
|
||||
appDataDir: options.appDataDir,
|
||||
mpvExecutablePath: options.mpvExecutablePath,
|
||||
existsSync: options.existsSync,
|
||||
});
|
||||
}
|
||||
|
||||
function parseInstalledPluginVersion(content: string): string | null {
|
||||
const match = content.match(/\bversion\s*=\s*["']([^"']+)["']/);
|
||||
return match?.[1] ?? null;
|
||||
|
||||
Reference in New Issue
Block a user