Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9275a140ef | ||
|
|
a81063587f | ||
|
|
d271a168e4 | ||
|
|
bf77a583ca | ||
|
|
760b3f5c0b | ||
|
|
adcba1dbb4 | ||
|
|
37963ae41e | ||
|
|
84dc160db1 | ||
|
|
35b8657024 | ||
|
|
eb6e410a8f | ||
|
|
0c79787161 | ||
|
|
207f96c882 | ||
|
|
964e8a54ac | ||
|
|
30cc2b5323 | ||
|
|
6dc87ee374 |
No files matched your search
@@ -5,6 +5,21 @@ 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.4] - 2025-09-04
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Small improvements in parser
|
||||||
|
- Try force refresh visitor data when it fails
|
||||||
|
- Rate limit syslog errors
|
||||||
|
|
||||||
|
## [0.41.3] - 2025-09-03
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A bug when generating dash manifest with missing stream url
|
||||||
|
- Invidious redirect fix in webapp
|
||||||
|
|
||||||
## [0.41.2] - 2025-09-03
|
## [0.41.2] - 2025-09-03
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -83,13 +83,12 @@ Can't install from the store? See [How to install Playlet as a sideloaded/dev ap
|
|||||||
|
|
||||||
For everything related to Playlet app development, please see the [documentation](./docs/README.md)
|
For everything related to Playlet app development, please see the [documentation](./docs/README.md)
|
||||||
|
|
||||||
## Analytics and reporting
|
## Analytics and telemetry
|
||||||
|
|
||||||
We do not collect any usage data, anonymous or not. But Roku does, and you can find the data made available to Playlet in the [Wiki](https://github.com/iBicha/playlet/wiki).
|
Roku collects usage data, and you can find the data made available to Playlet in the [Wiki](https://github.com/iBicha/playlet/wiki).
|
||||||
Most software in the wild collect some data to make sure things work, and to prioritize features.
|
Playlet could run on variaty of devices, with different capabilities and screen sizes, and different Invidious instances, in addition to the experimentation YouTube does based on account and/or ip.
|
||||||
Because we don't do that, we wouldn't know if people using Playlet are facing issues, unless these issues get reported.
|
This is why it was necessary to collect telemetry/diagnostics data, in order to capture issues and fix them. However, you can disable this feature in the settings.
|
||||||
Playlet could run on variaty of devices, with different capabilities and screen sizes, and different Invidious instances.
|
But it's not enough, it's important to report any issues you encouter using Playlet, so they can be addressed.
|
||||||
That's why it's important to report any issues you encouter using Playlet, otherwise it's unlikely that they get addressed.
|
|
||||||
|
|
||||||
## Why Playlet
|
## Why Playlet
|
||||||
|
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.41.2",
|
"version": "0.41.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.41.2",
|
"version": "0.41.4",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.34",
|
"@rokucommunity/bslint": "^0.8.34",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.41.2",
|
"version": "0.41.4",
|
||||||
"description": "Unofficial YouTube client for Roku",
|
"description": "Unofficial YouTube client for Roku",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.34",
|
"@rokucommunity/bslint": "^0.8.34",
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.41.2",
|
"version": "0.41.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.41.2"
|
"version": "0.41.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.41.2",
|
"version": "0.41.4",
|
||||||
"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=00002
|
build_version=00004
|
||||||
|
|
||||||
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.2",
|
"version": "0.41.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.41.2"
|
"version": "0.41.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.41.2",
|
"version": "0.41.4",
|
||||||
"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",
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ function OnRequest(event as object) as void
|
|||||||
m.pendingRequestEvents = []
|
m.pendingRequestEvents = []
|
||||||
end if
|
end if
|
||||||
m.pendingRequestEvents.push(event)
|
m.pendingRequestEvents.push(event)
|
||||||
LogWarn("JobQueue: Job queue task is not ready, request will be queued")
|
LogWarnNoTelemetry("JobQueue: Job queue task is not ready, request will be queued")
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ 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
|
||||||
|
|
||||||
@@ -112,7 +113,14 @@ function OnLineSysLog(event as object, dateTime as object, logsFile as string, b
|
|||||||
print line
|
print line
|
||||||
buffer.FromAsciiString(line + `\n`)
|
buffer.FromAsciiString(line + `\n`)
|
||||||
buffer.AppendFile(logsFile)
|
buffer.AppendFile(logsFile)
|
||||||
|
|
||||||
|
' Only report 1 in 10 system log errors
|
||||||
|
' They're usually repetitive, one is reported for each stream in a DASH
|
||||||
|
' when a video is blocked
|
||||||
|
if m.sysLogEventDropCounter = 0
|
||||||
m.global.telemetry.logError = line
|
m.global.telemetry.logError = line
|
||||||
|
end if
|
||||||
|
m.sysLogEventDropCounter = (m.sysLogEventDropCounter + 1) mod 10
|
||||||
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
-3
@@ -62,9 +62,7 @@ function RunTests(instance as string, content as object, cancellation as object)
|
|||||||
testNode.title = `${testNode.title} (${testNode.duration}ms)`
|
testNode.title = `${testNode.title} (${testNode.duration}ms)`
|
||||||
|
|
||||||
if testNode.state = "failed"
|
if testNode.state = "failed"
|
||||||
m.noTelemetry = true
|
LogErrorNoTelemetry(testNode.details)
|
||||||
LogError(testNode.details)
|
|
||||||
m.noTelemetry = false
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if CancellationUtils.IsCancelled(cancellation)
|
if CancellationUtils.IsCancelled(cancellation)
|
||||||
|
|||||||
@@ -48,9 +48,7 @@ class DashManifest
|
|||||||
audioStreams = m.getAudioStreams(adaptiveFormats)
|
audioStreams = m.getAudioStreams(adaptiveFormats)
|
||||||
videoStreams = m.getVideoStreams(adaptiveFormats, qualityFilter)
|
videoStreams = m.getVideoStreams(adaptiveFormats, qualityFilter)
|
||||||
if videoStreams.Count() = 0
|
if videoStreams.Count() = 0
|
||||||
m.noTelemetry = true
|
LogWarnNoTelemetry("No video streams found using quality filter:", qualityFilter, "Falling back to all video streams")
|
||||||
LogWarn("No video streams found using quality filter:", qualityFilter, "Falling back to all video streams")
|
|
||||||
m.noTelemetry = false
|
|
||||||
videoStreams = m.getVideoStreams(adaptiveFormats, {})
|
videoStreams = m.getVideoStreams(adaptiveFormats, {})
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@@ -198,15 +196,13 @@ class DashManifest
|
|||||||
for each storyboard in storyboards
|
for each storyboard in storyboards
|
||||||
interval = ValidInt(storyboard.interval)
|
interval = ValidInt(storyboard.interval)
|
||||||
if interval = 0
|
if interval = 0
|
||||||
LogWarn("Invalid storyboard interval:", storyboard.interval)
|
LogWarnNoTelemetry("Invalid storyboard interval:", storyboard.interval)
|
||||||
continue for
|
continue for
|
||||||
end if
|
end if
|
||||||
|
|
||||||
templateUrl = storyboard.templateUrl
|
templateUrl = storyboard.templateUrl
|
||||||
if templateUrl.Instr("$M") = -1
|
if templateUrl.Instr("$M") = -1
|
||||||
m.noTelemetry = true
|
LogWarnNoTelemetry("Invalid storyboard url: url does not contain $M:", templateUrl)
|
||||||
LogInfo("Invalid storyboard url: url does not contain $M:", templateUrl)
|
|
||||||
m.noTelemetry = false
|
|
||||||
continue for
|
continue for
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@@ -417,8 +413,11 @@ class DashManifest
|
|||||||
return combos
|
return combos
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function ParseAudioLanguage(url as string) as object
|
function ParseAudioLanguage(url as dynamic) as object
|
||||||
result = { lang: "", acont: "" }
|
result = { lang: "", acont: "" }
|
||||||
|
if StringUtils.IsNullOrEmpty(url)
|
||||||
|
return result
|
||||||
|
end if
|
||||||
queryParams = UrlUtils.ParseQueryComponents(url)
|
queryParams = UrlUtils.ParseQueryComponents(url)
|
||||||
if StringUtils.IsNullOrEmpty(queryParams["xtags"])
|
if StringUtils.IsNullOrEmpty(queryParams["xtags"])
|
||||||
return result
|
return result
|
||||||
|
|||||||
@@ -15,6 +15,15 @@ function OnRequestVisitorData() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
OnForceRequestVisitorData()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnForceRequestVisitorData() as void
|
||||||
|
if m.innertubeSessionDataJob <> invalid
|
||||||
|
m.innertubeSessionDataJob.cancel = true
|
||||||
|
m.innertubeSessionDataJob = invalid
|
||||||
|
end if
|
||||||
|
|
||||||
visitorData = m.top.visitorData
|
visitorData = m.top.visitorData
|
||||||
if not StringUtils.IsNullOrEmpty(visitorData)
|
if not StringUtils.IsNullOrEmpty(visitorData)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<field id="timestamp" type="int" />
|
<field id="timestamp" type="int" />
|
||||||
<field id="visitorData" type="string" />
|
<field id="visitorData" type="string" />
|
||||||
<field id="requestVisitorData" type="boolean" alwaysNotify="true" onChange="OnRequestVisitorData" />
|
<field id="requestVisitorData" type="boolean" alwaysNotify="true" onChange="OnRequestVisitorData" />
|
||||||
|
<field id="forceRequestVisitorData" type="boolean" alwaysNotify="true" onChange="OnForceRequestVisitorData" />
|
||||||
<field id="jobQueue" type="node" />
|
<field id="jobQueue" type="node" />
|
||||||
</interface>
|
</interface>
|
||||||
</component>
|
</component>
|
||||||
@@ -134,7 +134,11 @@ namespace InnertubeService
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
if fetchNext
|
if fetchNext
|
||||||
|
if nextResponse.IsSuccess()
|
||||||
parsedResponse = Innertube.ParseInnertubeNextResponse(nextResponse.Json(), parsedResponse)
|
parsedResponse = Innertube.ParseInnertubeNextResponse(nextResponse.Json(), parsedResponse)
|
||||||
|
else
|
||||||
|
LogWarn(nextResponse.ErrorMessage())
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
' If for some reason we missed the videoId, add it back
|
' If for some reason we missed the videoId, add it back
|
||||||
|
|||||||
@@ -128,6 +128,8 @@ namespace Innertube
|
|||||||
"genericPromoRenderer": ParseNotImplemented
|
"genericPromoRenderer": ParseNotImplemented
|
||||||
' "Sign in to see the latest videos tailored to your interests"
|
' "Sign in to see the latest videos tailored to your interests"
|
||||||
"feedNudgeRenderer": ParseNotImplemented
|
"feedNudgeRenderer": ParseNotImplemented
|
||||||
|
' "Your watch history is off" - "You can change your setting at any time to get the latest videos tailored to you."
|
||||||
|
"alertWithActionsRenderer": ParseNotImplemented
|
||||||
' "No results found, Try different keywords or remove search filters"
|
' "No results found, Try different keywords or remove search filters"
|
||||||
"backgroundPromoRenderer": ParseNotImplemented
|
"backgroundPromoRenderer": ParseNotImplemented
|
||||||
' Autocorrect for search terms
|
' Autocorrect for search terms
|
||||||
@@ -138,8 +140,13 @@ namespace Innertube
|
|||||||
"videoMetadataCarouselViewModel": ParseNotImplemented
|
"videoMetadataCarouselViewModel": ParseNotImplemented
|
||||||
' A link to some content, like a wikipedia article.
|
' A link to some content, like a wikipedia article.
|
||||||
"infoPanelContentRenderer": ParseNotImplemented
|
"infoPanelContentRenderer": ParseNotImplemented
|
||||||
|
' {"blockCurrentSession":true,"error":"SUPEX_ONBOARDING_ERROR_KIDS_ONLY"}
|
||||||
|
"supexOnboardingErrorCommand": ParseNotImplemented
|
||||||
|
' Suicide & crisis lifeline, shown on sensitive content
|
||||||
|
"emergencyOneboxRenderer": ParseNotImplemented
|
||||||
"ticketShelfRenderer": ParseNotImplemented
|
"ticketShelfRenderer": ParseNotImplemented
|
||||||
"videoSurveyShelfRenderer": ParseNotImplemented
|
"videoSurveyShelfRenderer": ParseNotImplemented
|
||||||
|
"popupSurveyShelfRenderer": ParseNotImplemented
|
||||||
"searchBarRenderer": ParseNotImplemented
|
"searchBarRenderer": ParseNotImplemented
|
||||||
"clickTrackingParams": ParseNotImplemented
|
"clickTrackingParams": ParseNotImplemented
|
||||||
"promoShelfRenderer": ParseNotImplemented
|
"promoShelfRenderer": ParseNotImplemented
|
||||||
@@ -606,13 +613,11 @@ namespace Innertube
|
|||||||
videoId = ObjectUtils.Dig(nodeData, ["updatedMetadataEndpoint", "updatedMetadataEndpoint", "videoId"])
|
videoId = ObjectUtils.Dig(nodeData, ["updatedMetadataEndpoint", "updatedMetadataEndpoint", "videoId"])
|
||||||
if not IsString(videoId)
|
if not IsString(videoId)
|
||||||
' TODO:P1 confirm that videoPrimaryInfoRenderer has the requested video
|
' TODO:P1 confirm that videoPrimaryInfoRenderer has the requested video
|
||||||
m.noTelemetry = true
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
LogWarn("Invalid video ID in videoPrimaryInfoRenderer", `\n`, FormatJson(nodeData))
|
LogWarnNoTelemetry("Invalid video ID in videoPrimaryInfoRenderer", `\n`, FormatJson(nodeData))
|
||||||
#else
|
#else
|
||||||
LogWarn("Invalid video ID in videoPrimaryInfoRenderer")
|
LogWarnNoTelemetry("Invalid video ID in videoPrimaryInfoRenderer")
|
||||||
#end if
|
#end if
|
||||||
m.noTelemetry = false
|
|
||||||
return invalid
|
return invalid
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
@@ -1730,16 +1735,18 @@ namespace Innertube
|
|||||||
|
|
||||||
function Warning(message as string, nodeData as object) as void
|
function Warning(message as string, nodeData as object) as void
|
||||||
nodeDataString = FormatJson(nodeData)
|
nodeDataString = FormatJson(nodeData)
|
||||||
fullMessage = message + `\n` + nodeDataString
|
|
||||||
|
|
||||||
m.noTelemetry = true
|
LogWarnNoTelemetry(message + `\n` + nodeDataString)
|
||||||
LogWarn(fullMessage)
|
|
||||||
m.noTelemetry = false
|
|
||||||
|
|
||||||
m.global.telemetry.LogEvent = {
|
m.global.telemetry.LogEvent = {
|
||||||
level: "error"
|
level: "error"
|
||||||
message: fullMessage
|
message: message
|
||||||
fingerprint: message
|
fingerprint: message
|
||||||
|
attachments: [{
|
||||||
|
filename: "node_data.json"
|
||||||
|
content_type: "application/json"
|
||||||
|
data: nodeDataString
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
end function
|
end function
|
||||||
end namespace
|
end namespace
|
||||||
@@ -374,7 +374,11 @@ namespace Innertube
|
|||||||
request.NoCache()
|
request.NoCache()
|
||||||
response = request.Await()
|
response = request.Await()
|
||||||
if not response.IsSuccess()
|
if not response.IsSuccess()
|
||||||
|
if response.IsCancelled()
|
||||||
|
LogErrorNoTelemetry(response.ErrorMessage())
|
||||||
|
else
|
||||||
LogError(response.ErrorMessage())
|
LogError(response.ErrorMessage())
|
||||||
|
end if
|
||||||
return invalid
|
return invalid
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@@ -409,7 +413,11 @@ namespace Innertube
|
|||||||
|
|
||||||
response = request.Await()
|
response = request.Await()
|
||||||
if not response.IsSuccess()
|
if not response.IsSuccess()
|
||||||
|
if response.IsCancelled()
|
||||||
|
LogErrorNoTelemetry(response.ErrorMessage())
|
||||||
|
else
|
||||||
LogError(response.ErrorMessage())
|
LogError(response.ErrorMessage())
|
||||||
|
end if
|
||||||
code = ""
|
code = ""
|
||||||
if response.StatusCode() = 400
|
if response.StatusCode() = 400
|
||||||
json = response.Json()
|
json = response.Json()
|
||||||
|
|||||||
@@ -83,9 +83,7 @@ class LongPoller
|
|||||||
|
|
||||||
' Not receiving data for LONG_POLL_TIMEOUT_MS seconds might be a sign of a dead connection
|
' Not receiving data for LONG_POLL_TIMEOUT_MS seconds might be a sign of a dead connection
|
||||||
if m.socket_timer.TotalMilliseconds() > LONG_POLL_TIMEOUT_MS
|
if m.socket_timer.TotalMilliseconds() > LONG_POLL_TIMEOUT_MS
|
||||||
m.noTelemetry = true
|
LogWarnNoTelemetry("Timeout after", LONG_POLL_TIMEOUT_MS, "ms")
|
||||||
LogWarn("Timeout after", LONG_POLL_TIMEOUT_MS, "ms")
|
|
||||||
m.noTelemetry = false
|
|
||||||
m.CloseSocket()
|
m.CloseSocket()
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ class LoungeApi
|
|||||||
commandHandlers[COMMAND_TYPE_ON_USER_ACTIVITY] = m.HandleIgnoreCommand
|
commandHandlers[COMMAND_TYPE_ON_USER_ACTIVITY] = m.HandleIgnoreCommand
|
||||||
commandHandlers[COMMAND_TYPE_REMOTE_DISCONNECTED] = m.HandleIgnoreCommand
|
commandHandlers[COMMAND_TYPE_REMOTE_DISCONNECTED] = m.HandleIgnoreCommand
|
||||||
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_GET_RECEIVER_STATUS] = 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
|
||||||
@@ -75,6 +77,8 @@ class LoungeApi
|
|||||||
commandHandlers[COMMAND_TYPE_UPDATE_PLAYLIST] = m.HandleUpdatePlaylist
|
commandHandlers[COMMAND_TYPE_UPDATE_PLAYLIST] = m.HandleUpdatePlaylist
|
||||||
commandHandlers[COMMAND_TYPE_PAUSE] = m.HandlePause
|
commandHandlers[COMMAND_TYPE_PAUSE] = m.HandlePause
|
||||||
commandHandlers[COMMAND_TYPE_PLAY] = m.HandlePlay
|
commandHandlers[COMMAND_TYPE_PLAY] = m.HandlePlay
|
||||||
|
commandHandlers[COMMAND_TYPE_PREVIOUS] = m.HandlePrevious
|
||||||
|
commandHandlers[COMMAND_TYPE_NEXT] = m.HandleNext
|
||||||
commandHandlers[COMMAND_TYPE_STOP_VIDEO] = m.HandleStopVideo
|
commandHandlers[COMMAND_TYPE_STOP_VIDEO] = m.HandleStopVideo
|
||||||
commandHandlers[COMMAND_TYPE_SEEK_TO] = m.HandleSeekTo
|
commandHandlers[COMMAND_TYPE_SEEK_TO] = m.HandleSeekTo
|
||||||
|
|
||||||
@@ -447,6 +451,14 @@ class LoungeApi
|
|||||||
m.videoQueueNode.play = true
|
m.videoQueueNode.play = true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function HandlePrevious(_commandId as integer, _commandType as string, _commandArgs as object, _messagesToSend as object)
|
||||||
|
m.videoQueueNode.previous = true
|
||||||
|
end function
|
||||||
|
|
||||||
|
function HandleNext(_commandId as integer, _commandType as string, _commandArgs as object, _messagesToSend as object)
|
||||||
|
m.videoQueueNode.next = true
|
||||||
|
end function
|
||||||
|
|
||||||
function HandleStopVideo(_commandId as integer, _commandType as string, _commandArgs as object, _messagesToSend as object)
|
function HandleStopVideo(_commandId as integer, _commandType as string, _commandArgs as object, _messagesToSend as object)
|
||||||
m.videoQueueNode.closePlayer = true
|
m.videoQueueNode.closePlayer = true
|
||||||
end function
|
end function
|
||||||
@@ -544,8 +556,12 @@ class LoungeApi
|
|||||||
})
|
})
|
||||||
|
|
||||||
if not response.IsSuccess()
|
if not response.IsSuccess()
|
||||||
|
if response.StatusCode() = 400 and response.ErrorMessage().InStr("Unknown SID") <> -1
|
||||||
|
LogErrorNoTelemetry(response.ErrorMessage())
|
||||||
|
else
|
||||||
LogError(response.ErrorMessage())
|
LogError(response.ErrorMessage())
|
||||||
end if
|
end if
|
||||||
|
end if
|
||||||
|
|
||||||
m.outgoingMessagesRequests.Delete(key)
|
m.outgoingMessagesRequests.Delete(key)
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ const COMMAND_TYPE_UPDATE_PLAYLIST = "updatePlaylist"
|
|||||||
const COMMAND_TYPE_NOOP = "noop"
|
const COMMAND_TYPE_NOOP = "noop"
|
||||||
const COMMAND_TYPE_PLAY = "play"
|
const COMMAND_TYPE_PLAY = "play"
|
||||||
const COMMAND_TYPE_PAUSE = "pause"
|
const COMMAND_TYPE_PAUSE = "pause"
|
||||||
const COMMAND_TYPE_NEXT = "next"
|
|
||||||
const COMMAND_TYPE_PREVIOUS = "previous"
|
const COMMAND_TYPE_PREVIOUS = "previous"
|
||||||
|
const COMMAND_TYPE_NEXT = "next"
|
||||||
const COMMAND_TYPE_SEEK_TO = "seekTo"
|
const COMMAND_TYPE_SEEK_TO = "seekTo"
|
||||||
const COMMAND_TYPE_SET_VOLUME = "setVolume"
|
const COMMAND_TYPE_SET_VOLUME = "setVolume"
|
||||||
const COMMAND_TYPE_STOP_VIDEO = "stopVideo"
|
const COMMAND_TYPE_STOP_VIDEO = "stopVideo"
|
||||||
@@ -26,6 +26,8 @@ const COMMAND_TYPE_VOICE_COMMAND = "voiceCommand"
|
|||||||
const COMMAND_TYPE_SET_SUBTITLES = "setSubtitlesTrack"
|
const COMMAND_TYPE_SET_SUBTITLES = "setSubtitlesTrack"
|
||||||
const COMMAND_TYPE_ON_USER_ACTIVITY = "onUserActivity"
|
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_GET_RECEIVER_STATUS = "getReceiverStatus"
|
||||||
' 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"
|
||||||
|
|||||||
@@ -87,7 +87,11 @@ namespace SponsorBlock
|
|||||||
url = `${m.sponsorBlockConfig.serverAddress}${SponsorBlock.SKIP_SEGMENT_ENDPOINT}/${hashPrefix}?categories=${categoriesJson}&actionTypes=${actionTypesJson}`
|
url = `${m.sponsorBlockConfig.serverAddress}${SponsorBlock.SKIP_SEGMENT_ENDPOINT}/${hashPrefix}?categories=${categoriesJson}&actionTypes=${actionTypesJson}`
|
||||||
response = HttpClient.Get(url).Cancellation(cancellation).Await()
|
response = HttpClient.Get(url).Cancellation(cancellation).Await()
|
||||||
if not response.IsSuccess()
|
if not response.IsSuccess()
|
||||||
LogError("GetSkipSegmentsForVideo failed:", response.ErrorMessage())
|
if response.IsCancelled()
|
||||||
|
LogErrorNoTelemetry(response.ErrorMessage())
|
||||||
|
else
|
||||||
|
LogError(response.ErrorMessage())
|
||||||
|
end if
|
||||||
return invalid
|
return invalid
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
|||||||
@@ -78,14 +78,13 @@ namespace Sentry
|
|||||||
response = request.Await()
|
response = request.Await()
|
||||||
if not response.IsSuccess()
|
if not response.IsSuccess()
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
m.noTelemetry = true
|
LogErrorNoTelemetry("Failed to send event to Sentry:", response.ErrorMessage())
|
||||||
LogError("Failed to send event to Sentry:", response.ErrorMessage())
|
|
||||||
m.noTelemetry = false
|
|
||||||
#end if
|
#end if
|
||||||
|
|
||||||
statusCode = response.StatusCode()
|
statusCode = response.StatusCode()
|
||||||
if statusCode = 429
|
if statusCode = 429
|
||||||
retryAfter = ValidInt(response.Headers()["Retry-After"])
|
retryAfter = ValidInt(response.Headers()["Retry-After"])
|
||||||
|
LogErrorNoTelemetry("Rate limited by Sentry. Retry after", retryAfter, "seconds")
|
||||||
if retryAfter = 0
|
if retryAfter = 0
|
||||||
retryAfter = 60
|
retryAfter = 60
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -241,15 +241,11 @@ end function
|
|||||||
|
|
||||||
function HandleFeedLoadErrorDialog(error as object, isCancelled as boolean, rowList as object) as void
|
function HandleFeedLoadErrorDialog(error as object, isCancelled as boolean, rowList as object) as void
|
||||||
error = ErrorUtils.Format(error)
|
error = ErrorUtils.Format(error)
|
||||||
|
|
||||||
if isCancelled
|
if isCancelled
|
||||||
m.noTelemetry = true
|
LogErrorNoTelemetry(error)
|
||||||
end if
|
else
|
||||||
LogError(error)
|
LogError(error)
|
||||||
if isCancelled
|
|
||||||
m.noTelemetry = false
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
rowList.onError = error
|
rowList.onError = error
|
||||||
if rowList.hasField("dispose") and rowList.dispose
|
if rowList.hasField("dispose") and rowList.dispose
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ function ExecuteJob() as void
|
|||||||
message = wait(20000, messagePort)
|
message = wait(20000, messagePort)
|
||||||
innertubeNode.unobserveFieldScoped("visitorData")
|
innertubeNode.unobserveFieldScoped("visitorData")
|
||||||
if message = invalid
|
if message = invalid
|
||||||
|
innertubeNode.forceRequestVisitorData = true
|
||||||
JobError("Failed to get visitor data. Please try again later.")
|
JobError("Failed to get visitor data. Please try again later.")
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@@ -66,6 +67,7 @@ function ExecuteJob() as void
|
|||||||
|
|
||||||
if metadata = invalid
|
if metadata = invalid
|
||||||
JobError("Failed to get video metadata")
|
JobError("Failed to get video metadata")
|
||||||
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if JobIsCancelled()
|
if JobIsCancelled()
|
||||||
|
|||||||
@@ -445,9 +445,7 @@ function OnVideoPlayerStateChange() as void
|
|||||||
errorInfo = m.top.errorInfo
|
errorInfo = m.top.errorInfo
|
||||||
errorData = GetPlayerErrorData(content.videoId, errorInfo)
|
errorData = GetPlayerErrorData(content.videoId, errorInfo)
|
||||||
|
|
||||||
m.noTelemetry = true
|
LogErrorNoTelemetry(errorData.title, errorData.body)
|
||||||
LogError(errorData.title, errorData.body)
|
|
||||||
m.noTelemetry = false
|
|
||||||
m.global.telemetry.LogEvent = {
|
m.global.telemetry.LogEvent = {
|
||||||
level: "error"
|
level: "error"
|
||||||
message: errorData.title + `\n` + errorData.body
|
message: errorData.title + `\n` + errorData.body
|
||||||
@@ -501,9 +499,7 @@ function OnVideoPlayerStateChange() as void
|
|||||||
errorInfo = m.top.errorInfo
|
errorInfo = m.top.errorInfo
|
||||||
errorData = GetPlayerErrorData(content.videoId, errorInfo)
|
errorData = GetPlayerErrorData(content.videoId, errorInfo)
|
||||||
|
|
||||||
m.noTelemetry = true
|
LogErrorNoTelemetry(errorData.title, errorData.body)
|
||||||
LogError(errorData.title, errorData.body)
|
|
||||||
m.noTelemetry = false
|
|
||||||
m.global.telemetry.LogEvent = {
|
m.global.telemetry.LogEvent = {
|
||||||
level: "error"
|
level: "error"
|
||||||
message: errorData.title + `\n` + errorData.body
|
message: errorData.title + `\n` + errorData.body
|
||||||
|
|||||||
@@ -171,9 +171,7 @@ namespace Http
|
|||||||
end for
|
end for
|
||||||
|
|
||||||
if includedQualitiesCount = 0
|
if includedQualitiesCount = 0
|
||||||
m.noTelemetry = true
|
LogWarnNoTelemetry("No video streams found using quality filter:", qualityFilter, "Falling back to all video streams")
|
||||||
LogWarn("No video streams found using quality filter:", qualityFilter, "Falling back to all video streams")
|
|
||||||
m.noTelemetry = false
|
|
||||||
return hlsManifest
|
return hlsManifest
|
||||||
end if
|
end if
|
||||||
return newLines.join(`\n`)
|
return newLines.join(`\n`)
|
||||||
|
|||||||
+1
-3
@@ -214,9 +214,7 @@ namespace Http
|
|||||||
if not hasContinuation
|
if not hasContinuation
|
||||||
page = ValidString(request.query.page).ToInt()
|
page = ValidString(request.query.page).ToInt()
|
||||||
if page > 1
|
if page > 1
|
||||||
m.noTelemetry = true
|
LogErrorNoTelemetry("Playlet backend does not use history pagination (use continuation instead)")
|
||||||
LogError("Playlet backend does not use history pagination (use continuation instead)")
|
|
||||||
m.noTelemetry = false
|
|
||||||
response.Json({
|
response.Json({
|
||||||
"items": []
|
"items": []
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -165,9 +165,7 @@ namespace Http
|
|||||||
if m.socket.eSuccess()
|
if m.socket.eSuccess()
|
||||||
LogDebug(op + " peer closed @" + m.client)
|
LogDebug(op + " peer closed @" + m.client)
|
||||||
else
|
else
|
||||||
m.noTelemetry = true
|
LogErrorNoTelemetry(op + " transfer error @" + m.client, m.socket.status())
|
||||||
LogError(op + " transfer error @" + m.client, m.socket.status())
|
|
||||||
m.noTelemetry = false
|
|
||||||
end if
|
end if
|
||||||
m.close = true
|
m.close = true
|
||||||
m.SetState(Http.HttpConnectionState.DONE)
|
m.SetState(Http.HttpConnectionState.DONE)
|
||||||
|
|||||||
@@ -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=00002
|
build_version=00004
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||||
|
|||||||
@@ -9,10 +9,18 @@ function LogError(_arg1 = invalid as dynamic, _arg2 = invalid as dynamic, _arg3
|
|||||||
throw "FATAL: Calling LogError() which is a stub function"
|
throw "FATAL: Calling LogError() which is a stub function"
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function LogErrorNoTelemetry(_arg1 = invalid as dynamic, _arg2 = invalid as dynamic, _arg3 = invalid as dynamic, _arg4 = invalid as dynamic, _arg5 = invalid as dynamic, _arg6 = invalid as dynamic, _arg7 = invalid as dynamic, _arg8 = invalid as dynamic, _arg9 = invalid as dynamic, _arg10 = invalid as dynamic, _arg11 = invalid as dynamic, _arg12 = invalid as dynamic, _arg13 = invalid as dynamic, _arg14 = invalid as dynamic, _arg15 = invalid as dynamic, _arg16 = invalid as dynamic) as void
|
||||||
|
throw "FATAL: Calling LogErrorNoTelemetry() which is a stub function"
|
||||||
|
end function
|
||||||
|
|
||||||
function LogWarn(_arg1 = invalid as dynamic, _arg2 = invalid as dynamic, _arg3 = invalid as dynamic, _arg4 = invalid as dynamic, _arg5 = invalid as dynamic, _arg6 = invalid as dynamic, _arg7 = invalid as dynamic, _arg8 = invalid as dynamic, _arg9 = invalid as dynamic, _arg10 = invalid as dynamic, _arg11 = invalid as dynamic, _arg12 = invalid as dynamic, _arg13 = invalid as dynamic, _arg14 = invalid as dynamic, _arg15 = invalid as dynamic, _arg16 = invalid as dynamic) as void
|
function LogWarn(_arg1 = invalid as dynamic, _arg2 = invalid as dynamic, _arg3 = invalid as dynamic, _arg4 = invalid as dynamic, _arg5 = invalid as dynamic, _arg6 = invalid as dynamic, _arg7 = invalid as dynamic, _arg8 = invalid as dynamic, _arg9 = invalid as dynamic, _arg10 = invalid as dynamic, _arg11 = invalid as dynamic, _arg12 = invalid as dynamic, _arg13 = invalid as dynamic, _arg14 = invalid as dynamic, _arg15 = invalid as dynamic, _arg16 = invalid as dynamic) as void
|
||||||
throw "FATAL: Calling LogWarn() which is a stub function"
|
throw "FATAL: Calling LogWarn() which is a stub function"
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function LogWarnNoTelemetry(_arg1 = invalid as dynamic, _arg2 = invalid as dynamic, _arg3 = invalid as dynamic, _arg4 = invalid as dynamic, _arg5 = invalid as dynamic, _arg6 = invalid as dynamic, _arg7 = invalid as dynamic, _arg8 = invalid as dynamic, _arg9 = invalid as dynamic, _arg10 = invalid as dynamic, _arg11 = invalid as dynamic, _arg12 = invalid as dynamic, _arg13 = invalid as dynamic, _arg14 = invalid as dynamic, _arg15 = invalid as dynamic, _arg16 = invalid as dynamic) as void
|
||||||
|
throw "FATAL: Calling LogWarnNoTelemetry() which is a stub function"
|
||||||
|
end function
|
||||||
|
|
||||||
function LogInfo(_arg1 = invalid as dynamic, _arg2 = invalid as dynamic, _arg3 = invalid as dynamic, _arg4 = invalid as dynamic, _arg5 = invalid as dynamic, _arg6 = invalid as dynamic, _arg7 = invalid as dynamic, _arg8 = invalid as dynamic, _arg9 = invalid as dynamic, _arg10 = invalid as dynamic, _arg11 = invalid as dynamic, _arg12 = invalid as dynamic, _arg13 = invalid as dynamic, _arg14 = invalid as dynamic, _arg15 = invalid as dynamic, _arg16 = invalid as dynamic) as void
|
function LogInfo(_arg1 = invalid as dynamic, _arg2 = invalid as dynamic, _arg3 = invalid as dynamic, _arg4 = invalid as dynamic, _arg5 = invalid as dynamic, _arg6 = invalid as dynamic, _arg7 = invalid as dynamic, _arg8 = invalid as dynamic, _arg9 = invalid as dynamic, _arg10 = invalid as dynamic, _arg11 = invalid as dynamic, _arg12 = invalid as dynamic, _arg13 = invalid as dynamic, _arg14 = invalid as dynamic, _arg15 = invalid as dynamic, _arg16 = invalid as dynamic) as void
|
||||||
throw "FATAL: Calling LogInfo() which is a stub function"
|
throw "FATAL: Calling LogInfo() which is a stub function"
|
||||||
end function
|
end function
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.41.2",
|
"version": "0.41.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.41.2",
|
"version": "0.41.4",
|
||||||
"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,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.41.2",
|
"version": "0.41.4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
let modal;
|
let modal;
|
||||||
let tvName = "Roku TV";
|
let tvName = "Roku TV";
|
||||||
let invidiousInstance;
|
let invidiousInstanceForRedirect;
|
||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
tvName = value?.device?.friendly_name ?? "Roku TV";
|
tvName = value?.device?.friendly_name ?? "Roku TV";
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
if (!instance) {
|
if (!instance) {
|
||||||
instance = "https://redirect.invidious.io";
|
instance = "https://redirect.invidious.io";
|
||||||
}
|
}
|
||||||
invidiousInstance = instance;
|
invidiousInstanceForRedirect = instance;
|
||||||
});
|
});
|
||||||
|
|
||||||
async function openOnTv() {
|
async function openOnTv() {
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openInvidious() {
|
function openInvidious() {
|
||||||
let url = `${invidiousInstance}/channel/${authorId}`;
|
let url = `${invidiousInstanceForRedirect}/channel/${authorId}`;
|
||||||
window.open(url);
|
window.open(url);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -21,14 +21,16 @@
|
|||||||
let modal;
|
let modal;
|
||||||
let tvName = "Roku TV";
|
let tvName = "Roku TV";
|
||||||
let invidiousInstance;
|
let invidiousInstance;
|
||||||
|
let invidiousInstanceForRedirect;
|
||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
tvName = value?.device?.friendly_name ?? "Roku TV";
|
tvName = value?.device?.friendly_name ?? "Roku TV";
|
||||||
let instance = value?.invidious?.invidious_instance || "";
|
let instance = value?.invidious?.invidious_instance || "";
|
||||||
|
invidiousInstance = instance;
|
||||||
if (!instance) {
|
if (!instance) {
|
||||||
instance = "https://redirect.invidious.io";
|
instance = "https://redirect.invidious.io";
|
||||||
}
|
}
|
||||||
invidiousInstance = instance;
|
invidiousInstanceForRedirect = instance;
|
||||||
});
|
});
|
||||||
|
|
||||||
async function playOnTv() {
|
async function playOnTv() {
|
||||||
@@ -44,7 +46,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openInvidious() {
|
function openInvidious() {
|
||||||
let url = `${invidiousInstance}/playlist?list=${playlistId}`;
|
let url = `${invidiousInstanceForRedirect}/playlist?list=${playlistId}`;
|
||||||
window.open(url);
|
window.open(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,10 +36,16 @@
|
|||||||
let modal;
|
let modal;
|
||||||
let tvName = "Roku TV";
|
let tvName = "Roku TV";
|
||||||
let invidiousInstance;
|
let invidiousInstance;
|
||||||
|
let invidiousInstanceForRedirect;
|
||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
tvName = value?.device?.friendly_name ?? "Roku TV";
|
tvName = value?.device?.friendly_name ?? "Roku TV";
|
||||||
invidiousInstance = value?.invidious?.instance;
|
let instance = value?.invidious?.invidious_instance || "";
|
||||||
|
invidiousInstance = instance;
|
||||||
|
if (!instance) {
|
||||||
|
instance = "https://redirect.invidious.io";
|
||||||
|
}
|
||||||
|
invidiousInstanceForRedirect = instance;
|
||||||
});
|
});
|
||||||
|
|
||||||
async function playOnTv() {
|
async function playOnTv() {
|
||||||
@@ -68,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openInvidious() {
|
function openInvidious() {
|
||||||
let url = `${invidiousInstance}/watch?v=${videoId}`;
|
let url = `${invidiousInstanceForRedirect}/watch?v=${videoId}`;
|
||||||
if (videoStartAtChecked && videoStartAtTimestamp) {
|
if (videoStartAtChecked && videoStartAtTimestamp) {
|
||||||
url += `&t=${videoStartAtTimestamp}`;
|
url += `&t=${videoStartAtTimestamp}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,18 +22,32 @@ const logFunctions = {
|
|||||||
LogError: {
|
LogError: {
|
||||||
stringLevel: 'ERROR',
|
stringLevel: 'ERROR',
|
||||||
level: 0,
|
level: 0,
|
||||||
|
telemetry: true
|
||||||
|
},
|
||||||
|
LogErrorNoTelemetry: {
|
||||||
|
stringLevel: 'ERROR',
|
||||||
|
level: 0,
|
||||||
|
telemetry: false
|
||||||
},
|
},
|
||||||
LogWarn: {
|
LogWarn: {
|
||||||
stringLevel: 'WARN',
|
stringLevel: 'WARN',
|
||||||
level: 1,
|
level: 1,
|
||||||
|
telemetry: true
|
||||||
|
},
|
||||||
|
LogWarnNoTelemetry: {
|
||||||
|
stringLevel: 'WARN',
|
||||||
|
level: 1,
|
||||||
|
telemetry: false
|
||||||
},
|
},
|
||||||
LogInfo: {
|
LogInfo: {
|
||||||
stringLevel: 'INFO',
|
stringLevel: 'INFO',
|
||||||
level: 2,
|
level: 2,
|
||||||
|
telemetry: false
|
||||||
},
|
},
|
||||||
LogDebug: {
|
LogDebug: {
|
||||||
stringLevel: 'DEBUG',
|
stringLevel: 'DEBUG',
|
||||||
level: 3,
|
level: 3,
|
||||||
|
telemetry: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +178,7 @@ export class LoggerPlugin implements CompilerPlugin {
|
|||||||
program.setFile(loggingFilePath, content)
|
program.setFile(loggingFilePath, content)
|
||||||
}
|
}
|
||||||
|
|
||||||
generateLoggingFunction(newFunctionName: string, level: string, argCount: number, isDebug: boolean) {
|
generateLoggingFunction(newFunctionName: string, originalFunctionName: string, argCount: number, isDebug: boolean) {
|
||||||
const args: string[] = [];
|
const args: string[] = [];
|
||||||
const argsParams: string[] = [];
|
const argsParams: string[] = [];
|
||||||
for (let i = 0; i < argCount; i++) {
|
for (let i = 0; i < argCount; i++) {
|
||||||
@@ -176,11 +190,11 @@ export class LoggerPlugin implements CompilerPlugin {
|
|||||||
return `ToString(${arg})`;
|
return `ToString(${arg})`;
|
||||||
}).join(` + " " + `);
|
}).join(` + " " + `);
|
||||||
|
|
||||||
const func = logFunctions[level as 'LogError' | 'LogWarn' | 'LogInfo' | 'LogDebug'];
|
const func = logFunctions[originalFunctionName as keyof typeof logFunctions];
|
||||||
|
|
||||||
let logLine = '';
|
let logLine = '';
|
||||||
|
|
||||||
const telemetryEnabled = level === 'LogError' || level === 'LogWarn';
|
const telemetryEnabled = func.telemetry;
|
||||||
|
|
||||||
if (isDebug) {
|
if (isDebug) {
|
||||||
const RED = '[31m';
|
const RED = '[31m';
|
||||||
@@ -223,10 +237,7 @@ function ${newFunctionName}(${args.join(', ')}) as void
|
|||||||
logger.logLine = line
|
logger.logLine = line
|
||||||
`;
|
`;
|
||||||
if (telemetryEnabled) {
|
if (telemetryEnabled) {
|
||||||
result += ` if not (m.noTelemetry = true)
|
result += ` m.global.telemetry.${originalFunctionName} = line\n`;
|
||||||
m.global.telemetry.${level} = line
|
|
||||||
end if
|
|
||||||
`;
|
|
||||||
}
|
}
|
||||||
result += `end function
|
result += `end function
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in new issue
Block a user