This commit is contained in:
scigward 2025-08-20 08:07:01 +03:00
parent 6b4fe44fb3
commit 2effc7bf0b
3 changed files with 28 additions and 8 deletions

View file

@ -102,11 +102,19 @@ extension JSController {
if let qualityURL = URL(string: selectedQuality.url) {
let qualityRequest = DownloadRequest(
url: qualityURL, headers: request.headers, title: request.title,
imageURL: request.imageURL, isEpisode: request.isEpisode,
showTitle: request.showTitle, season: request.season,
episode: request.episode, subtitleURL: request.subtitleURL,
showPosterURL: request.showPosterURL
url: qualityURL,
headers: request.headers,
title: request.title,
imageURL: request.imageURL,
isEpisode: request.isEpisode,
showTitle: request.showTitle,
season: request.season,
episode: request.episode,
subtitleURL: request.subtitleURL,
showPosterURL: request.showPosterURL,
aniListID: request.aniListID,
malID: request.malID,
isFiller: request.isFiller
)
self.downloadWithOriginalMethod(request: qualityRequest, completionHandler: completionHandler)
} else {
@ -422,6 +430,9 @@ extension JSController {
episode: request.episode,
subtitleURL: request.subtitleURL,
showPosterURL: request.showPosterURL,
aniListID: request.aniListID,
malID: request.malID,
isFiller: request.isFiller,
completionHandler: completionHandler
)
}

View file

@ -114,6 +114,9 @@ extension JSController {
subtitleURL: URL? = nil,
showPosterURL: URL? = nil,
module: ScrapingModule? = nil,
aniListID: Int? = nil,
malID: Int? = nil,
isFiller: Bool? = nil,
completionHandler: ((Bool, String) -> Void)? = nil
) {
// If a module is provided, use the stream type aware download
@ -131,6 +134,9 @@ extension JSController {
episode: episode,
subtitleURL: subtitleURL,
showPosterURL: showPosterURL,
aniListID: aniListID,
malID: malID,
isFiller: isFiller,
completionHandler: completionHandler
)
return
@ -177,7 +183,10 @@ extension JSController {
subtitleURL: subtitleURL,
asset: asset,
headers: headers,
module: module
module: module,
aniListID: aniListID,
malID: malID,
isFiller: isFiller
)
// Add to the download queue

View file

@ -44,7 +44,7 @@ extension JSController {
let streamType = module.metadata.streamType.lowercased()
if streamType == "hls" || streamType == "m3u8" || url.absoluteString.contains(".m3u8") {
Logger.shared.log("Using HLS download method")
Logger.shared.log("Using HLS download method", type: "Download")
downloadWithM3U8Support(
url: url,
headers: headers,
@ -62,7 +62,7 @@ extension JSController {
completionHandler: completionHandler
)
}else {
Logger.shared.log("Using MP4 download method")
Logger.shared.log("Using MP4 download method", type: "Download")
downloadMP4(
url: url,
headers: headers,