mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 17:45:37 +00:00
Update MediaInfoView.swift
This commit is contained in:
parent
ee3f21cc57
commit
508319452e
1 changed files with 8 additions and 3 deletions
|
|
@ -490,11 +490,16 @@ struct MediaInfoView: View {
|
|||
|
||||
func playStream(url: String, fullURL: String, subtitles: String? = nil) {
|
||||
DispatchQueue.main.async {
|
||||
guard let streamURL = URL(string: url) else { return }
|
||||
let subtitleFileURL = subtitles != nil ? URL(string: subtitles!) : nil
|
||||
DownloadManager.shared.downloadAndConvertHLS(from: streamURL, title: title, episode: selectedEpisodeNumber, subtitleURL: subtitleFileURL, sourceName: module.metadata.sourceName) { success, fileURL in
|
||||
guard let streamURL = URL(string: url) else {
|
||||
Logger.shared.log("Invalid stream URL: \(url)", type: "Error")
|
||||
handleStreamFailure()
|
||||
return
|
||||
}
|
||||
let subtitleFileURL = subtitles != nil ? URL(string: subtitles!) : nil
|
||||
|
||||
DownloadManager.shared.downloadAndConvertHLS(from: streamURL, title: title, episode: selectedEpisodeNumber, subtitleURL: subtitleFileURL, sourceName: module.metadata.sourceName) { success, fileURL in
|
||||
|
||||
}
|
||||
|
||||
let externalPlayer = UserDefaults.standard.string(forKey: "externalPlayer") ?? "Default"
|
||||
var scheme: String?
|
||||
|
|
|
|||
Loading…
Reference in a new issue