Compare commits

..
3 Commits
Author SHA1 Message Date
Brahim Hadriche e8624cdb1f Release v0.44.8 (#847) 2026-04-24 11:01:28 -04:00
Brahim Hadriche d427989576 Watch history fix 2026-04-23 15:08:25 -04:00
Brahim Hadriche 4706d71639 Fix warning 2026-04-23 14:31:38 -04:00
17 changed files with 44 additions and 58 deletions

No files matched your search

+7
View File
@@ -5,6 +5,13 @@ 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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.44.8] - 2026-04-24
### Fixed
- Always use `signatureTimestamp` in `/player` calls to prevent "reload page" errors. This affects watch history.
- Attempt 2 to fix watch history and watch progress
## [0.44.7] - 2026-04-23
### Fixed
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet",
"version": "0.44.7",
"version": "0.44.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "playlet",
"version": "0.44.7",
"version": "0.44.8",
"hasInstallScript": true,
"devDependencies": {
"@rokucommunity/bslint": "^0.8.39",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet",
"version": "0.44.7",
"version": "0.44.8",
"description": "Unofficial YouTube client for Roku",
"devDependencies": {
"@rokucommunity/bslint": "^0.8.39",
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-app",
"version": "0.44.7",
"version": "0.44.8",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "playlet-app",
"version": "0.44.7"
"version": "0.44.8"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-app",
"version": "0.44.7",
"version": "0.44.8",
"description": "Unofficial YouTube client for Roku",
"scripts": {
"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
major_version=0
minor_version=44
build_version=00007
build_version=00008
ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-lib",
"version": "0.44.7",
"version": "0.44.8",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "playlet-lib",
"version": "0.44.7"
"version": "0.44.8"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-lib",
"version": "0.44.7",
"version": "0.44.8",
"description": "Unofficial YouTube client for Roku",
"scripts": {
"prebuild": "node ../tools/rm.js ../build/playlet-lib",
@@ -363,8 +363,6 @@ namespace InnertubeService
accessToken = OptionUtils.Get(options, "accessToken")
onBehalfOfUser = OptionUtils.Get(options, "onBehalfOfUser")
cpn = OptionUtils.Get(options, "cpn")
cmt = OptionUtils.GetOrDefault(options, "cmt", 0)
cmtStr = cmt.ToStr("%.3f")
videostatsPlaybackUrl = videostatsPlaybackUrl.replace("https://s.", "https://www.")
queryParams = UrlUtils.ParseQueryComponents(videostatsPlaybackUrl)
@@ -372,8 +370,9 @@ namespace InnertubeService
queryParams["cbrver"] = INNERTUBE_TV_CLIENT_VERSION
queryParams["cver"] = INNERTUBE_TV_CLIENT_VERSION
queryParams["ver"] = "2"
queryParams["cmt"] = "0"
queryParams["cpn"] = cpn
queryParams["cmt"] = cmtStr
queryParams["final"] = "1"
videostatsPlaybackUrl = UrlUtils.SetQueryParams(videostatsPlaybackUrl, queryParams)
request = HttpClient.Get(videostatsPlaybackUrl)
@@ -395,15 +394,13 @@ namespace InnertubeService
return true
end function
function AuthMarkVideoWatchTime(startTime as float, endTime as float, videostatsWatchtimeUrl as string, options = invalid as object) as boolean
function AuthMarkVideoWatchTime(time as float, videostatsWatchtimeUrl as string, options = invalid as object) as boolean
cancellation = OptionUtils.Get(options, "cancellation")
accessToken = OptionUtils.Get(options, "accessToken")
onBehalfOfUser = OptionUtils.Get(options, "onBehalfOfUser")
timeStr = time.ToStr("%.3f")
cpn = OptionUtils.Get(options, "cpn")
cmt = OptionUtils.GetOrDefault(options, "cmt", 0)
cmtStr = cmt.ToStr("%.3f")
stStr = startTime.ToStr("%.3f")
etStr = endTime.ToStr("%.3f")
videostatsWatchtimeUrl = videostatsWatchtimeUrl.replace("https://s.", "https://www.")
queryParams = UrlUtils.ParseQueryComponents(videostatsWatchtimeUrl)
@@ -412,9 +409,10 @@ namespace InnertubeService
queryParams["cver"] = INNERTUBE_TV_CLIENT_VERSION
queryParams["ver"] = "2"
queryParams["cpn"] = cpn
queryParams["cmt"] = cmtStr
queryParams["st"] = stStr
queryParams["et"] = etStr
queryParams["cmt"] = "0"
queryParams["st"] = timeStr
queryParams["et"] = timeStr
queryParams["final"] = "1"
videostatsWatchtimeUrl = UrlUtils.SetQueryParams(videostatsWatchtimeUrl, queryParams)
request = HttpClient.Get(videostatsWatchtimeUrl)
@@ -432,7 +430,7 @@ namespace InnertubeService
return false
end if
LogDebug("Marked video watch time:", stStr, "-", etStr)
LogDebug("Marked video watch time:", timeStr)
return true
end function
@@ -13,8 +13,6 @@ namespace Innertube
cancellation = OptionUtils.Get(options, "cancellation")
visitorData = OptionUtils.Get(options, "visitorData")
accessToken = OptionUtils.Get(options, "accessToken")
doSignatureTimestamp = ValidBool(OptionUtils.Get(options, "signatureTimestamp"))
cpn = InnertubeService.CreateClientPlaybackNonce()
useAccessToken = client = Innertube.ClientType.TV and not StringUtils.IsNullOrEmpty(accessToken)
@@ -52,12 +50,9 @@ namespace Innertube
"contentCheckOk": true
}
signatureTimestamp = invalid
if doSignatureTimestamp
signatureTimestamp = GetSignatureTimestamp(cancellation)
if signatureTimestamp <> invalid
payload["playbackContext"]["contentPlaybackContext"]["signatureTimestamp"] = signatureTimestamp
end if
signatureTimestamp = GetSignatureTimestamp(cancellation)
if signatureTimestamp <> invalid
payload["playbackContext"]["contentPlaybackContext"]["signatureTimestamp"] = signatureTimestamp
end if
request = HttpClient.PostJson("https://www.youtube.com/youtubei/v1/player?prettyPrint=false&alt=json", payload)
@@ -74,7 +74,6 @@ function ExecuteJob() as void
MessagePortUtils.ObserveFieldScopedExSafe(callbackNode, "watchTime", port)
CancellationUtils.ObserveCancellationScoped(cancellation, port)
successiveFailures = 0
lastReportedTime = 0.0
while true
message = wait(60000, port)
if CancellationUtils.IsCancellationEvent(cancellation, message)
@@ -97,27 +96,17 @@ function ExecuteJob() as void
end while
watchTime = message.getData()
' On seek-back, clamp st to not exceed et - I don't know if we really need to
if lastReportedTime > watchTime
lastReportedTime = watchTime - 20
if lastReportedTime < 0
lastReportedTime = 0
end if
end if
success = InnertubeService.AuthMarkVideoWatchTime(lastReportedTime, watchTime, playbackTrackingUrls.videostatsWatchtimeUrl, {
success = InnertubeService.AuthMarkVideoWatchTime(watchTime, playbackTrackingUrls.videostatsWatchtimeUrl, {
accessToken: authToken.token
onBehalfOfUser: authToken.activeIdentifyToken
cpn: cpn
' TODO:P1 if we pass cancellation here, http client will remove scoped
' observer, which is stored on the current node.
' This requires an extra observer node to be independent.
cmt: lastReportedTime
cancellation: invalid
})
if success
successiveFailures = 0
lastReportedTime = watchTime
else
successiveFailures += 1
end if
@@ -61,7 +61,6 @@ function ExecuteJob() as void
"visitorData": visitorData
"accessToken": accessToken
"onBehalfOfUser": onBehalfOfUser
"signatureTimestamp": true
})
else
metadata = service.GetVideoMetadata(contentNode.videoId, { cancellation: m.top.cancellation })
@@ -584,7 +584,6 @@ namespace Http
}
end if
else
options["signatureTimestamp"] = true
options["credentialTransferToken"] = m.loungeService.credentialTransferToken
metadata = InnertubeService.GetVideoMetadata(videoId, options)
end if
+1 -1
View File
@@ -3,7 +3,7 @@ title=PlayletLib
# Do not update version manually, it is auto updated from package.json
major_version=0
minor_version=44
build_version=00007
build_version=00008
ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p
+9 -10
View File
@@ -1,6 +1,7 @@
namespace DebugUtils
function PrintStackTrace(message = invalid as dynamic)
#if DEBUG
#if DEBUG
namespace DebugUtils
function PrintStackTrace(message = invalid as dynamic)
try
throw "Handled throw in DebugUtils.PrintStackTrace()"
catch error
@@ -15,11 +16,9 @@ namespace DebugUtils
end for
PrintInABox(lines)
end try
#end if
end function
end function
function PrintInABox(lines as object)
#if DEBUG
function PrintInABox(lines as object)
maxLen = 0
for each line in lines
if line.len() > maxLen
@@ -32,6 +31,6 @@ namespace DebugUtils
end for
out += `\n` + "╚" + string(maxLen + 2, "═") + "╝"
print out
#end if
end function
end namespace
end function
end namespace
#end if
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-web",
"version": "0.44.7",
"version": "0.44.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "playlet-web",
"version": "0.44.7",
"version": "0.44.8",
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^7.0.0",
"@tailwindcss/postcss": "^4.2.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-web",
"version": "0.44.7",
"version": "0.44.8",
"type": "module",
"scripts": {
"dev": "vite",