mirror of
https://github.com/cranci1/Sora.git
synced 2026-05-04 09:19:02 +00:00
ok now its fixed
This commit is contained in:
parent
7fc01c7b08
commit
c4e2d23387
1 changed files with 3 additions and 2 deletions
|
|
@ -2044,7 +2044,7 @@ class CustomMediaPlayerViewController: UIViewController, UIGestureRecognizerDele
|
||||||
let nextLine = lines[index + 1].trimmingCharacters(in: .whitespacesAndNewlines)
|
let nextLine = lines[index + 1].trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
let qualityName = getQualityName(from: line, url: nextLine) ?? "Unknown"
|
let qualityName = getQualityName(from: line, url: nextLine) ?? "Unknown"
|
||||||
var qualityURL = nextLine
|
var qualityURL = nextLine
|
||||||
if !nextLine.hasPrefix("http") && nextLine.contains(".m3u8") {
|
if !nextLine.hasPrefix("http") {
|
||||||
if let baseURL = self.baseM3U8URL {
|
if let baseURL = self.baseM3U8URL {
|
||||||
let baseURLString = baseURL.deletingLastPathComponent().absoluteString
|
let baseURLString = baseURL.deletingLastPathComponent().absoluteString
|
||||||
qualityURL = URL(string: nextLine, relativeTo: baseURL)?.absoluteString
|
qualityURL = URL(string: nextLine, relativeTo: baseURL)?.absoluteString
|
||||||
|
|
@ -2140,8 +2140,9 @@ class CustomMediaPlayerViewController: UIViewController, UIGestureRecognizerDele
|
||||||
|
|
||||||
private func checkForHLSStream() {
|
private func checkForHLSStream() {
|
||||||
guard let url = URL(string: streamURL) else { return }
|
guard let url = URL(string: streamURL) else { return }
|
||||||
|
let streamType = module.metadata.streamType.lowercased()
|
||||||
|
|
||||||
if url.absoluteString.contains(".m3u8") || url.absoluteString.contains(".m3u") {
|
if url.absoluteString.contains(".m3u8") || url.absoluteString.contains(".m3u") || streamType.contains("hls") {
|
||||||
isHLSStream = true
|
isHLSStream = true
|
||||||
baseM3U8URL = url
|
baseM3U8URL = url
|
||||||
currentQualityURL = url
|
currentQualityURL = url
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue