Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
688206ef91 | ||
|
|
3acc1bf9c9 | ||
|
|
21b1a9ea81 | ||
|
|
3f252a9b11 | ||
|
|
c5146017a8 | ||
|
|
7f58809737 | ||
|
|
6748390ac4 | ||
|
|
d2fac255ed | ||
|
|
dbcfc46dad | ||
|
|
671719905b | ||
|
|
5417f5d61d | ||
|
|
ee0abc9891 | ||
|
|
bb7407f75f | ||
|
|
b101872906 | ||
|
|
8f42bfa675 | ||
|
|
b8d2008b98 | ||
|
|
36910ab5cf | ||
|
|
ae09f711df |
No files matched your search
@@ -5,6 +5,33 @@ 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.17] - 2025-09-19
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Various fixes and improvements
|
||||||
|
|
||||||
|
## [0.41.16] - 2025-09-19
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Various fixes and improvements
|
||||||
|
|
||||||
|
## [0.41.15] - 2025-09-19
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Rare crash when loading video feed
|
||||||
|
- Improve session data error handling
|
||||||
|
|
||||||
|
## [0.41.14] - 2025-09-18
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Try fetching multiple pages in the search, in case results are filtered out (e.g. shorts)
|
||||||
|
- Regression for `Attempt to play the next video when errors occur`
|
||||||
|
- Better handling for lounge lost sessions
|
||||||
|
|
||||||
## [0.41.13] - 2025-09-18
|
## [0.41.13] - 2025-09-18
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.41.13",
|
"version": "0.41.17",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.41.13",
|
"version": "0.41.17",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.35",
|
"@rokucommunity/bslint": "^0.8.35",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.41.13",
|
"version": "0.41.17",
|
||||||
"description": "Unofficial YouTube client for Roku",
|
"description": "Unofficial YouTube client for Roku",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.35",
|
"@rokucommunity/bslint": "^0.8.35",
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.41.13",
|
"version": "0.41.17",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.41.13"
|
"version": "0.41.17"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.41.13",
|
"version": "0.41.17",
|
||||||
"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",
|
||||||
|
|||||||
@@ -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=00013
|
build_version=00017
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.41.13",
|
"version": "0.41.17",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.41.13"
|
"version": "0.41.17"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.41.13",
|
"version": "0.41.17",
|
||||||
"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",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function ExecuteJob() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
isInnertubeProfile = authToken.profileNode.type = "youtube"
|
isInnertubeProfile = authToken.profileNode.type = "youtube"
|
||||||
if isInnertubeProfile
|
if isInnertubeProfile
|
||||||
subscriptionStatus = InnertubeService.GetSubscriptionStatusForChannel(ucid, {
|
subscriptionStatus = InnertubeService.GetSubscriptionStatusForChannel(ucid, {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ function ExecuteJob() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
service = new Invidious.InvidiousService(invidiousNode)
|
service = new Invidious.InvidiousService(invidiousNode)
|
||||||
|
|
||||||
if subscribe
|
if subscribe
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ function ExecuteJob() as void
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
service = new Invidious.InvidiousService(invidiousNode)
|
service = new Invidious.InvidiousService(invidiousNode)
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
response = service.GetChannel(contentNode.authorId, cancellation)
|
response = service.GetChannel(contentNode.authorId, cancellation)
|
||||||
|
|
||||||
if JobIsCancelled()
|
if JobIsCancelled()
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function ExecuteJob() as void
|
|||||||
|
|
||||||
service = new Invidious.InvidiousService(invidiousNode)
|
service = new Invidious.InvidiousService(invidiousNode)
|
||||||
instance = service.GetInstance()
|
instance = service.GetInstance()
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
|
|
||||||
while true
|
while true
|
||||||
playlistId = contentNode.playlistId
|
playlistId = contentNode.playlistId
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ function ExecuteJob() as void
|
|||||||
accessTokenObject = input.accessTokenObject
|
accessTokenObject = input.accessTokenObject
|
||||||
profilesService = input.profilesService
|
profilesService = input.profilesService
|
||||||
try
|
try
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
if InnertubeService.AuthRefreshAccessToken(accessTokenObject, cancellation)
|
if InnertubeService.AuthRefreshAccessToken(accessTokenObject, cancellation)
|
||||||
profileNode.expiresIn = accessTokenObject.expiresIn
|
profileNode.expiresIn = accessTokenObject.expiresIn
|
||||||
profileNode.expiresTimestamp = accessTokenObject.expiresTimestamp
|
profileNode.expiresTimestamp = accessTokenObject.expiresTimestamp
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ function ExecuteJob() as void
|
|||||||
profilesNode = input.profilesService
|
profilesNode = input.profilesService
|
||||||
dialogNode = input.dialog
|
dialogNode = input.dialog
|
||||||
|
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
' TODO:P2 cache client identity
|
' TODO:P2 cache client identity
|
||||||
authCode = InnertubeService.AuthGetCode(cancellation)
|
authCode = InnertubeService.AuthGetCode(cancellation)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import "pkg:/source/utils/AssertUtils.bs"
|
import "pkg:/source/utils/AssertUtils.bs"
|
||||||
|
import "pkg:/source/utils/CancellationUtils.bs"
|
||||||
import "pkg:/source/utils/ErrorUtils.bs"
|
import "pkg:/source/utils/ErrorUtils.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
import "pkg:/source/utils/MessagePortUtils.bs"
|
import "pkg:/source/utils/MessagePortUtils.bs"
|
||||||
@@ -22,6 +23,10 @@ function JobGetCallbackNode() as dynamic
|
|||||||
return m._callback
|
return m._callback
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function JobGetCancellation() as dynamic
|
||||||
|
return CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
||||||
|
end function
|
||||||
|
|
||||||
function JobSuccess() as void
|
function JobSuccess() as void
|
||||||
callbackNode = JobGetCallbackNode()
|
callbackNode = JobGetCallbackNode()
|
||||||
if callbackNode = invalid
|
if callbackNode = invalid
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ function Init()
|
|||||||
scene.enableSystemLogType = "http.complete"
|
scene.enableSystemLogType = "http.complete"
|
||||||
scene.enableSystemLogType = "bandwidth.minute"
|
scene.enableSystemLogType = "bandwidth.minute"
|
||||||
#end if
|
#end if
|
||||||
m.sysLogEventDropCounter = 0
|
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@@ -114,17 +113,31 @@ function OnLineSysLog(event as object, dateTime as object, logsFile as string, b
|
|||||||
buffer.FromAsciiString(line + `\n`)
|
buffer.FromAsciiString(line + `\n`)
|
||||||
buffer.AppendFile(logsFile)
|
buffer.AppendFile(logsFile)
|
||||||
|
|
||||||
' Only report 1 in 10 system log errors
|
fingerprint = `SysLog${info.Status}${info.LogType}${info.HttpCode}${info.Method}`
|
||||||
' They're usually repetitive, one is reported for each stream in a DASH
|
|
||||||
' when a video is blocked
|
if m.sysLogEventTimer = invalid
|
||||||
if m.sysLogEventDropCounter = 0
|
m.sysLogEventTimer = CreateObject("roTimespan")
|
||||||
|
m.sysLogFingerprint = fingerprint
|
||||||
LogTelemetryEvent({
|
LogTelemetryEvent({
|
||||||
level: "error"
|
level: "error"
|
||||||
message: line
|
message: line
|
||||||
fingerprint: ["SysLog", info.Status, info.LogType, info.HttpCode, info.Method]
|
fingerprint: [fingerprint]
|
||||||
})
|
})
|
||||||
|
return
|
||||||
end if
|
end if
|
||||||
m.sysLogEventDropCounter = (m.sysLogEventDropCounter + 1) mod 10
|
|
||||||
|
' Only log one syslog error per minute (or if the fingerprint changes) to avoid spamming
|
||||||
|
if m.sysLogEventTimer.TotalSeconds() < 60 and m.sysLogFingerprint = fingerprint
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
m.sysLogEventTimer.Mark()
|
||||||
|
m.sysLogFingerprint = fingerprint
|
||||||
|
|
||||||
|
LogTelemetryEvent({
|
||||||
|
level: "error"
|
||||||
|
message: line
|
||||||
|
fingerprint: [fingerprint]
|
||||||
|
})
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnLineLogMonitorMemoryWarning(event as object, dateTime as object, logsFile as string, buffer as object) as void
|
function OnLineLogMonitorMemoryWarning(event as object, dateTime as object, logsFile as string, buffer as object) as void
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ function ExecuteJob() as void
|
|||||||
content = PrepareTests()
|
content = PrepareTests()
|
||||||
listNode.content = content
|
listNode.content = content
|
||||||
|
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
RunTests(instance, content, cancellation)
|
RunTests(instance, content, cancellation)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ function ExecuteJob() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
response = HttpClient.Get(Invidious.INSTANCES_API).Cancellation(cancellation).Await()
|
response = HttpClient.Get(Invidious.INSTANCES_API).Cancellation(cancellation).Await()
|
||||||
if response.IsCancelled()
|
if response.IsCancelled()
|
||||||
JobCancel()
|
JobCancel()
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import "pkg:/source/utils/CancellationUtils.bs"
|
|||||||
|
|
||||||
@job("LatestLibVersionJob")
|
@job("LatestLibVersionJob")
|
||||||
function ExecuteJob() as void
|
function ExecuteJob() as void
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
latest = GetLatestPlayletLibVersionFromGithubReleases(cancellation)
|
latest = GetLatestPlayletLibVersionFromGithubReleases(cancellation)
|
||||||
JobSuccessData({
|
JobSuccessData({
|
||||||
latest: latest
|
latest: latest
|
||||||
|
|||||||
@@ -153,6 +153,10 @@ namespace InnertubeService
|
|||||||
nextResponse = nextRequest.Await()
|
nextResponse = nextRequest.Await()
|
||||||
|
|
||||||
if not nextResponse.IsSuccess()
|
if not nextResponse.IsSuccess()
|
||||||
|
if nextResponse.IsCancelled()
|
||||||
|
return parsedResponse
|
||||||
|
end if
|
||||||
|
|
||||||
error = nextResponse.ErrorMessage()
|
error = nextResponse.ErrorMessage()
|
||||||
LogWarn(error)
|
LogWarn(error)
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ function ExecuteJob() as void
|
|||||||
|
|
||||||
innertubeNode = input.innertube
|
innertubeNode = input.innertube
|
||||||
|
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
sessionData = Innertube.GetSessionData(cancellation)
|
sessionData = Innertube.GetSessionData(cancellation)
|
||||||
if sessionData = invalid
|
if sessionData.error <> invalid
|
||||||
JobError("Failed to fetch session data")
|
JobError(sessionData.error)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,23 @@ namespace Innertube
|
|||||||
return parsedResponse
|
return parsedResponse
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
endscreen = playerOverlayRenderer["endScreen"]
|
||||||
|
|
||||||
|
feeds = Innertube.ParseResponseDataForFeeds(endscreen, {
|
||||||
|
response: httpResponse
|
||||||
|
noContainers: true
|
||||||
|
})
|
||||||
|
if feeds.Count() > 0
|
||||||
|
parsedResponse["recommendedVideos"] = ValidArray(feeds[0].items)
|
||||||
|
end if
|
||||||
|
|
||||||
|
' Sometimes the title and author are missing in /player respnonse, so we get them here.
|
||||||
|
' But if we have an error, we don't need them, recommendedVideos is enough to play the
|
||||||
|
' next video, after showing the error dialog.
|
||||||
|
if parsedResponse.error <> invalid
|
||||||
|
return parsedResponse
|
||||||
|
end if
|
||||||
|
|
||||||
if StringUtils.IsNullOrEmpty(parsedResponse.title)
|
if StringUtils.IsNullOrEmpty(parsedResponse.title)
|
||||||
title = ParseText(ObjectUtils.Dig(playerOverlayRenderer, ["videoDetails", "playerOverlayVideoDetailsRenderer", "title"]))
|
title = ParseText(ObjectUtils.Dig(playerOverlayRenderer, ["videoDetails", "playerOverlayVideoDetailsRenderer", "title"]))
|
||||||
if not StringUtils.IsNullOrEmpty(title)
|
if not StringUtils.IsNullOrEmpty(title)
|
||||||
@@ -60,21 +77,6 @@ namespace Innertube
|
|||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if not IsArray(parsedResponse.recommendedVideos)
|
|
||||||
LogWarn("Invalid recommended videos", parsedResponse.recommendedVideos)
|
|
||||||
return parsedResponse
|
|
||||||
end if
|
|
||||||
|
|
||||||
endscreen = playerOverlayRenderer["endScreen"]
|
|
||||||
|
|
||||||
feeds = Innertube.ParseResponseDataForFeeds(endscreen, {
|
|
||||||
response: httpResponse
|
|
||||||
noContainers: true
|
|
||||||
})
|
|
||||||
if feeds.Count() > 0
|
|
||||||
parsedResponse.recommendedVideos.Append(ValidArray(feeds[0].items))
|
|
||||||
end if
|
|
||||||
|
|
||||||
return parsedResponse
|
return parsedResponse
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,14 @@ namespace Innertube
|
|||||||
|
|
||||||
Innertube.ParseNode(containers, context)
|
Innertube.ParseNode(containers, context)
|
||||||
|
|
||||||
if context.currentFeed <> invalid and (context.currentFeed.items.Count() > 0 or context.currentFeed.title <> "")
|
if context.currentFeed <> invalid
|
||||||
context.feeds.Push(context.currentFeed)
|
hasTitle = context.currentFeed.title <> ""
|
||||||
context.currentFeed = invalid
|
hasItems = context.currentFeed.items.Count() > 0
|
||||||
|
hasContinuation = context.currentFeed.DoesExist("continuation")
|
||||||
|
if hasTitle or hasItems or hasContinuation
|
||||||
|
context.feeds.Push(context.currentFeed)
|
||||||
|
context.currentFeed = invalid
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
return context.feeds
|
return context.feeds
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -119,10 +119,6 @@ namespace Innertube
|
|||||||
parsedResponse["formatStreams"] = formats
|
parsedResponse["formatStreams"] = formats
|
||||||
parsedResponse["captions"] = ParseCaptions(payload)
|
parsedResponse["captions"] = ParseCaptions(payload)
|
||||||
|
|
||||||
if not IsArray(parsedResponse["recommendedVideos"])
|
|
||||||
parsedResponse["recommendedVideos"] = []
|
|
||||||
end if
|
|
||||||
|
|
||||||
if not StringUtils.IsNullOrEmpty(videoDetails["title"])
|
if not StringUtils.IsNullOrEmpty(videoDetails["title"])
|
||||||
parsedResponse["title"] = videoDetails["title"]
|
parsedResponse["title"] = videoDetails["title"]
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ namespace Innertube
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
sessionData = RequestSessionData(cancellation)
|
sessionData = RequestSessionData(cancellation)
|
||||||
|
if sessionData.error <> invalid
|
||||||
|
return sessionData
|
||||||
|
end if
|
||||||
SaveSessionDataToRegistry(sessionData)
|
SaveSessionDataToRegistry(sessionData)
|
||||||
return sessionData
|
return sessionData
|
||||||
end function
|
end function
|
||||||
@@ -31,11 +34,13 @@ namespace Innertube
|
|||||||
"Referer": "https://www.youtube.com/sw.js"
|
"Referer": "https://www.youtube.com/sw.js"
|
||||||
})
|
})
|
||||||
request.Cancellation(cancellation)
|
request.Cancellation(cancellation)
|
||||||
|
request.TryCount(2)
|
||||||
|
|
||||||
response = request.Await()
|
response = request.Await()
|
||||||
if not response.IsSuccess()
|
if not response.IsSuccess()
|
||||||
LogError("Failed to fetch session data", response.ErrorMessage())
|
return {
|
||||||
return invalid
|
"error": "Failed to fetch session data: " + response.ErrorMessage()
|
||||||
|
}
|
||||||
end if
|
end if
|
||||||
|
|
||||||
text = response.Text()
|
text = response.Text()
|
||||||
@@ -43,14 +48,16 @@ namespace Innertube
|
|||||||
|
|
||||||
json = ParseJson(text)
|
json = ParseJson(text)
|
||||||
if json = invalid
|
if json = invalid
|
||||||
LogError("Failed to parse session data", text)
|
return {
|
||||||
return invalid
|
"error": "Failed to parse session data: " + text
|
||||||
|
}
|
||||||
end if
|
end if
|
||||||
|
|
||||||
visitorData = ObjectUtils.Dig(json, [0, 2, 0, 0, 13])
|
visitorData = ObjectUtils.Dig(json, [0, 2, 0, 0, 13])
|
||||||
if StringUtils.IsNullOrEmpty(visitorData)
|
if StringUtils.IsNullOrEmpty(visitorData)
|
||||||
LogError("Visitor data not found", text)
|
return {
|
||||||
return invalid
|
"error": "Failed to find visitorData in session data: " + text
|
||||||
|
}
|
||||||
end if
|
end if
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -60,10 +67,6 @@ namespace Innertube
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function SaveSessionDataToRegistry(sessionData as object) as void
|
function SaveSessionDataToRegistry(sessionData as object) as void
|
||||||
if sessionData = invalid
|
|
||||||
return
|
|
||||||
end if
|
|
||||||
|
|
||||||
sessionData.__version = SESSION_DATA_VERSION
|
sessionData.__version = SESSION_DATA_VERSION
|
||||||
|
|
||||||
RegistryUtils.Write(RegistryUtils.INNERTUBE_SESSION_DATA, FormatJson(sessionData))
|
RegistryUtils.Write(RegistryUtils.INNERTUBE_SESSION_DATA, FormatJson(sessionData))
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ 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
|
||||||
if m.status_code = 400 and m.status_text = "Unknown SID"
|
if m.status_code = 410 or (m.status_code = 400 and m.status_text = "Unknown SID")
|
||||||
LogErrorNoTelemetry("Invalid status code:", m.status_code, m.status_text, `\nResponse data:`, m.socket_buffer)
|
LogErrorNoTelemetry("Invalid status code:", m.status_code, m.status_text, `\nResponse data:`, m.socket_buffer)
|
||||||
else
|
else
|
||||||
LogError("Invalid status code:", m.status_code, m.status_text, `\nResponse data:`, m.socket_buffer)
|
LogError("Invalid status code:", m.status_code, m.status_text, `\nResponse data:`, m.socket_buffer)
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ function ExecuteJob() as void
|
|||||||
form["access_type"] = "permanent"
|
form["access_type"] = "permanent"
|
||||||
form["app"] = "Playlet"
|
form["app"] = "Playlet"
|
||||||
|
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
request = HttpClient.Post("https://www.youtube.com/api/lounge/pairing/get_pairing_code?ctx=pair", "")
|
request = HttpClient.Post("https://www.youtube.com/api/lounge/pairing/get_pairing_code?ctx=pair", "")
|
||||||
request.UrlEncodedForm(form)
|
request.UrlEncodedForm(form)
|
||||||
request.Cancellation(cancellation)
|
request.Cancellation(cancellation)
|
||||||
|
|||||||
@@ -123,14 +123,14 @@ function LoungeServiceLoop() as void
|
|||||||
|
|
||||||
unknownSid = false
|
unknownSid = false
|
||||||
' TODO:P2 move this check somewhere else
|
' TODO:P2 move this check somewhere else
|
||||||
if api.poller.status_code = 400 and ValidString(api.poller.status_text) = "Unknown SID"
|
if (api.poller.status_code = 410) or (api.poller.status_code = 400 and ValidString(api.poller.status_text) = "Unknown SID")
|
||||||
api.poller.status_code = 0
|
api.poller.status_code = 0
|
||||||
unknownSid = true
|
unknownSid = true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if not unknownSid
|
if not unknownSid
|
||||||
for each result in outgoingLoungeMessagesResults
|
for each result in outgoingLoungeMessagesResults
|
||||||
if result.status = 400 and result.error.InStr("Unknown SID") <> -1
|
if result.status = 410 or (result.status = 400 and result.error.InStr("Unknown SID") <> -1)
|
||||||
unknownSid = true
|
unknownSid = true
|
||||||
exit for
|
exit for
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ function ExecuteJob() as void
|
|||||||
categories = input.categories
|
categories = input.categories
|
||||||
|
|
||||||
service = new SponsorBlock.SponsorBlockService()
|
service = new SponsorBlock.SponsorBlockService()
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
skipSegments = service.GetSkipSegmentsForVideo(videoId, cancellation)
|
skipSegments = service.GetSkipSegmentsForVideo(videoId, cancellation)
|
||||||
|
|
||||||
skipSegments = ProcessSkipSegments(skipSegments, showNotifications, categories, service)
|
skipSegments = ProcessSkipSegments(skipSegments, showNotifications, categories, service)
|
||||||
|
|||||||
@@ -28,18 +28,6 @@ namespace Sentry
|
|||||||
event.timestamp = timestamp
|
event.timestamp = timestamp
|
||||||
end if
|
end if
|
||||||
|
|
||||||
message = event.message
|
|
||||||
|
|
||||||
hasAttachments = IsArray(event.attachments) and event.attachments.Count() > 0
|
|
||||||
|
|
||||||
if (not SUPPORTS_ATTACHMENTS) and hasAttachments
|
|
||||||
message += `\nAttachments: (${event.attachments.Count()} files)`
|
|
||||||
for each attachment in event.attachments
|
|
||||||
message += `\nAttachment: ${attachment.filename} (${attachment.content_type})\n${attachment.data}`
|
|
||||||
end for
|
|
||||||
message += `\nEnd of attachments.`
|
|
||||||
end if
|
|
||||||
|
|
||||||
eventPayload = {
|
eventPayload = {
|
||||||
event_id: event.event_id
|
event_id: event.event_id
|
||||||
timestamp: event.timestamp
|
timestamp: event.timestamp
|
||||||
@@ -52,14 +40,17 @@ namespace Sentry
|
|||||||
release: event.release
|
release: event.release
|
||||||
tags: event.tags
|
tags: event.tags
|
||||||
level: event.level
|
level: event.level
|
||||||
logentry: {
|
|
||||||
formatted: message
|
|
||||||
}
|
|
||||||
user: {
|
user: {
|
||||||
id: event.userId
|
id: event.userId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message = event.message
|
||||||
|
|
||||||
|
if event.fingerprint = invalid
|
||||||
|
event.fingerprint = GetFingerprint(message)
|
||||||
|
end if
|
||||||
|
|
||||||
if event.fingerprint <> invalid
|
if event.fingerprint <> invalid
|
||||||
fingerprint = event.fingerprint
|
fingerprint = event.fingerprint
|
||||||
if not IsArray(fingerprint)
|
if not IsArray(fingerprint)
|
||||||
@@ -73,6 +64,20 @@ namespace Sentry
|
|||||||
eventPayload.fingerprint = fingerprint
|
eventPayload.fingerprint = fingerprint
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
hasAttachments = IsArray(event.attachments) and event.attachments.Count() > 0
|
||||||
|
|
||||||
|
if (not SUPPORTS_ATTACHMENTS) and hasAttachments
|
||||||
|
message += `\nAttachments: (${event.attachments.Count()} files)`
|
||||||
|
for each attachment in event.attachments
|
||||||
|
message += `\nAttachment: ${attachment.filename} (${attachment.content_type})\n${attachment.data}`
|
||||||
|
end for
|
||||||
|
message += `\nEnd of attachments.`
|
||||||
|
end if
|
||||||
|
|
||||||
|
eventPayload.logentry = {
|
||||||
|
formatted: message
|
||||||
|
}
|
||||||
|
|
||||||
payload += FormatJson(eventPayload) + `\n`
|
payload += FormatJson(eventPayload) + `\n`
|
||||||
|
|
||||||
if SUPPORTS_ATTACHMENTS and hasAttachments
|
if SUPPORTS_ATTACHMENTS and hasAttachments
|
||||||
@@ -119,4 +124,37 @@ namespace Sentry
|
|||||||
return eventId
|
return eventId
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function GetFingerprint(message as dynamic) as dynamic
|
||||||
|
if StringUtils.IsNullOrEmpty(message)
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
' Replaces `\nRequestId: 12345678\n` with `\nRequestId: <REQUEST_ID>\n`
|
||||||
|
fingerprint = ReplaceRequestId(message)
|
||||||
|
if fingerprint = invalid
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
return [fingerprint]
|
||||||
|
end function
|
||||||
|
|
||||||
|
function ReplaceRequestId(message as string) as string
|
||||||
|
reqIdStart = `\nRequestId: `
|
||||||
|
requestIdIndex = message.InStr(reqIdStart)
|
||||||
|
if requestIdIndex = -1
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
newLineIndex = message.InStr(requestIdIndex + reqIdStart.Len(), `\n`)
|
||||||
|
if newLineIndex = -1
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
reqIdStartIndex = requestIdIndex + reqIdStart.Len()
|
||||||
|
reqIdEndIndex = newLineIndex - 1
|
||||||
|
if (reqIdEndIndex <= reqIdStartIndex) or ((reqIdEndIndex - reqIdStartIndex) > 20)
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
fingerprint = message.Mid(0, reqIdStartIndex) + "<REQUEST_ID>" + message.Mid(reqIdEndIndex + 1)
|
||||||
|
return fingerprint
|
||||||
|
end function
|
||||||
end namespace
|
end namespace
|
||||||
@@ -68,7 +68,9 @@ function ExecuteJob() as void
|
|||||||
if response.error = Invidious.ERROR_NOT_AUTHENTICATED
|
if response.error = Invidious.ERROR_NOT_AUTHENTICATED
|
||||||
if feedSources.Count() = 1
|
if feedSources.Count() = 1
|
||||||
parent = feedContentNode.getParent()
|
parent = feedContentNode.getParent()
|
||||||
parent.removeChild(feedContentNode)
|
if parent <> invalid
|
||||||
|
parent.removeChild(feedContentNode)
|
||||||
|
end if
|
||||||
JobSuccess()
|
JobSuccess()
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@@ -80,7 +82,9 @@ function ExecuteJob() as void
|
|||||||
LogWarnNoTelemetry(feedSource.endpoint, "feedSource not available:", response.error)
|
LogWarnNoTelemetry(feedSource.endpoint, "feedSource not available:", response.error)
|
||||||
if feedSources.Count() = 1
|
if feedSources.Count() = 1
|
||||||
parent = feedContentNode.getParent()
|
parent = feedContentNode.getParent()
|
||||||
parent.removeChild(feedContentNode)
|
if parent <> invalid
|
||||||
|
parent.removeChild(feedContentNode)
|
||||||
|
end if
|
||||||
JobSuccess()
|
JobSuccess()
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ function ExecuteJob() as void
|
|||||||
profileType = input.profileType
|
profileType = input.profileType
|
||||||
playbackTrackingUrls = input.playbackTrackingUrls
|
playbackTrackingUrls = input.playbackTrackingUrls
|
||||||
|
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
|
|
||||||
if profileType = "invidious"
|
if profileType = "invidious"
|
||||||
service = new Invidious.InvidiousService(invidiousNode)
|
service = new Invidious.InvidiousService(invidiousNode)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ function ExecuteJob() as void
|
|||||||
|
|
||||||
metadata = contentNode.metadata
|
metadata = contentNode.metadata
|
||||||
if not IsAssociativeArray(metadata)
|
if not IsAssociativeArray(metadata)
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
if backend = "playlet"
|
if backend = "playlet"
|
||||||
visitorData = innertubeNode.visitorData
|
visitorData = innertubeNode.visitorData
|
||||||
if StringUtils.IsNullOrEmpty(visitorData)
|
if StringUtils.IsNullOrEmpty(visitorData)
|
||||||
|
|||||||
@@ -566,7 +566,6 @@ function ReportVideoError(errorData as object, url as string) as void
|
|||||||
content_type: "plain/text"
|
content_type: "plain/text"
|
||||||
data: lastGeneratedDash
|
data: lastGeneratedDash
|
||||||
}]
|
}]
|
||||||
DeleteFile("tmp:/last_generated_dash.xml")
|
|
||||||
else
|
else
|
||||||
lastGeneratedHls = ReadAsciiFile("tmp:/last_generated_hls.m3u8")
|
lastGeneratedHls = ReadAsciiFile("tmp:/last_generated_hls.m3u8")
|
||||||
if not StringUtils.IsNullOrEmpty(lastGeneratedHls)
|
if not StringUtils.IsNullOrEmpty(lastGeneratedHls)
|
||||||
@@ -575,7 +574,6 @@ function ReportVideoError(errorData as object, url as string) as void
|
|||||||
content_type: "plain/text"
|
content_type: "plain/text"
|
||||||
data: lastGeneratedHls
|
data: lastGeneratedHls
|
||||||
}]
|
}]
|
||||||
DeleteFile("tmp:/last_generated_hls.m3u8")
|
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ function ExecuteJob() as void
|
|||||||
|
|
||||||
backgroundPoster.uri = `${instance}/vi/${videoId}/maxresdefault.jpg`
|
backgroundPoster.uri = `${instance}/vi/${videoId}/maxresdefault.jpg`
|
||||||
|
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
backend = preferencesNode["backend.selected"]
|
backend = preferencesNode["backend.selected"]
|
||||||
if backend = "playlet"
|
if backend = "playlet"
|
||||||
metadata = InnertubeService.GetVideoMetadata(videoId, { cancellation: cancellation })
|
metadata = InnertubeService.GetVideoMetadata(videoId, { cancellation: cancellation })
|
||||||
|
|||||||
@@ -128,11 +128,7 @@ namespace VideoQueueUtils
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
recommendedVideos = metadata.recommendedVideos
|
recommendedVideos = metadata.recommendedVideos
|
||||||
if recommendedVideos = invalid
|
if not IsArray(recommendedVideos) or recommendedVideos.Count() = 0
|
||||||
return false
|
|
||||||
end if
|
|
||||||
|
|
||||||
if recommendedVideos = invalid or recommendedVideos.Count() = 0
|
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ function ExecuteJob() as void
|
|||||||
preferencesNode = input.preferences
|
preferencesNode = input.preferences
|
||||||
service = new Invidious.InvidiousService(invidiousNode)
|
service = new Invidious.InvidiousService(invidiousNode)
|
||||||
instance = service.GetInstance()
|
instance = service.GetInstance()
|
||||||
cancellation = CancellationUtils.CreateCancellation(JobGetCallbackNode(), "cancel", true)
|
cancellation = JobGetCancellation()
|
||||||
|
|
||||||
index = MathUtils.Clamp(input.index - 2, 0, videoNodes.Count() - 1)
|
index = MathUtils.Clamp(input.index - 2, 0, videoNodes.Count() - 1)
|
||||||
|
|
||||||
|
|||||||
+49
-21
@@ -420,31 +420,59 @@ namespace Http
|
|||||||
options.continuation = continuation
|
options.continuation = continuation
|
||||||
end if
|
end if
|
||||||
|
|
||||||
result = InnertubeService.Search(query, options)
|
fetchedPages = 0
|
||||||
|
while true
|
||||||
|
' Content can be filtered (for example, shorts removed)
|
||||||
|
' so we could be fetching multiple pages.
|
||||||
|
if fetchedPages > 3
|
||||||
|
response.Json({
|
||||||
|
"error": "Failed to search: no results found"
|
||||||
|
})
|
||||||
|
response.http_code = 500
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
result = InnertubeService.Search(query, options)
|
||||||
|
fetchedPages += 1
|
||||||
|
|
||||||
if raw
|
if raw
|
||||||
response.Json(result)
|
response.Json(result)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if result.error <> invalid
|
if result.error <> invalid
|
||||||
response.Json(result)
|
response.Json(result)
|
||||||
response.http_code = 500
|
response.http_code = 500
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if not IsArray(result.feeds) or result.feeds.Count() = 0
|
if not IsArray(result.feeds) or result.feeds.Count() = 0
|
||||||
response.Json({
|
response.Json({
|
||||||
"error": "Failed to search: no results found"
|
"error": "Failed to search: no results found"
|
||||||
})
|
})
|
||||||
response.http_code = 500
|
response.http_code = 500
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
response.Json(result.feeds[0])
|
feed = result.feeds[0]
|
||||||
if result.DoesExist("cache-control")
|
if feed.items.Count() > 0
|
||||||
response.headers["cache-control"] = result["cache-control"]
|
response.Json(feed)
|
||||||
end if
|
if fetchedPages = 1 and result.DoesExist("cache-control")
|
||||||
|
response.headers["cache-control"] = result["cache-control"]
|
||||||
|
end if
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
|
if StringUtils.IsNullOrEmpty(feed.continuation)
|
||||||
|
response.Json({
|
||||||
|
"error": "Failed to search: no results found"
|
||||||
|
})
|
||||||
|
response.http_code = 500
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
|
LogDebug("Search returned no results, fetching next page with continuation")
|
||||||
|
options.continuation = feed.continuation
|
||||||
|
end while
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -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=00013
|
build_version=00017
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||||
|
|||||||
@@ -440,7 +440,8 @@ namespace HttpClient
|
|||||||
while triesLeft > 0
|
while triesLeft > 0
|
||||||
backoffMs = 1000 + Rnd(2000)
|
backoffMs = 1000 + Rnd(2000)
|
||||||
tryNumber = m._tryCount - triesLeft + 1
|
tryNumber = m._tryCount - triesLeft + 1
|
||||||
LogWarn("Request failed ID:", m.urlTransfer.GetIdentity(), "ErrorMessage:", response.ErrorMessage(), `\nRetrying: (`, tryNumber, "/", m._tryCount, ") in", backoffMs, "ms")
|
LogWarnNoTelemetry("Request failed ID:", m.urlTransfer.GetIdentity(), "ErrorMessage:", response.ErrorMessage(), `\nRetrying: (`, tryNumber, "/", m._tryCount, ") in", backoffMs, "ms")
|
||||||
|
LogWarnTelemetry(response.ErrorMessage())
|
||||||
|
|
||||||
if IsFunction(m._retryCallback)
|
if IsFunction(m._retryCallback)
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ function LogTelemetryEvent(event as object)
|
|||||||
m.global.telemetry.LogEvent = event
|
m.global.telemetry.LogEvent = event
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function LogWarnTelemetry(message as string)
|
||||||
|
m.global.telemetry.LogWarn = message
|
||||||
|
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
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.41.13",
|
"version": "0.41.17",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.41.13",
|
"version": "0.41.17",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^6.2.0",
|
"@sveltejs/vite-plugin-svelte": "^6.2.0",
|
||||||
"@tailwindcss/postcss": "^4.1.13",
|
"@tailwindcss/postcss": "^4.1.13",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.41.13",
|
"version": "0.41.17",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -280,7 +280,6 @@ export class YoutubeJs {
|
|||||||
adaptiveFormats: YoutubeJs.getAdaptiveFormats(info),
|
adaptiveFormats: YoutubeJs.getAdaptiveFormats(info),
|
||||||
formatStreams: [],
|
formatStreams: [],
|
||||||
captions: YoutubeJs.getCaptions(info),
|
captions: YoutubeJs.getCaptions(info),
|
||||||
recommendedVideos: [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user