mirror of
https://github.com/cranci1/Sora.git
synced 2026-01-11 20:10:24 +00:00
fixed UI
This commit is contained in:
parent
9bafb790cf
commit
4b4bb0ad7b
2 changed files with 6 additions and 11 deletions
|
|
@ -5,11 +5,11 @@
|
|||
// Created by Francesco on 05/01/25.
|
||||
//
|
||||
|
||||
import JavaScriptCore
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
import AVKit
|
||||
import SwiftUI
|
||||
import Foundation
|
||||
import AVFoundation
|
||||
import JavaScriptCore
|
||||
|
||||
typealias Module = ScrapingModule
|
||||
|
||||
|
|
@ -42,7 +42,6 @@ class JSController: NSObject, ObservableObject {
|
|||
|
||||
func setupContext() {
|
||||
context.setupJavaScriptEnvironment()
|
||||
// Inject async Promise bridge for extractChapters with debug logging
|
||||
let asyncChaptersHelper = """
|
||||
function extractChaptersWithCallback(href, callback) {
|
||||
try {
|
||||
|
|
@ -67,7 +66,6 @@ class JSController: NSObject, ObservableObject {
|
|||
}
|
||||
"""
|
||||
context.evaluateScript(asyncChaptersHelper)
|
||||
// Print JS exceptions to Xcode console
|
||||
context.exceptionHandler = { context, exception in
|
||||
print("[JS Exception]", exception?.toString() ?? "unknown")
|
||||
}
|
||||
|
|
@ -101,10 +99,6 @@ class JSController: NSObject, ObservableObject {
|
|||
self?.processDownloadQueue()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Logger.shared.log("No queued downloads to process or queue is already being processed")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ struct SettingsViewPlayer: View {
|
|||
icon: "pip",
|
||||
title: NSLocalizedString("Show PiP Button", comment: ""),
|
||||
isOn: $pipButtonVisible,
|
||||
showDivider: false
|
||||
showDivider: true
|
||||
)
|
||||
|
||||
SettingsPickerRow(
|
||||
|
|
@ -252,7 +252,8 @@ struct SettingsViewPlayer: View {
|
|||
title: NSLocalizedString("Completion Percentage", comment: ""),
|
||||
options: [60.0, 70.0, 80.0, 90.0, 95.0, 100.0],
|
||||
optionToString: { "\(Int($0))%" },
|
||||
selection: $remainingTimePercentage
|
||||
selection: $remainingTimePercentage,
|
||||
showDivider: false
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue