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:
parent
f7f42351b9
commit
a90177fd93
1 changed files with 27 additions and 8 deletions
|
|
@ -1,12 +1,20 @@
|
|||
/**
|
||||
* AME Log Parser Module
|
||||
*
|
||||
* Parses Adobe Media Encoder's AMEEncodingLog.txt and AMEEncodingErrorLog.txt
|
||||
* to extract encoding stats: completion status, encoding time, source/output files,
|
||||
* presets, codec info, and errors.
|
||||
* Parses Adobe Media Encoder's encoding logs to extract encoding stats:
|
||||
* completion status, encoding time, source/output files, presets, codec info, and errors.
|
||||
*
|
||||
* macOS log path: /Users/<user>/Documents/Adobe/Adobe Media Encoder/<version>/
|
||||
* Windows log path: C:\Users\<user>\Documents\Adobe\Adobe Media Encoder\<version>\
|
||||
* Log file locations and names vary by platform:
|
||||
*
|
||||
* 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):
|
||||
* ────────────────────────────────────
|
||||
|
|
@ -276,9 +284,20 @@ function readAMELogs(logDir) {
|
|||
|
||||
if (!logDir || !fs.existsSync(logDir)) return result;
|
||||
|
||||
// Find log files
|
||||
const encodingLogPath = path.join(logDir, 'AMEEncodingLog.txt');
|
||||
const errorLogPath = path.join(logDir, 'AMEEncodingErrorLog.txt');
|
||||
// Find log files — handle both Windows and macOS naming conventions
|
||||
// Windows: AMEEncodingLog.txt, 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
|
||||
if (fs.existsSync(encodingLogPath)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue