Compare commits

..
20 Commits
Author SHA1 Message Date
Brahim Hadriche 232af471f4 Release v0.41.8 (#723) 2025-09-07 10:59:03 -04:00
Brahim Hadriche f9844d9d4d [skip ci] Ignore "sendDebugCommand" - [13, [sendDebugCommand, {debugCommand: stats4nerds }]] 2025-09-07 10:40:39 -04:00
Brahim Hadriche fb811a6240 [skip ci] Improve reading http message header 2025-09-07 09:59:41 -04:00
Brahim Hadriche daf7966f4b Small tweak 2025-09-06 23:25:38 -04:00
Brahim Hadriche 4363c068d6 Dash: null check on urls (can be empty from Invidious for example) 2025-09-06 21:16:14 -04:00
Brahim Hadriche 714147a477 Ignore carouselItemRenderer 2025-09-06 20:59:59 -04:00
Brahim Hadriche f505d01785 Ignore tile 2025-09-06 20:57:06 -04:00
Brahim Hadriche 5f5b0bb8fd Ignore radioRenderer for now 2025-09-06 20:53:18 -04:00
Brahim Hadriche f5e715a782 Dash gen fix 2025-09-06 20:48:31 -04:00
Brahim Hadriche edb9ae1135 [skip ci] small tweak 2025-09-06 20:11:09 -04:00
Brahim Hadriche d0e7a01512 Release v0.41.7 (#722) 2025-09-06 19:59:16 -04:00
Brahim Hadriche 777a5b7311 Fix playback error when playing post live dvr videos 2025-09-06 19:51:11 -04:00
Brahim Hadriche 8a458fb38b [skip ci] dash missing warnings/errors 2025-09-06 16:48:55 -04:00
Brahim Hadriche 47a7ea21e6 Refactor custom events 2025-09-06 13:58:42 -04:00
Brahim Hadriche c9a0e96905 Revert "Fix bug in httprequest class when calling m.global"
This reverts commit 087c1c011a.
2025-09-06 13:46:36 -04:00
Brahim Hadriche 087c1c011a Fix bug in httprequest class when calling m.global 2025-09-06 13:33:19 -04:00
Brahim Hadriche a9219f0ef9 [skip ci] Silence "Unknown SID" longpoller errors 2025-09-06 13:08:03 -04:00
Brahim Hadriche ce43e5fca5 Update client versions 2025-09-06 12:19:42 -04:00
Brahim Hadriche 0ddd3cf0e2 [skip ci] Add url to error report 2025-09-06 11:56:30 -04:00
Brahim Hadriche e1c8b5284f Ignore "Open YouTube Kids" tile 2025-09-06 11:52:13 -04:00
25 changed files with 117 additions and 53 deletions

No files matched your search

+13
View File
@@ -5,6 +5,19 @@ 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.8] - 2025-09-07
### Fixed
- Bug in dash generation
- Bug in http server
## [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.8",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet", "name": "playlet",
"version": "0.41.6", "version": "0.41.8",
"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.8",
"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.8",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-app", "name": "playlet-app",
"version": "0.41.6" "version": "0.41.8"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.41.6", "version": "0.41.8",
"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=00008
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.8",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.41.6" "version": "0.41.8"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.41.6", "version": "0.41.8",
"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
@@ -39,6 +39,9 @@ class DashManifest
if local and m.invidiousInstance <> Invidious.PLAYLET_BUILT_IN_INSTANCE if local and m.invidiousInstance <> Invidious.PLAYLET_BUILT_IN_INSTANCE
parsedInvidiousUrl = UrlUtils.ParseUrl(m.invidiousInstance) parsedInvidiousUrl = UrlUtils.ParseUrl(m.invidiousInstance)
for i = 0 to adaptiveFormats.Count() - 1 for i = 0 to adaptiveFormats.Count() - 1
if StringUtils.IsNullOrEmpty(adaptiveFormats[i].url)
continue for
end if
parsedUrl = UrlUtils.ParseUrl(adaptiveFormats[i].url) parsedUrl = UrlUtils.ParseUrl(adaptiveFormats[i].url)
parsedInvidiousUrl.path = UrlUtils.AppendQueryParams(parsedUrl.path, { host: parsedUrl.host }) parsedInvidiousUrl.path = UrlUtils.AppendQueryParams(parsedUrl.path, { host: parsedUrl.host })
adaptiveFormats[i].url = UrlUtils.BuildUrlFromParts(parsedInvidiousUrl) adaptiveFormats[i].url = UrlUtils.BuildUrlFromParts(parsedInvidiousUrl)
@@ -113,9 +116,9 @@ class DashManifest
"value": `${stream.audioChannels}` "value": `${stream.audioChannels}`
}) })
if stream.url = invalid if StringUtils.IsNullOrEmpty(stream.url)
xml.Comment(`[ERROR] Stream.url is invalid for itag: ${stream.itag}`) xml.Comment(`[ERROR] Stream.url is null or empty for itag: ${stream.itag}`)
else stream.url.InStr("source=yt_live_broadcast") else if stream.url.InStr("source=yt_live_broadcast") <> -1
xml.Comment(`[WARN] Stream URL indicates a live broadcast for itag: ${stream.itag}`) xml.Comment(`[WARN] Stream URL indicates a live broadcast for itag: ${stream.itag}`)
end if end if
xml.TextNode("BaseURL", ValidString(stream.url)) xml.TextNode("BaseURL", ValidString(stream.url))
@@ -181,11 +184,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 if stream.url.InStr("source=yt_live_broadcast") <> -1
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
@@ -91,6 +91,11 @@ namespace Innertube
"gridContinuation": ParseGridContinuation "gridContinuation": ParseGridContinuation
"tvSurfaceContentContinuation": ParseTvSurfaceContentContinuation "tvSurfaceContentContinuation": ParseTvSurfaceContentContinuation
' Ignored nodes: ' Ignored nodes:
' radioRenderer seems like a Mix https://github.com/iBicha/playlet/issues/709
"radioRenderer": ParseNotImplemented
' A carousel of videos, found on the home tab of a channel.
' Should probably be parsed.
"carouselItemRenderer": ParseNotImplemented
' Movies are not supported. ' Movies are not supported.
"movieRenderer": ParseNotImplemented "movieRenderer": ParseNotImplemented
"compactMovieRenderer": ParseNotImplemented "compactMovieRenderer": ParseNotImplemented
@@ -1251,6 +1256,20 @@ 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 = ""
' "Open YouTube Kids" tileRenderer
eventTrigger = ValidString(ObjectUtils.Dig(nodeData, ["onSelectCommand", "authDeterminedCommand", "authenticatedCommand", "authRequiredCommand", "identityActionContext", "eventTrigger"]))
if eventTrigger = "ACCOUNT_EVENT_TRIGGER_YTK_WORMHOLE"
LogWarnNoTelemetry("Skipping tileRenderer without contentType for YouTube Kids")
return invalid
end if
' "More news" tileRenderer
browseId = ValidString(ObjectUtils.Dig(nodeData, ["onSelectCommand", "browseEndpoint", "browseId"]))
if browseId = "FEtopics_news"
LogWarnNoTelemetry("Skipping tileRenderer without contentType for FEtopics_news")
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 +1758,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 +1771,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
@@ -66,6 +66,7 @@ class LoungeApi
commandHandlers[COMMAND_TYPE_GET_DISCOVERT_DEVICE_ID] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_GET_DISCOVERT_DEVICE_ID] = m.HandleIgnoreCommand
commandHandlers[COMMAND_TYPE_GRACEFUL_RECONNECT] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_GRACEFUL_RECONNECT] = m.HandleIgnoreCommand
commandHandlers[COMMAND_TYPE_GET_RECEIVER_STATUS] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_GET_RECEIVER_STATUS] = m.HandleIgnoreCommand
commandHandlers[COMMAND_TYPE_SEND_DEBUG_COMMAND] = m.HandleIgnoreCommand
commandHandlers[COMMAND_TYPE_GET_NOW_PLAYING] = m.HandleGetPlayingNow commandHandlers[COMMAND_TYPE_GET_NOW_PLAYING] = m.HandleGetPlayingNow
commandHandlers[COMMAND_TYPE_SESSION_ID] = m.HandleSessionId commandHandlers[COMMAND_TYPE_SESSION_ID] = m.HandleSessionId
@@ -323,6 +324,9 @@ class LoungeApi
m[handler](commandIndex, commandType, commandArgs, messagesToSend) m[handler](commandIndex, commandType, commandArgs, messagesToSend)
else else
LogWarn("Unknown command type:", commandType, "command:", command) LogWarn("Unknown command type:", commandType, "command:", command)
#if DEBUG
throw `Unknown command type: ${commandType} command: ${ToString(command)}`
#end if
end if end if
end for end for
end function end function
@@ -28,6 +28,7 @@ const COMMAND_TYPE_ON_USER_ACTIVITY = "onUserActivity"
const COMMAND_TYPE_GET_DISCOVERT_DEVICE_ID = "getDiscoveryDeviceId" const COMMAND_TYPE_GET_DISCOVERT_DEVICE_ID = "getDiscoveryDeviceId"
const COMMAND_TYPE_GRACEFUL_RECONNECT = "gracefulReconnect" const COMMAND_TYPE_GRACEFUL_RECONNECT = "gracefulReconnect"
const COMMAND_TYPE_GET_RECEIVER_STATUS = "getReceiverStatus" const COMMAND_TYPE_GET_RECEIVER_STATUS = "getReceiverStatus"
const COMMAND_TYPE_SEND_DEBUG_COMMAND = "sendDebugCommand"
' Special commands ' Special commands
const COMMAND_TYPE_SESSION_ID = "c" const COMMAND_TYPE_SESSION_ID = "c"
const COMMAND_TYPE_G_SESSION_ID = "S" const COMMAND_TYPE_G_SESSION_ID = "S"
@@ -126,7 +126,7 @@ function CreateStreamUrls(metadata as object, service as Invidious.InvidiousServ
streamUrls = [] streamUrls = []
if metadata.hlsUrl <> invalid if not StringUtils.IsNullOrEmpty(metadata.hlsUrl)
metadata.hlsUrl = AddInstanceToUrlIfNeeded(metadata.hlsUrl, instance) metadata.hlsUrl = AddInstanceToUrlIfNeeded(metadata.hlsUrl, instance)
AddHlsUrls(streamUrls, metadata, preferredQuality, backend, proxyVideos, playletServerPort) AddHlsUrls(streamUrls, metadata, preferredQuality, backend, proxyVideos, playletServerPort)
else else
@@ -248,7 +248,6 @@ function SetCaptions(metadata as object, service as object, contentNode as objec
return return
end if end if
' TODO:P2 we don't need to read and parse this every time
isoLanguageList = ParseJson(ReadAsciiFile("libpkg:/config/ISO-639-1-to-ISO-639-2T.json5")) isoLanguageList = ParseJson(ReadAsciiFile("libpkg:/config/ISO-639-1-to-ISO-639-2T.json5"))
instance = service.GetInstance() instance = service.GetInstance()
@@ -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
@@ -462,6 +462,10 @@ function OnVideoPlayerStateChange() as void
nextUrl = playletStreamUrls[playletStreamUrlIndex] nextUrl = playletStreamUrls[playletStreamUrlIndex]
LogError(`Stream ${currentUrl} failed to play. Trying next stream ${nextUrl}`) LogError(`Stream ${currentUrl} failed to play. Trying next stream ${nextUrl}`)
if StringUtils.IsNullOrEmpty(nextUrl)
LogError("Next stream URL is empty, cannot try next stream")
end if
content.url = nextUrl content.url = nextUrl
SeekToInitialPosition(content) SeekToInitialPosition(content)
@@ -499,7 +503,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 +551,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 +575,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 + `\nurl: ${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
@@ -96,15 +96,22 @@ namespace Http
return false return false
end if end if
operation = m.ReadHeaderLine() firstChar = m.buffer.Mid(0, 1)
if Asc(firstChar) = &h16
LogErrorNoTelemetry("TLS handshake detected. HTTPS is not supported.")
m.ready_for_response = true
return false
end if
if operation = invalid or operation = "" operation = m.ReadHeaderLine()
LogErrorNoTelemetry("empty request") ' Sometimes the first line is long enough that it doesn't fit in one read
m.global.telemetry.LogEvent = { ' (e.g. very long URL). In that case, we just wait for more
level: "error" if operation = invalid
message: "empty request: " + FormatJson({ "m.buffer": m.buffer, "m.buffer_index": m.buffer_index }) return false
fingerprint: ["HttpRequest: empty request"] end if
}
if operation = ""
LogError("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=00008
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.8",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-web", "name": "playlet-web",
"version": "0.41.6", "version": "0.41.8",
"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.8",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",