Compare commits

...
10 Commits
22 changed files with 83 additions and 34 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.5] - 2025-09-05
### Fixed
- Various telemetry issues
## [0.41.4] - 2025-09-04 ## [0.41.4] - 2025-09-04
### Fixed ### Fixed
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.41.4", "version": "0.41.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet", "name": "playlet",
"version": "0.41.4", "version": "0.41.5",
"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.4", "version": "0.41.5",
"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.4", "version": "0.41.5",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-app", "name": "playlet-app",
"version": "0.41.4" "version": "0.41.5"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.41.4", "version": "0.41.5",
"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=00004 build_version=00005
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.4", "version": "0.41.5",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.41.4" "version": "0.41.5"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.41.4", "version": "0.41.5",
"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",
+7 -3
View File
@@ -118,7 +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.logError = line m.global.telemetry.LogEvent = {
level: "error"
message: line
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
@@ -129,7 +133,7 @@ function OnLineLogMonitorMemoryWarning(event as object, dateTime as object, logs
print line print line
buffer.FromAsciiString(line + `\n`) buffer.FromAsciiString(line + `\n`)
buffer.AppendFile(logsFile) buffer.AppendFile(logsFile)
m.global.telemetry.logWarn = line m.global.telemetry.LogWarn = line
end function end function
function OnLineLogDeviceInfoMemoryWarning(event as object, dateTime as object, logsFile as string, buffer as object) as void function OnLineLogDeviceInfoMemoryWarning(event as object, dateTime as object, logsFile as string, buffer as object) as void
@@ -148,7 +152,7 @@ function OnLineLogDeviceInfoMemoryWarning(event as object, dateTime as object, l
print line print line
buffer.FromAsciiString(line + `\n`) buffer.FromAsciiString(line + `\n`)
buffer.AppendFile(logsFile) buffer.AppendFile(logsFile)
m.global.telemetry.logWarn = line m.global.telemetry.LogWarn = line
end function end function
' Note: although the timestamp should be captured in the caller, not the logger, ' Note: although the timestamp should be captured in the caller, not the logger,
@@ -144,6 +144,7 @@ namespace Innertube
"supexOnboardingErrorCommand": ParseNotImplemented "supexOnboardingErrorCommand": ParseNotImplemented
' Suicide & crisis lifeline, shown on sensitive content ' Suicide & crisis lifeline, shown on sensitive content
"emergencyOneboxRenderer": ParseNotImplemented "emergencyOneboxRenderer": ParseNotImplemented
"counterfactualRenderer": ParseNotImplemented
"ticketShelfRenderer": ParseNotImplemented "ticketShelfRenderer": ParseNotImplemented
"videoSurveyShelfRenderer": ParseNotImplemented "videoSurveyShelfRenderer": ParseNotImplemented
"popupSurveyShelfRenderer": ParseNotImplemented "popupSurveyShelfRenderer": ParseNotImplemented
@@ -1739,7 +1740,7 @@ namespace Innertube
LogWarnNoTelemetry(message + `\n` + nodeDataString) LogWarnNoTelemetry(message + `\n` + nodeDataString)
m.global.telemetry.LogEvent = { m.global.telemetry.LogEvent = {
level: "error" level: "warning"
message: message message: message
fingerprint: message fingerprint: message
attachments: [{ attachments: [{
@@ -363,7 +363,11 @@ namespace Innertube
end if end if
alertText = ParseText(alertRenderer.text) alertText = ParseText(alertRenderer.text)
if ValidString(alertRenderer.type) = "INFO"
LogWarnNoTelemetry("Innertube Alert:", `[${alertRenderer.type}]`, alertText)
else
LogWarn("Innertube Alert:", `[${alertRenderer.type}]`, alertText) LogWarn("Innertube Alert:", `[${alertRenderer.type}]`, alertText)
end if
if alertRenderer.type = "ERROR" if alertRenderer.type = "ERROR"
error += alertText error += alertText
end if end if
@@ -151,6 +151,11 @@ namespace Innertube
if status = "LOGIN_REQUIRED" if status = "LOGIN_REQUIRED"
' TODO:P2 localize ' TODO:P2 localize
errorLines.Push("Hint: Log in to the YouTube app on your phone, then cast the video to Playlet.") errorLines.Push("Hint: Log in to the YouTube app on your phone, then cast the video to Playlet.")
isLoggedIn = Innertube.ParseIsLoggedIn(payload)
if isLoggedIn
LogError("Video requires login, but user is already logged in!")
end if
end if end if
return errorLines.Join(`\n`) return errorLines.Join(`\n`)
@@ -139,7 +139,7 @@ function LoungeServiceLoop() as void
if unknownSid if unknownSid
' We lost the session for some reason, so we need to rejoin the lounge ' We lost the session for some reason, so we need to rejoin the lounge
LogWarn("Lost session, rejoining") LogWarnNoTelemetry("Lost session, rejoining")
if not api.GetSessionData() if not api.GetSessionData()
Shutdown("Failed to rejoin session data") Shutdown("Failed to rejoin session data")
return return
@@ -78,7 +78,7 @@ namespace Sentry
response = request.Await() response = request.Await()
if not response.IsSuccess() if not response.IsSuccess()
#if DEBUG #if DEBUG
LogErrorNoTelemetry("Failed to send event to Sentry:", response.ErrorMessage()) LogErrorNoTelemetry("Failed to send event to Sentry:", response.ErrorMessage(), `\nHeaders:`, response.Headers())
#end if #end if
statusCode = response.StatusCode() statusCode = response.StatusCode()
@@ -13,6 +13,7 @@ end function
function OnNodeReady() as void function OnNodeReady() as void
m.tags = GetTags() m.tags = GetTags()
m.release = GetRelease(m.tags) m.release = GetRelease(m.tags)
m.dist = GetDist(m.tags)
m.userId = GetUserId() m.userId = GetUserId()
m.top.ObserveField("enabled", FuncName(OnEnabledChanged)) m.top.ObserveField("enabled", FuncName(OnEnabledChanged))
@@ -111,6 +112,7 @@ function TelemetryLoop() as void
level: levelMap[field] level: levelMap[field]
message: msg.getData() message: msg.getData()
release: m.release release: m.release
dist: m.dist
tags: m.tags tags: m.tags
userId: m.userId userId: m.userId
}) })
@@ -120,6 +122,7 @@ function TelemetryLoop() as void
level: data.level level: data.level
message: data.message message: data.message
release: m.release release: m.release
dist: m.dist
tags: m.tags tags: m.tags
userId: m.userId userId: m.userId
fingerprint: data.fingerprint fingerprint: data.fingerprint
@@ -156,11 +159,15 @@ function GetTags() as object
end function end function
function GetRelease(tags as object) as string function GetRelease(tags as object) as string
release = `${tags["app_version"]}-${tags["app_git_commit_hash"]}-${tags["lib_version"]}-${tags["lib_git_commit_hash"]}` return`${tags["lib_version"]}-${tags["lib_git_commit_hash"]}`
end function
function GetDist(tags as object) as string
dist = `${tags["app_version"]}-${tags["app_git_commit_hash"]}-${tags["lib_version"]}-${tags["lib_git_commit_hash"]}`
if tags["id"] = "dev" if tags["id"] = "dev"
release = release + "-dev" dist = dist + "-dev"
end if end if
return release return dist
end function end function
function GetUserId() as string function GetUserId() as string
@@ -17,6 +17,8 @@ function ExecuteJob() as void
return return
end if end if
DeleteFile("tmp:/last_generated_dash.xml")
if StringUtils.IsNullOrEmpty(contentNode.videoId) if StringUtils.IsNullOrEmpty(contentNode.videoId)
JobError("Can't load video information: videoId is missing") JobError("Can't load video information: videoId is missing")
return return
@@ -441,16 +441,14 @@ function OnVideoPlayerStateChange() as void
m.videoPlayingSuccess = true m.videoPlayingSuccess = true
end if end if
errorReported = false
if state = "error" if state = "error"
errorInfo = m.top.errorInfo errorInfo = m.top.errorInfo
errorData = GetPlayerErrorData(content.videoId, errorInfo) errorData = GetPlayerErrorData(content.videoId, errorInfo)
LogErrorNoTelemetry(errorData.title, errorData.body) LogErrorNoTelemetry(errorData.title, errorData.body)
m.global.telemetry.LogEvent = { ReportVideoError(errorData)
level: "error" errorReported = true
message: errorData.title + `\n` + errorData.body
fingerprint: errorData.fingerprint
}
if m.videoPlayingSuccess <> true if m.videoPlayingSuccess <> true
' http for stream format, mediaerror for DASH ' http for stream format, mediaerror for DASH
@@ -500,11 +498,9 @@ function OnVideoPlayerStateChange() as void
errorData = GetPlayerErrorData(content.videoId, errorInfo) errorData = GetPlayerErrorData(content.videoId, errorInfo)
LogErrorNoTelemetry(errorData.title, errorData.body) LogErrorNoTelemetry(errorData.title, errorData.body)
m.global.telemetry.LogEvent = { if not errorReported
level: "error" ReportVideoError(errorData)
message: errorData.title + `\n` + errorData.body end if
fingerprint: errorData.fingerprint
}
buttons = [Tr(Locale.Buttons.PlayNextVideo), Tr(Locale.Buttons.Cancel)] buttons = [Tr(Locale.Buttons.PlayNextVideo), Tr(Locale.Buttons.Cancel)]
@@ -551,6 +547,28 @@ function GetPlayerErrorData(videoId as string, errorInfo as object) as object
} }
end function end function
function ReportVideoError(errorData as object) as void
attachments = invalid
if errorData.body.Instr("malformed data") <> -1 or errorData.body.Instr("invalid pathname") <> -1
lastGeneratedDash = ReadAsciiFile("tmp:/last_generated_dash.xml")
if not StringUtils.IsNullOrEmpty(lastGeneratedDash)
attachments = [{
filename: "last_generated_dash.xml"
content_type: "application/dash+xml"
data: lastGeneratedDash
}]
DeleteFile("tmp:/last_generated_dash.xml")
end if
end if
m.global.telemetry.LogEvent = {
level: "error"
message: errorData.title + " " + errorData.body
fingerprint: errorData.fingerprint
attachments: attachments
}
end function
function OnVideoFinished() as void function OnVideoFinished() as void
if not VideoQueueUtils.PlayNext(m.videoQueue, m.invidious, m.preferences) if not VideoQueueUtils.PlayNext(m.videoQueue, m.invidious, m.preferences)
m.videoQueue.closePlayer = true m.videoQueue.closePlayer = true
@@ -51,6 +51,8 @@ namespace Http
response.SetBodyDataString(xmlContent) response.SetBodyDataString(xmlContent)
response.ContentType("application/dash+xml") response.ContentType("application/dash+xml")
WriteAsciiFile("tmp:/last_generated_dash.xml", xmlContent)
return true return true
end function end function
@@ -676,7 +676,7 @@ namespace Http
if not StringUtils.IsNullOrEmpty(index) if not StringUtils.IsNullOrEmpty(index)
index = index.ToInt() index = index.ToInt()
if index > 1 if index > 1
LogError("Playlet backend does not use playlist pagination (use continuation instead)") LogErrorNoTelemetry("Playlet backend does not use playlist pagination (use continuation instead)")
playlist.videos = [] playlist.videos = []
end if end if
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=00004 build_version=00005
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.41.4", "version": "0.41.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-web", "name": "playlet-web",
"version": "0.41.4", "version": "0.41.5",
"devDependencies": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^6.1.3", "@sveltejs/vite-plugin-svelte": "^6.1.3",
"@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.4", "version": "0.41.5",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",