From a90177fd93d29e19129aec40238700e0d443abc8 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 31 Mar 2026 17:22:18 -0400 Subject: [PATCH] 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 --- ame-log-parser.js | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/ame-log-parser.js b/ame-log-parser.js index a1ed4fe..1631ab4 100644 --- a/ame-log-parser.js +++ b/ame-log-parser.js @@ -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//Documents/Adobe/Adobe Media Encoder// - * Windows log path: C:\Users\\Documents\Adobe\Adobe Media Encoder\\ + * Log file locations and names vary by platform: + * + * Windows: + * - Path: C:\Users\\Documents\Adobe\Adobe Media Encoder\\ + * - Files: AMEEncodingLog.txt, AMEEncodingErrorLog.txt + * - Encoding: UTF-16 LE with BOM + * + * macOS: + * - Path: /Users//Documents/Adobe/Adobe Media Encoder//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)) {