boom shakalaka (#160)
Some checks are pending
Build and Release / Build IPA (push) Waiting to run
Build and Release / Build Mac Catalyst (push) Waiting to run

* now if the user leaves mediainfoview on chunk 51-100 it will remember it and put him back the next time

same with seasons

* fixed memory leak from urldelegate

---------

Co-authored-by: cranci <100066266+cranci1@users.noreply.github.com>
This commit is contained in:
Seiike 2025-06-08 20:05:09 +02:00 committed by GitHub
parent 193b16fc8c
commit a348c9a63a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -111,7 +111,11 @@ extension JSContext {
}
}
Logger.shared.log("Redirect value is \(redirect.boolValue)", type: "Error")
let task = URLSession.fetchData(allowRedirects: redirect.boolValue).downloadTask(with: request) { tempFileURL, response, error in
let session = URLSession.fetchData(allowRedirects: redirect.boolValue)
let task = session.downloadTask(with: request) { tempFileURL, response, error in
defer { session.finishTasksAndInvalidate() }
let callReject: (String) -> Void = { message in
DispatchQueue.main.async {
reject.call(withArguments: [message])

View file

@ -9,9 +9,12 @@ import Foundation
class FetchDelegate: NSObject, URLSessionTaskDelegate {
private let allowRedirects: Bool
init(allowRedirects: Bool) {
self.allowRedirects = allowRedirects
}
deinit { Logger.shared.log("FetchDelegate deallocated", type: "Debug")
}
func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
if(allowRedirects) {