yeah nothung
Some checks are pending
Build and Release IPA / Build IPA (push) Waiting to run

This commit is contained in:
cranci1 2025-01-30 16:18:57 +01:00
parent 6c764a38bb
commit 6b876f8ee0
3 changed files with 10 additions and 8 deletions

View file

@ -163,8 +163,8 @@
isa = PBXGroup;
children = (
133D7C862D2BE2640075467E /* Extensions */,
133D7C8A2D2BE2640075467E /* JSLoader */,
133D7C882D2BE2640075467E /* Modules */,
133D7C8A2D2BE2640075467E /* Loader */,
1399FAD12D3AB33D00E97C31 /* Logger */,
13D842532D45266900EBBFA6 /* Drops */,
13EA2BDA2D32D9FF00C1EBD7 /* Miru */,
@ -189,12 +189,12 @@
path = Modules;
sourceTree = "<group>";
};
133D7C8A2D2BE2640075467E /* Loader */ = {
133D7C8A2D2BE2640075467E /* JSLoader */ = {
isa = PBXGroup;
children = (
133D7C8B2D2BE2640075467E /* JSController.swift */,
);
path = Loader;
path = JSLoader;
sourceTree = "<group>";
};
133F55B92D33B53E00E08EEA /* LibraryView */ = {

View file

@ -88,7 +88,8 @@ class JSController: ObservableObject {
return
}
Logger.shared.log(html,type: "Debug")
print(html)
Logger.shared.log(html,type: "HTMLStrings")
if let parseFunction = self.context.objectForKeyedSubscript("searchResults"),
let results = parseFunction.call(withArguments: [html]).toArray() as? [[String: String]] {
let resultItems = results.map { item in
@ -132,7 +133,7 @@ class JSController: ObservableObject {
var resultItems: [MediaItem] = []
var episodeLinks: [EpisodeLink] = []
Logger.shared.log(html,type: "Debug")
Logger.shared.log(html,type: "HTMLStrings")
if let parseFunction = self.context.objectForKeyedSubscript("extractDetails"),
let results = parseFunction.call(withArguments: [html]).toArray() as? [[String: String]] {
resultItems = results.map { item in
@ -182,7 +183,7 @@ class JSController: ObservableObject {
return
}
Logger.shared.log(html,type: "Debug")
Logger.shared.log(html,type: "HTMLStrings")
if let parseFunction = self.context.objectForKeyedSubscript("extractStreamUrl"),
let streamUrl = parseFunction.call(withArguments: [html]).toString() {
Logger.shared.log("Staring stream from: \(streamUrl)", type: "Stream")
@ -218,7 +219,7 @@ class JSController: ObservableObject {
let thenBlock: @convention(block) (JSValue) -> Void = { result in
Logger.shared.log(result.toString(),type: "Debug")
Logger.shared.log(result.toString(),type: "HTMLStrings")
if let jsonString = result.toString(),
let data = jsonString.data(using: .utf8) {
do {

View file

@ -28,7 +28,8 @@ class LogFilterViewModel: ObservableObject {
("General", "General events and activities.", true),
("Stream", "Streaming and video playback.", true),
("Error", "Errors and critical issues.", true),
("Debug", "Debugging and troubleshooting.", false)
("Debug", "Debugging and troubleshooting.", false),
("HTMLStrings", "", false)
]
private init() {