feat: Support macOS Adobe Media Encoder log filenames

Windows AME uses AMEEncodingLog.txt in the version directory.
macOS AME uses Adobe Media Encoder Log.txt in the logs subdirectory.

Updated readAMELogs() to check for both naming conventions:
1. First tries Windows filenames (AMEEncodingLog.txt)
2. Falls back to macOS filenames (Adobe Media Encoder Log.txt)

This allows the job manager to work with either platform.
Also updated docstring to document platform differences in both
log file locations and encoding (Windows uses UTF-16 LE, macOS uses UTF-8).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude 2026-03-31 17:22:18 -04:00
parent f7f42351b9
commit a90177fd93

View file

@ -1,12 +1,20 @@
/** /**
* AME Log Parser Module * AME Log Parser Module
* *
* Parses Adobe Media Encoder's AMEEncodingLog.txt and AMEEncodingErrorLog.txt * Parses Adobe Media Encoder's encoding logs to extract encoding stats:
* to extract encoding stats: completion status, encoding time, source/output files, * completion status, encoding time, source/output files, presets, codec info, and errors.
* presets, codec info, and errors.
* *
* macOS log path: /Users/<user>/Documents/Adobe/Adobe Media Encoder/<version>/ * Log file locations and names vary by platform:
* Windows log path: C:\Users\<user>\Documents\Adobe\Adobe Media Encoder\<version>\ *
* Windows:
* - Path: C:\Users\<user>\Documents\Adobe\Adobe Media Encoder\<version>\
* - Files: AMEEncodingLog.txt, AMEEncodingErrorLog.txt
* - Encoding: UTF-16 LE with BOM
*
* macOS:
* - Path: /Users/<user>/Documents/Adobe/Adobe Media Encoder/<version>/logs/
* - Files: Adobe Media Encoder Log.txt, Adobe Media Encoder Error Log.txt
* - Encoding: UTF-8 (usually)
* *
* AME log format (typical entry): * AME log format (typical entry):
* *
@ -276,9 +284,20 @@ function readAMELogs(logDir) {
if (!logDir || !fs.existsSync(logDir)) return result; if (!logDir || !fs.existsSync(logDir)) return result;
// Find log files // Find log files — handle both Windows and macOS naming conventions
const encodingLogPath = path.join(logDir, 'AMEEncodingLog.txt'); // Windows: AMEEncodingLog.txt, AMEEncodingErrorLog.txt
const errorLogPath = path.join(logDir, 'AMEEncodingErrorLog.txt'); // macOS: Adobe Media Encoder Log.txt, Adobe Media Encoder Error Log.txt
let encodingLogPath = path.join(logDir, 'AMEEncodingLog.txt');
if (!fs.existsSync(encodingLogPath)) {
// Try macOS naming
encodingLogPath = path.join(logDir, 'Adobe Media Encoder Log.txt');
}
let errorLogPath = path.join(logDir, 'AMEEncodingErrorLog.txt');
if (!fs.existsSync(errorLogPath)) {
// Try macOS naming
errorLogPath = path.join(logDir, 'Adobe Media Encoder Error Log.txt');
}
// Parse encoding log // Parse encoding log
if (fs.existsSync(encodingLogPath)) { if (fs.existsSync(encodingLogPath)) {