From 10b605464c9a62ffa4ecb43abfa1864cb06f3094 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Tue, 6 Jan 2026 18:14:07 -0500 Subject: [PATCH] fix: resolve syntax errors in author_menu.go and main.go - Fix unterminated string in author_menu.go line 418 - Fix invalid escape sequences in escapeDrawtextText function - Remove orphaned code outside function body in main.go - Fix extra parentheses causing syntax errors - Ensure clean compilation for successful build --- author_menu.go | 7 +++---- main.go | 6 ------ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/author_menu.go b/author_menu.go index 2d8e3e6..08bcbe4 100644 --- a/author_menu.go +++ b/author_menu.go @@ -415,8 +415,7 @@ func writeSpumuxXML(path, overlayPath, highlightPath, selectPath string, buttons var b strings.Builder b.WriteString("\n") b.WriteString(" \n") - b.WriteString(fmt.Sprintf(" -", + b.WriteString(fmt.Sprintf(" ", escapeXMLAttr(overlayPath), escapeXMLAttr(highlightPath), escapeXMLAttr(selectPath), @@ -475,9 +474,9 @@ func findVTLogoPath() string { } func escapeDrawtextText(text string) string { - escaped := strings.ReplaceAll(text, "\", "\\\\") + escaped := strings.ReplaceAll(text, "\\", "\\\\") escaped = strings.ReplaceAll(escaped, ":", "\\:") - escaped = strings.ReplaceAll(escaped, "'", "\' ") + escaped = strings.ReplaceAll(escaped, "'", "\\'") escaped = strings.ReplaceAll(escaped, "%", "\\%") return escaped } \ No newline at end of file diff --git a/main.go b/main.go index 5413ee5..99b7ec9 100644 --- a/main.go +++ b/main.go @@ -10996,12 +10996,6 @@ func newPlaySession(path string, w, h int, fps, duration float64, targetW, targe unifiedAdapter: unifiedAdapter, } } - if targetW <= 0 { - targetW = 640 - } - if targetH <= 0 { - targetH = int(float64(targetW) * (float64(h) / float64(utils.MaxInt(w, 1)))) - } // Create UnifiedPlayer adapter instead of dual-process player adapter := player.NewUnifiedPlayerAdapter(path, w, h, fps, duration, targetW, targetH, prog, frameFunc, img)