mirror of
https://github.com/cranci1/Sora.git
synced 2026-01-11 20:10:24 +00:00
Better if we access subtitles using User-Agents
This commit is contained in:
parent
2bb4234712
commit
914c3c4990
1 changed files with 1 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ class VTTSubtitlesLoader: ObservableObject {
|
|||
func load(from urlString: String) {
|
||||
guard let url = URL(string: urlString) else { return }
|
||||
|
||||
URLSession.shared.dataTask(with: url) { data, response, error in
|
||||
URLSession.custom.dataTask(with: url) { data, response, error in
|
||||
guard let responseData = data,
|
||||
let subtitleContent = String(data: responseData, encoding: .utf8),
|
||||
!subtitleContent.isEmpty,
|
||||
|
|
|
|||
Loading…
Reference in a new issue