Compare commits

...
10 Commits
22 changed files with 68 additions and 42 deletions

No files matched your search

+6
View File
@@ -5,6 +5,12 @@ 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.41.7] - 2025-09-06
### Fixed
- Playback error when playing post live dvr videos
## [0.41.6] - 2025-09-06 ## [0.41.6] - 2025-09-06
### Fixed ### Fixed
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.41.6", "version": "0.41.7",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet", "name": "playlet",
"version": "0.41.6", "version": "0.41.7",
"hasInstallScript": true, "hasInstallScript": true,
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.34", "@rokucommunity/bslint": "^0.8.34",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.41.6", "version": "0.41.7",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.34", "@rokucommunity/bslint": "^0.8.34",
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.41.6", "version": "0.41.7",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-app", "name": "playlet-app",
"version": "0.41.6" "version": "0.41.7"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.41.6", "version": "0.41.7",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"scripts": { "scripts": {
"prebuild": "rm -rf ../build/playlet-app", "prebuild": "rm -rf ../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=41 minor_version=41
build_version=00006 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.41.6", "version": "0.41.7",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.41.6" "version": "0.41.7"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.41.6", "version": "0.41.7",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"scripts": { "scripts": {
"prebuild": "rm -rf ../build/playlet-lib", "prebuild": "rm -rf ../build/playlet-lib",
+2 -2
View File
@@ -118,11 +118,11 @@ function OnLineSysLog(event as object, dateTime as object, logsFile as string, b
' They're usually repetitive, one is reported for each stream in a DASH ' They're usually repetitive, one is reported for each stream in a DASH
' when a video is blocked ' when a video is blocked
if m.sysLogEventDropCounter = 0 if m.sysLogEventDropCounter = 0
m.global.telemetry.LogEvent = { LogTelemetryEvent({
level: "error" level: "error"
message: line message: line
fingerprint: ["SysLog", info.Status, info.LogType, info.HttpCode, info.Method] fingerprint: ["SysLog", info.Status, info.LogType, info.HttpCode, info.Method]
} })
end if end if
m.sysLogEventDropCounter = (m.sysLogEventDropCounter + 1) mod 10 m.sysLogEventDropCounter = (m.sysLogEventDropCounter + 1) mod 10
end function end function
@@ -181,11 +181,17 @@ class DashManifest
if xml.Node("Representation", representationAttributes) if xml.Node("Representation", representationAttributes)
m.AddColorInfo(stream, xml) m.AddColorInfo(stream, xml)
if xml.Node("BaseURL")
xml.Text(stream.url)
xml.End()
end if
if stream.url = invalid
xml.Comment(`[ERROR] Stream.url is invalid for itag: ${stream.itag}`)
else stream.url.InStr("source=yt_live_broadcast")
xml.Comment(`[WARN] Stream URL indicates a live broadcast for itag: ${stream.itag}`)
end if
xml.TextNode("BaseURL", ValidString(stream.url))
if StringUtils.IsNullOrEmpty(stream.index) or StringUtils.IsNullOrEmpty(stream.init)
xml.Comment(`[ERROR] Stream index: ${stream.index}, init: ${stream.init} is invalid for itag: ${stream.itag}`)
end if
if xml.Node("SegmentBase", { "indexRange": stream.index }) if xml.Node("SegmentBase", { "indexRange": stream.index })
xml.EmptyNode("Initialization", { "range": stream.init }) xml.EmptyNode("Initialization", { "range": stream.init })
@@ -9,15 +9,15 @@ const INNERTUBE_IOS_OS_VERSION = "18.1"
const INNERTUBE_IOS_USER_AGENT = "com.google.ios.youtube/20.20.5 (iPhone16,2; U; CPU iOS 18_1_0 like Mac OS X)" const INNERTUBE_IOS_USER_AGENT = "com.google.ios.youtube/20.20.5 (iPhone16,2; U; CPU iOS 18_1_0 like Mac OS X)"
const INNERTUBE_WEB_BROWSER_NAME = "Chrome" const INNERTUBE_WEB_BROWSER_NAME = "Chrome"
const INNERTUBE_WEB_BROWSER_VERSION = "136.0.0.0" const INNERTUBE_WEB_BROWSER_VERSION = "140.0.0.0"
const INNERTUBE_WEB_CLIENT_NAME = "1" const INNERTUBE_WEB_CLIENT_NAME = "1"
const INNERTUBE_WEB_CLIENT_VERSION = "2.20250520.05.00" const INNERTUBE_WEB_CLIENT_VERSION = "2.20250905.01.00"
const INNERTUBE_WEB_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0" const INNERTUBE_WEB_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0"
const INNERTUBE_TV_BROWSER_NAME = "SamsungBrowser" const INNERTUBE_TV_BROWSER_NAME = "SamsungBrowser"
const INNERTUBE_TV_BROWSER_VERSION = "9.2" const INNERTUBE_TV_BROWSER_VERSION = "9.2"
const INNERTUBE_TV_CLIENT_NAME = "2" const INNERTUBE_TV_CLIENT_NAME = "2"
const INNERTUBE_TV_CLIENT_VERSION = "7.20250519.12.01" const INNERTUBE_TV_CLIENT_VERSION = "7.20250902.08.00"
const INNERTUBE_TV_DEVICE_MAKE = "Samsung" const INNERTUBE_TV_DEVICE_MAKE = "Samsung"
const INNERTUBE_TV_DEVICE_MODEL = "SmartTV" const INNERTUBE_TV_DEVICE_MODEL = "SmartTV"
const INNERTUBE_TV_OS_NAME = "Tizen" const INNERTUBE_TV_OS_NAME = "Tizen"
@@ -64,7 +64,7 @@ namespace InnertubeService
' # Start of iOS fallback ' # Start of iOS fallback
playbackTrackingUrls = invalid playbackTrackingUrls = invalid
responseJson = playerResponse.Json() responseJson = playerResponse.Json()
if ValidBool(ObjectUtils.Dig(responseJson, ["videoDetails", "isLive"])) if ValidBool(ObjectUtils.Dig(responseJson, ["videoDetails", "isLive"])) or ValidBool(ObjectUtils.Dig(responseJson, ["videoDetails", "isLiveContent"]))
LogDebug("Live video detected, falling back to iOS for HLS streams.") LogDebug("Live video detected, falling back to iOS for HLS streams.")
isLoggedIn = Innertube.ParseIsLoggedIn(responseJson) isLoggedIn = Innertube.ParseIsLoggedIn(responseJson)
playbackTrackingUrls = Innertube.ParsePlaybackTrackingUrls(responseJson, isLoggedIn) playbackTrackingUrls = Innertube.ParsePlaybackTrackingUrls(responseJson, isLoggedIn)
@@ -112,7 +112,7 @@ namespace InnertubeService
return GetVideoMetadata(videoId, options) return GetVideoMetadata(videoId, options)
end if end if
if code = "MISSING_FORMAT_FIELD" if code = "MISSING_FORMAT_FIELD"
m.global.telemetry.LogEvent = { LogTelemetryEvent({
level: "error" level: "error"
message: code message: code
fingerprint: code fingerprint: code
@@ -125,7 +125,7 @@ namespace InnertubeService
content_type: "application/json" content_type: "application/json"
data: playerResponse.Text() data: playerResponse.Text()
}] }]
} })
end if end if
throw exception throw exception
end try end try
@@ -1251,6 +1251,12 @@ namespace Innertube
' A tileRenderer can be without a contentType, such as a ' A tileRenderer can be without a contentType, such as a
' button that says "Open YouTube Kids" or similar CTAs ' button that says "Open YouTube Kids" or similar CTAs
if contentType = "" if contentType = ""
eventTrigger = ValidString(ObjectUtils.Dig(nodeData, ["onSelectCommand", "authDeterminedCommand", "authenticatedCommand", "authRequiredCommand", "identityActionContext", "eventTrigger"]))
' "Open YouTube Kids" tileRenderer
if eventTrigger = "ACCOUNT_EVENT_TRIGGER_YTK_WORMHOLE"
LogWarnNoTelemetry("Skipping tileRenderer without contentType for YouTube Kids")
return invalid
end if
Warning("TileRenderer without contentType", nodeData, context) Warning("TileRenderer without contentType", nodeData, context)
return invalid return invalid
end if end if
@@ -1739,8 +1745,7 @@ namespace Innertube
nodeDataString = FormatJson(nodeData) nodeDataString = FormatJson(nodeData)
LogWarnNoTelemetry(message + `\n` + nodeDataString) LogWarnNoTelemetry(message + `\n` + nodeDataString)
LogTelemetryEvent ({
m.global.telemetry.LogEvent = {
level: "warning" level: "warning"
message: message message: message
fingerprint: message fingerprint: message
@@ -1753,6 +1758,6 @@ namespace Innertube
content_type: "text/plain" content_type: "text/plain"
data: context.response.request.ToCurlCommand() data: context.response.request.ToCurlCommand()
}] }]
} })
end function end function
end namespace end namespace
@@ -86,6 +86,7 @@ namespace Innertube
lengthSeconds = videoDetails["lengthSeconds"].ToInt() lengthSeconds = videoDetails["lengthSeconds"].ToInt()
isLive = ValidBool(videoDetails["isLive"]) isLive = ValidBool(videoDetails["isLive"])
isLiveContent = ValidBool(videoDetails["isLiveContent"])
videoInfo = { videoInfo = {
"type": "video" "type": "video"
@@ -97,9 +98,10 @@ namespace Innertube
"authorId": videoDetails["channelId"] "authorId": videoDetails["channelId"]
"lengthSeconds": lengthSeconds "lengthSeconds": lengthSeconds
"liveNow": isLive "liveNow": isLive
"isLiveContent": isLiveContent
"hlsUrl": streamingData["hlsManifestUrl"] "hlsUrl": streamingData["hlsManifestUrl"]
"dashUrl": streamingData["dashManifestUrl"] "dashUrl": streamingData["dashManifestUrl"]
"adaptiveFormats": ParseAdaptiveFormats(payload, signatureTimestamp, isLive, cancellation) "adaptiveFormats": ParseAdaptiveFormats(payload, signatureTimestamp, isLive or isLiveContent, cancellation)
"formatStreams": [] "formatStreams": []
"captions": ParseCaptions(payload) "captions": ParseCaptions(payload)
"recommendedVideos": [] "recommendedVideos": []
@@ -198,8 +198,11 @@ class LongPoller
m.status_code = Val(statusCode) m.status_code = Val(statusCode)
m.status_text = status.Mid(spaceIndex + 1) m.status_text = status.Mid(spaceIndex + 1)
if m.status_code <> 200 if m.status_code <> 200
LogError("Invalid status code:", m.status_code, m.status_text) if m.status_code = 400 and m.status_text = "Unknown SID"
LogError("Response data:", m.socket_buffer) LogErrorNoTelemetry("Invalid status code:", m.status_code, m.status_text, `\nResponse data:`, m.socket_buffer)
else
LogError("Invalid status code:", m.status_code, m.status_text, `\nResponse data:`, m.socket_buffer)
end if
m.CloseSocket() m.CloseSocket()
return false return false
end if end if
@@ -447,7 +447,7 @@ function OnVideoPlayerStateChange() as void
errorData = GetPlayerErrorData(content.videoId, errorInfo) errorData = GetPlayerErrorData(content.videoId, errorInfo)
LogErrorNoTelemetry(errorData.title, errorData.body) LogErrorNoTelemetry(errorData.title, errorData.body)
ReportVideoError(errorData) ReportVideoError(errorData, content.url)
errorReported = true errorReported = true
if m.videoPlayingSuccess <> true if m.videoPlayingSuccess <> true
@@ -499,7 +499,7 @@ function OnVideoPlayerStateChange() as void
LogErrorNoTelemetry(errorData.title, errorData.body) LogErrorNoTelemetry(errorData.title, errorData.body)
if not errorReported if not errorReported
ReportVideoError(errorData) ReportVideoError(errorData, content.url)
end if end if
buttons = [Tr(Locale.Buttons.PlayNextVideo), Tr(Locale.Buttons.Cancel)] buttons = [Tr(Locale.Buttons.PlayNextVideo), Tr(Locale.Buttons.Cancel)]
@@ -547,7 +547,7 @@ function GetPlayerErrorData(videoId as string, errorInfo as object) as object
} }
end function end function
function ReportVideoError(errorData as object) as void function ReportVideoError(errorData as object, url as string) as void
attachments = invalid attachments = invalid
if errorData.body.Instr("malformed data") <> -1 or errorData.body.Instr("invalid pathname") <> -1 if errorData.body.Instr("malformed data") <> -1 or errorData.body.Instr("invalid pathname") <> -1
lastGeneratedDash = ReadAsciiFile("tmp:/last_generated_dash.xml") lastGeneratedDash = ReadAsciiFile("tmp:/last_generated_dash.xml")
@@ -571,12 +571,12 @@ function ReportVideoError(errorData as object) as void
end if end if
end if end if
m.global.telemetry.LogEvent = { LogTelemetryEvent({
level: "error" level: "error"
message: errorData.title + " " + errorData.body message: errorData.title + " " + errorData.body + `\n url: ${url}`
fingerprint: errorData.fingerprint fingerprint: errorData.fingerprint
attachments: attachments attachments: attachments
} })
end function end function
function OnVideoFinished() as void function OnVideoFinished() as void
@@ -122,7 +122,7 @@ namespace Http
end if end if
' TODO:P2: handle live videos ' TODO:P2: handle live videos
if ValidBool(metadata.liveNow) if ValidBool(metadata.liveNow) or ValidBool(metadata.isLiveContent)
return hlsManifest return hlsManifest
end if end if
@@ -100,11 +100,11 @@ namespace Http
if operation = invalid or operation = "" if operation = invalid or operation = ""
LogErrorNoTelemetry("empty request") LogErrorNoTelemetry("empty request")
m.global.telemetry.LogEvent = { LogTelemetryEvent({
level: "error" level: "error"
message: "empty request: " + FormatJson({ "m.buffer": m.buffer, "m.buffer_index": m.buffer_index }) message: "empty request: " + FormatJson({ "m.buffer": m.buffer, "m.buffer_index": m.buffer_index })
fingerprint: ["HttpRequest: empty request"] fingerprint: ["HttpRequest: empty request"]
} })
m.ready_for_response = true m.ready_for_response = true
return false return false
end if end if
+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=41 minor_version=41
build_version=00006 build_version=00007
ui_resolutions=hd ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p uri_resolution_autosub=$$RES$$,480p,720p,1080p
+4
View File
@@ -29,6 +29,10 @@ function LogDebug(_arg1 = invalid as dynamic, _arg2 = invalid as dynamic, _arg3
throw "FATAL: Calling LogDebug() which is a stub function" throw "FATAL: Calling LogDebug() which is a stub function"
end function end function
function LogTelemetryEvent(event as object)
m.global.telemetry.LogEvent = event
end function
function ToString(value as dynamic) as string function ToString(value as dynamic) as string
if getInterface(value, "ifString") <> invalid if getInterface(value, "ifString") <> invalid
return value return value
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.41.6", "version": "0.41.7",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-web", "name": "playlet-web",
"version": "0.41.6", "version": "0.41.7",
"devDependencies": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^6.1.4", "@sveltejs/vite-plugin-svelte": "^6.1.4",
"@tailwindcss/typography": "^0.5.16", "@tailwindcss/typography": "^0.5.16",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.41.6", "version": "0.41.7",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",