Compare commits

...
7 Commits
13 changed files with 76 additions and 24 deletions

No files matched your search

+12
View File
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.43.7] - 2025-11-06
### Fixed
- Adjust telemetry for OTF streams to debug
## [0.43.6] - 2025-11-06
### Fixed
- Bug in processing OTF streams info
## [0.43.5] - 2025-11-06 ## [0.43.5] - 2025-11-06
### Fixed ### Fixed
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.43.5", "version": "0.43.7",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet", "name": "playlet",
"version": "0.43.5", "version": "0.43.7",
"hasInstallScript": true, "hasInstallScript": true,
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.38", "@rokucommunity/bslint": "^0.8.38",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.43.5", "version": "0.43.7",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.38", "@rokucommunity/bslint": "^0.8.38",
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.43.5", "version": "0.43.7",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-app", "name": "playlet-app",
"version": "0.43.5" "version": "0.43.7"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.43.5", "version": "0.43.7",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"scripts": { "scripts": {
"prebuild": "node ../tools/rm.js ../build/playlet-app", "prebuild": "node ../tools/rm.js ../build/playlet-app",
+1 -1
View File
@@ -3,7 +3,7 @@ title=Playlet
# Do not update version manually, it is auto updated from package.json # Do not update version manually, it is auto updated from package.json
major_version=0 major_version=0
minor_version=43 minor_version=43
build_version=00005 build_version=00007
ui_resolutions=hd ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p uri_resolution_autosub=$$RES$$,480p,720p,1080p
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.43.5", "version": "0.43.7",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.43.5" "version": "0.43.7"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.43.5", "version": "0.43.7",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"scripts": { "scripts": {
"prebuild": "node ../tools/rm.js ../build/playlet-lib", "prebuild": "node ../tools/rm.js ../build/playlet-lib",
@@ -677,7 +677,12 @@ namespace Innertube
url = UrlUtils.SetQueryParams(url, queryComponents) url = UrlUtils.SetQueryParams(url, queryComponents)
request = HttpClient.Head(url) request = HttpClient.Head(url)
request.Headers(Innertube.CreateHeaders(client)) requestHeaders = Innertube.CreateHeaders(client)
requestHeaders["origin"] = "https://www.youtube.com"
requestHeaders["referer"] = "https://www.youtube.com"
requestHeaders["DNT"] = "?1"
request.Headers(requestHeaders)
request.TryCount(2) request.TryCount(2)
request.Cancellation(cancellation) request.Cancellation(cancellation)
response = request.Await() response = request.Await()
@@ -689,6 +694,10 @@ namespace Innertube
headers = response.Headers() headers = response.Headers()
if not headers.DoesExist("X-Head-Time-Millis") or not headers.DoesExist("X-Head-Seqnum")
LogError("GetPostLiveDvrInfo: Missing Post-Live DVR info in headers", headers)
end if
durationMs = ValidString(headers["X-Head-Time-Millis"]).ToInt() durationMs = ValidString(headers["X-Head-Time-Millis"]).ToInt()
segmentCount = ValidString(headers["X-Head-Seqnum"]).ToInt() segmentCount = ValidString(headers["X-Head-Seqnum"]).ToInt()
@@ -698,16 +707,15 @@ namespace Innertube
if segmentCount > 0 if segmentCount > 0
parsedResponse["postLiveDvrSegmentCount"] = segmentCount parsedResponse["postLiveDvrSegmentCount"] = segmentCount
end if end if
if segmentCount = 0 or durationMs = 0
LogError("GetPostLiveDvrInfo: Missing Post-Live DVR info in headers", headers)
end if
end function end function
function GetOTFSegmentInfo(adaptiveFormats as object, client as Innertube.ClientType, cancellation as object) as void function GetOTFSegmentInfo(adaptiveFormats as object, client as Innertube.ClientType, cancellation as object) as void
requests = CreateObject("roArray", adaptiveFormats.Count(), false) requests = CreateObject("roArray", adaptiveFormats.Count(), false)
requestHeaders = Innertube.CreateHeaders(client) requestHeaders = Innertube.CreateHeaders(client)
requestHeaders["origin"] = "https://www.youtube.com"
requestHeaders["referer"] = "https://www.youtube.com"
requestHeaders["DNT"] = "?1"
for i = 0 to adaptiveFormats.Count() - 1 for i = 0 to adaptiveFormats.Count() - 1
format = adaptiveFormats[i] format = adaptiveFormats[i]
if format.isTypeOTF <> true if format.isTypeOTF <> true
@@ -731,11 +739,11 @@ namespace Innertube
request.TryCount(2) request.TryCount(2)
request.Cancellation(cancellation) request.Cancellation(cancellation)
request.Send() request.Send()
requests[`${i}`] = request requests[i] = request
end for end for
for i = 0 to requests.Count() - 1 for i = 0 to requests.Count() - 1
request = requests[`${i}`] request = requests[i]
if request = invalid if request = invalid
continue for continue for
end if end if
@@ -748,7 +756,17 @@ namespace Innertube
end if end if
if not response.IsSuccess() if not response.IsSuccess()
LogError("Failed to fetch OTF segment info for itag", format.itag, response.ErrorMessage()) LogErrorNoTelemetry("Failed to fetch OTF segment info for itag", format.itag, response.ErrorMessage())
LogTelemetryEvent({
level: "error"
message: `Failed to fetch OTF segment info for itag ${format.itag}`
fingerprint: ["OTF Fetch Error"]
attachments: [{
filename: "otf.txt"
content_type: "plain/text"
data: response.ErrorMessage()
}]
})
continue for continue for
end if end if
@@ -756,7 +774,21 @@ namespace Innertube
segmentDurationsMs = StringUtils.GetBetween(responseText, "Segment-Durations-Ms:", `\r\n`) segmentDurationsMs = StringUtils.GetBetween(responseText, "Segment-Durations-Ms:", `\r\n`)
if StringUtils.IsNullOrEmpty(segmentDurationsMs) if StringUtils.IsNullOrEmpty(segmentDurationsMs)
LogError("Failed to extract Segment-Durations-Ms from OTF stream for itag", format.itag) LogErrorNoTelemetry("Failed to extract Segment-Durations-Ms from OTF stream for itag", format.itag)
LogTelemetryEvent({
level: "error"
message: `Failed to extract Segment-Durations-Ms from OTF stream for itag ${format.itag}`
fingerprint: ["OTF Missing Segment Durations"]
attachments: [{
filename: "otf.txt"
content_type: "plain/text"
data: responseText
}, {
filename: "headers.json"
content_type: "application/json"
data: FormatJson(response.Headers())
}]
})
continue for continue for
end if end if
@@ -785,6 +817,10 @@ namespace Innertube
filename: "otf.txt" filename: "otf.txt"
content_type: "plain/text" content_type: "plain/text"
data: responseText data: responseText
}, {
filename: "headers.json"
content_type: "application/json"
data: FormatJson(response.Headers())
}] }]
}) })
continue for continue for
@@ -808,6 +844,10 @@ namespace Innertube
filename: "otf.txt" filename: "otf.txt"
content_type: "plain/text" content_type: "plain/text"
data: responseText data: responseText
}, {
filename: "headers.json"
content_type: "application/json"
data: FormatJson(response.Headers())
}] }]
}) })
end if end if
@@ -56,7 +56,7 @@ namespace Http
xmlContent = m.dashManifest.FromVideoMetadata(metadata, qualityFilter, ValidString(local) = "true") xmlContent = m.dashManifest.FromVideoMetadata(metadata, qualityFilter, ValidString(local) = "true")
if xmlContent.InStr("[ERROR]") <> -1 if xmlContent.InStr("[ERROR]") <> -1
LogError("Dash manifest generated with errors") LogErrorNoTelemetry("Dash manifest generated with errors")
lastPlayerResponse = ValidString(ReadAsciiFile("cachefs:/last_player_response.json")) lastPlayerResponse = ValidString(ReadAsciiFile("cachefs:/last_player_response.json"))
LogTelemetryEvent({ LogTelemetryEvent({
level: "error" level: "error"
+1 -1
View File
@@ -3,7 +3,7 @@ title=PlayletLib
# Do not update version manually, it is auto updated from package.json # Do not update version manually, it is auto updated from package.json
major_version=0 major_version=0
minor_version=43 minor_version=43
build_version=00005 build_version=00007
ui_resolutions=hd ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p uri_resolution_autosub=$$RES$$,480p,720p,1080p
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.43.5", "version": "0.43.7",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-web", "name": "playlet-web",
"version": "0.43.5", "version": "0.43.7",
"devDependencies": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^6.2.1", "@sveltejs/vite-plugin-svelte": "^6.2.1",
"@tailwindcss/postcss": "^4.1.16", "@tailwindcss/postcss": "^4.1.16",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.43.5", "version": "0.43.7",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",