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