feat: enhance media engine settings with cookie extraction and update checks

- Added `mediaCookieSource` to `AppSettings` to let users choose the browser for cookie extraction.
- Refactored `EngineSettingsPane` to display `yt-dlp` and `ffmpeg` statuses.
- Added a manual 'Check for Updates' button with UI loading feedback.
- Passed `--cookies-from-browser` to both metadata extraction and download engines if configured.
- Added `--ignore-no-formats-error` to `yt-dlp` metadata extraction to prevent crashes on restricted videos.
This commit is contained in:
nimbold
2026-06-07 12:15:50 +03:30
parent 8831318839
commit a900d97a5c
4 changed files with 127 additions and 3 deletions
+13 -1
View File
@@ -57,7 +57,19 @@ enum MediaExtractionEngine {
let process = Process()
process.executableURL = URL(fileURLWithPath: ytDlpPath)
process.arguments = ["-J", "--no-warnings", url.absoluteString]
var args = ["-J", "--no-warnings", "--ignore-no-formats-error"]
// Add cookies if configured
if let storedData = UserDefaults.standard.data(forKey: "Firelink.AppSettings.v1"),
let json = try? JSONSerialization.jsonObject(with: storedData) as? [String: Any],
let cookieSourceStr = json["mediaCookieSource"] as? String,
cookieSourceStr != "None" {
args.append(contentsOf: ["--cookies-from-browser", cookieSourceStr.lowercased()])
}
args.append(url.absoluteString)
process.arguments = args
let pipe = Pipe()
let errorPipe = Pipe()