mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-09-18 07:22:26 +00:00
Merge branch 'hls-url-redirect-fix' into 'master'
Nebula Download Fix See merge request videostreaming/grayjay!129
This commit is contained in:
commit
0af4bad906
1 changed files with 4 additions and 2 deletions
|
@ -303,9 +303,10 @@ class VideoDownload {
|
||||||
try {
|
try {
|
||||||
val playlistResponse = client.get(source.url)
|
val playlistResponse = client.get(source.url)
|
||||||
if (playlistResponse.isOk) {
|
if (playlistResponse.isOk) {
|
||||||
|
val resolvedPlaylistUrl = playlistResponse.url
|
||||||
val playlistContent = playlistResponse.body?.string()
|
val playlistContent = playlistResponse.body?.string()
|
||||||
if (playlistContent != null) {
|
if (playlistContent != null) {
|
||||||
videoSources.addAll(HLS.parseAndGetVideoSources(source, playlistContent, source.url))
|
videoSources.addAll(HLS.parseAndGetVideoSources(source, playlistContent, resolvedPlaylistUrl))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
|
@ -351,9 +352,10 @@ class VideoDownload {
|
||||||
try {
|
try {
|
||||||
val playlistResponse = client.get(source.url)
|
val playlistResponse = client.get(source.url)
|
||||||
if (playlistResponse.isOk) {
|
if (playlistResponse.isOk) {
|
||||||
|
val resolvedPlaylistUrl = playlistResponse.url
|
||||||
val playlistContent = playlistResponse.body?.string()
|
val playlistContent = playlistResponse.body?.string()
|
||||||
if (playlistContent != null) {
|
if (playlistContent != null) {
|
||||||
audioSources.addAll(HLS.parseAndGetAudioSources(source, playlistContent, source.url))
|
audioSources.addAll(HLS.parseAndGetAudioSources(source, playlistContent, resolvedPlaylistUrl))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue