Improvements for very long HLS playlists

This commit is contained in:
Brahim Hadriche committed 2024-12-12 19:26:45 -05:00
1 parent bfc1439d1a
commit 357019d74b
3 files changed
+13 -1

No files matched your search

+4
View File
@@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for age restrcited videos and private videos when cast from YouTube app (logged in)
- Note: it works when the video is explicitely cast. If it was added to queue, or added as part of a playlist, this might not work.
### Fixed
- Improved on issue with long videos (10+ hours) showing as 2:30 only. They now show about 5 hours.
## [0.32.1] - 2024-12-03
### Fixed
@@ -64,6 +64,10 @@ function VideoContentTask(input as object) as object
end if
streamUrls = CreateStreamUrls(metadata, service, preferencesNode, backend, playletServerPort)
' Forwarding query params to HLS playlists is not needed. In fact, it can cause issues
' because the playlist is limited to 4MB, and on large playlists the query params
' significantly increase the size of the playlist, making it cropped.
contentNode.ForwardQueryStringParams = false
contentNode.addFields({
metadata: metadata
' StreamUrls is taken
@@ -24,6 +24,7 @@ namespace Http
hlsRequest = HttpClient.Get(url)
headers = request.headers
' Host is probably 127.0.0.1 so we should remote it before hitting the server
headers.Delete("Host")
hlsRequest.Headers(headers)
@@ -43,7 +44,10 @@ namespace Http
hlsManifest = m.AppendStoryboardPlaylists(hlsManifest)
response.http_code = hlsResponse.StatusCode()
response.headers = hlsResponse.Headers()
headers = hlsResponse.Headers()
' We responding with uncompressed data
headers.Delete("Content-Encoding")
response.headers = headers
response.SetBodyDataString(ValidString(hlsManifest))
return true