mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-21 00:22:12 +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?
|
let showPosterURL: URL?
|
||||||
|
|
||||||
init(url: URL, headers: [String: String], title: String? = nil, imageURL: URL? = nil,
|
init(url: URL, headers: [String: String], title: String? = nil, imageURL: URL? = nil,
|
||||||
|
aniListID: Int? = nil,
|
||||||
isEpisode: Bool = false, showTitle: String? = nil, season: Int? = nil,
|
isEpisode: Bool = false, showTitle: String? = nil, season: Int? = nil,
|
||||||
episode: Int? = nil, subtitleURL: URL? = nil, showPosterURL: URL? = nil) {
|
episode: Int? = nil, subtitleURL: URL? = nil, showPosterURL: URL? = nil) {
|
||||||
self.url = url
|
self.url = url
|
||||||
self.headers = headers
|
self.headers = headers
|
||||||
self.title = title
|
self.title = title
|
||||||
self.imageURL = imageURL
|
self.imageURL = imageURL
|
||||||
|
self.aniListID = aniListID
|
||||||
self.isEpisode = isEpisode
|
self.isEpisode = isEpisode
|
||||||
self.showTitle = showTitle
|
self.showTitle = showTitle
|
||||||
self.season = season
|
self.season = season
|
||||||
|
|
@ -52,9 +54,7 @@ struct QualityOption {
|
||||||
|
|
||||||
extension JSController {
|
extension JSController {
|
||||||
|
|
||||||
func downloadWithM3U8Support(url: URL, headers: [String: String], title: String? = 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,
|
||||||
imageURL: URL? = nil, aniListID: Int? = nil, isEpisode: Bool = false,
|
|
||||||
showTitle: String? = nil, season: Int? = nil, episode: Int? = nil,
|
|
||||||
subtitleURL: URL? = nil, showPosterURL: URL? = nil,
|
subtitleURL: URL? = nil, showPosterURL: URL? = nil,
|
||||||
completionHandler: ((Bool, String) -> Void)? = nil) {
|
completionHandler: ((Bool, String) -> Void)? = nil) {
|
||||||
|
|
||||||
|
|
@ -123,13 +123,12 @@ extension JSController {
|
||||||
|
|
||||||
|
|
||||||
func downloadMP4(url: URL, headers: [String: String], title: String? = nil,
|
func downloadMP4(url: URL, headers: [String: String], title: String? = nil,
|
||||||
imageURL: URL? = nil, aniListID: Int? = nil, isEpisode: Bool = false,
|
aniListID: Int? = nil, imageURL: URL? = nil, aniListID: Int? = nil, isEpisode: Bool = false, showTitle: String? = nil, season: Int? = nil, episode: Int? = nil,
|
||||||
showTitle: String? = nil, season: Int? = nil, episode: Int? = nil,
|
|
||||||
subtitleURL: URL? = nil, showPosterURL: URL? = nil,
|
subtitleURL: URL? = nil, showPosterURL: URL? = nil,
|
||||||
completionHandler: ((Bool, String) -> Void)? = nil) {
|
completionHandler: ((Bool, String) -> Void)? = nil) {
|
||||||
|
|
||||||
let request = DownloadRequest(
|
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,
|
isEpisode: isEpisode, showTitle: showTitle, season: season,
|
||||||
episode: episode, subtitleURL: subtitleURL, showPosterURL: showPosterURL
|
episode: episode, subtitleURL: subtitleURL, showPosterURL: showPosterURL
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -126,8 +126,8 @@ extension JSController {
|
||||||
title: title,
|
title: title,
|
||||||
imageURL: imageURL,
|
imageURL: imageURL,
|
||||||
module: module,
|
module: module,
|
||||||
aniListID: aniListID,
|
|
||||||
isEpisode: isEpisode,
|
isEpisode: isEpisode,
|
||||||
|
aniListID: aniListID,
|
||||||
showTitle: showTitle,
|
showTitle: showTitle,
|
||||||
season: season,
|
season: season,
|
||||||
episode: episode,
|
episode: episode,
|
||||||
|
|
@ -277,9 +277,9 @@ extension JSController {
|
||||||
headers: queuedDownload.headers,
|
headers: queuedDownload.headers,
|
||||||
title: queuedDownload.title,
|
title: queuedDownload.title,
|
||||||
imageURL: queuedDownload.imageURL,
|
imageURL: queuedDownload.imageURL,
|
||||||
module: module,
|
module: module,
|
||||||
aniListID: queuedDownload.aniListID
|
|
||||||
isEpisode: queuedDownload.type == .episode,
|
isEpisode: queuedDownload.type == .episode,
|
||||||
|
aniListID: queuedDownload.aniListID,
|
||||||
showTitle: queuedDownload.metadata?.showTitle,
|
showTitle: queuedDownload.metadata?.showTitle,
|
||||||
season: queuedDownload.metadata?.season,
|
season: queuedDownload.metadata?.season,
|
||||||
episode: queuedDownload.metadata?.episode,
|
episode: queuedDownload.metadata?.episode,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue