Fix Windows mpv logging and add log export (#88)

This commit is contained in:
2026-05-26 00:31:38 -07:00
committed by GitHub
parent 43ebc7d371
commit 11c196821d
150 changed files with 2748 additions and 582 deletions
+12 -3
View File
@@ -14,6 +14,10 @@ type ExtensionCopyResult = {
copied: boolean;
};
type ExtensionCopyOptions = {
platform?: NodeJS.Platform;
};
const asyncExtensionCopyInFlight = new Map<string, Promise<ExtensionCopyResult>>();
function readManifestVersion(manifestPath: string): string | null {
@@ -142,8 +146,12 @@ export function shouldCopyYomitanExtension(sourceDir: string, targetDir: string)
return sourceHash === null || targetHash === null || sourceHash !== targetHash;
}
export function ensureExtensionCopy(sourceDir: string, userDataPath: string): ExtensionCopyResult {
if (process.platform === 'win32') {
export function ensureExtensionCopy(
sourceDir: string,
userDataPath: string,
options?: ExtensionCopyOptions,
): ExtensionCopyResult {
if ((options?.platform ?? process.platform) === 'win32') {
return { targetDir: sourceDir, copied: false };
}
@@ -167,8 +175,9 @@ export function ensureExtensionCopy(sourceDir: string, userDataPath: string): Ex
export async function ensureExtensionCopyAsync(
sourceDir: string,
userDataPath: string,
options?: ExtensionCopyOptions,
): Promise<ExtensionCopyResult> {
if (process.platform === 'win32') {
if ((options?.platform ?? process.platform) === 'win32') {
return { targetDir: sourceDir, copied: false };
}