Improve path settings, add icons

This commit is contained in:
Christoph Hagen
2025-12-20 12:06:59 +01:00
parent 9848de02cb
commit 07ba77e337
15 changed files with 126 additions and 21 deletions

View File

@@ -354,7 +354,7 @@ final class FileResource: Item, LocalizedItem {
}
private func determineVideoType() -> String? {
#warning("TODO: Move ffmpeg path to settings")
let ffmpegPath = content.settings.tools.ffprobePath
switch type {
case .webm:
return "video/webm"
@@ -371,7 +371,7 @@ final class FileResource: Item, LocalizedItem {
let process = Process()
let arguments = "-v error -select_streams v:0 -show_entries stream=codec_tag_string -of default=noprint_wrappers=1:nokey=1 \(path.path())"
.components(separatedBy: " ")
process.launchPath = "/opt/homebrew/bin/ffprobe"
process.launchPath = ffmpegPath
process.arguments = Array(arguments)
let pipe = Pipe()