mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-05 00:59:55 +00:00
: p
This commit is contained in:
parent
e0956d3674
commit
16467ea2b0
2 changed files with 8 additions and 9 deletions
|
|
@ -23,12 +23,14 @@ struct DownloadRequest {
|
|||
let showPosterURL: URL?
|
||||
|
||||
init(url: URL, headers: [String: String], title: String? = nil, imageURL: URL? = nil,
|
||||
aniListID: Int? = nil,
|
||||
isEpisode: Bool = false, showTitle: String? = nil, season: Int? = nil,
|
||||
episode: Int? = nil, subtitleURL: URL? = nil, showPosterURL: URL? = nil) {
|
||||
self.url = url
|
||||
self.headers = headers
|
||||
self.title = title
|
||||
self.imageURL = imageURL
|
||||
self.aniListID = aniListID
|
||||
self.isEpisode = isEpisode
|
||||
self.showTitle = showTitle
|
||||
self.season = season
|
||||
|
|
@ -52,9 +54,7 @@ struct QualityOption {
|
|||
|
||||
extension JSController {
|
||||
|
||||
func downloadWithM3U8Support(url: URL, headers: [String: String], title: String? = nil,
|
||||
imageURL: URL? = nil, aniListID: Int? = nil, isEpisode: Bool = false,
|
||||
showTitle: String? = nil, season: Int? = nil, episode: Int? = nil,
|
||||
func downloadWithM3U8Support(url: URL, headers: [String: String], title: String? = nil, imageURL: URL? = nil, aniListID: Int? = nil, isEpisode: Bool = false, showTitle: String? = nil, season: Int? = nil, episode: Int? = nil,
|
||||
subtitleURL: URL? = nil, showPosterURL: URL? = nil,
|
||||
completionHandler: ((Bool, String) -> Void)? = nil) {
|
||||
|
||||
|
|
@ -123,13 +123,12 @@ extension JSController {
|
|||
|
||||
|
||||
func downloadMP4(url: URL, headers: [String: String], title: String? = nil,
|
||||
imageURL: URL? = nil, aniListID: Int? = nil, isEpisode: Bool = false,
|
||||
showTitle: String? = nil, season: Int? = nil, episode: Int? = nil,
|
||||
aniListID: Int? = nil, imageURL: URL? = nil, aniListID: Int? = nil, isEpisode: Bool = false, showTitle: String? = nil, season: Int? = nil, episode: Int? = nil,
|
||||
subtitleURL: URL? = nil, showPosterURL: URL? = nil,
|
||||
completionHandler: ((Bool, String) -> Void)? = nil) {
|
||||
|
||||
let request = DownloadRequest(
|
||||
url: url, headers: headers, title: title, imageURL: imageURL,
|
||||
url: url, headers: headers, title: title, imageURL: imageURL, aniListID: aniListID,
|
||||
isEpisode: isEpisode, showTitle: showTitle, season: season,
|
||||
episode: episode, subtitleURL: subtitleURL, showPosterURL: showPosterURL
|
||||
)
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ extension JSController {
|
|||
title: title,
|
||||
imageURL: imageURL,
|
||||
module: module,
|
||||
aniListID: aniListID,
|
||||
isEpisode: isEpisode,
|
||||
aniListID: aniListID,
|
||||
showTitle: showTitle,
|
||||
season: season,
|
||||
episode: episode,
|
||||
|
|
@ -277,9 +277,9 @@ extension JSController {
|
|||
headers: queuedDownload.headers,
|
||||
title: queuedDownload.title,
|
||||
imageURL: queuedDownload.imageURL,
|
||||
module: module,
|
||||
aniListID: queuedDownload.aniListID
|
||||
module: module,
|
||||
isEpisode: queuedDownload.type == .episode,
|
||||
aniListID: queuedDownload.aniListID,
|
||||
showTitle: queuedDownload.metadata?.showTitle,
|
||||
season: queuedDownload.metadata?.season,
|
||||
episode: queuedDownload.metadata?.episode,
|
||||
|
|
|
|||
Loading…
Reference in a new issue