mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 17:45:37 +00:00
made multithread optional
This commit is contained in:
parent
8cd40687ff
commit
ca35fc7b33
1 changed files with 7 additions and 1 deletions
|
|
@ -66,7 +66,13 @@ class DownloadManager {
|
|||
task.resume()
|
||||
} else if fileExtension == "m3u8" {
|
||||
DispatchQueue.global(qos: .background).async {
|
||||
var ffmpegCommand = ["ffmpeg", "-threads", "0", "-i", url.absoluteString]
|
||||
let multiThreads = UserDefaults.standard.bool(forKey: "multiThreads")
|
||||
var ffmpegCommand: [String]
|
||||
if multiThreads {
|
||||
ffmpegCommand = ["ffmpeg", "-threads", "0", "-i", url.absoluteString]
|
||||
} else {
|
||||
ffmpegCommand = ["ffmpeg", "-i", url.absoluteString]
|
||||
}
|
||||
|
||||
if let subtitleURL = subtitleURL {
|
||||
do {
|
||||
|
|
|
|||
Loading…
Reference in a new issue