Compare commits

..
15 Commits
72 changed files with 439 additions and 1470 deletions

No files matched your search

+23
View File
@@ -76,6 +76,29 @@
"args": "--log-level info --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc", "args": "--log-level info --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc",
"cwd": "${workspaceFolder}/playlet-lib", "cwd": "${workspaceFolder}/playlet-lib",
"console": "integratedTerminal" "console": "integratedTerminal"
},
{
"name": "Playground",
"type": "brightscript",
"request": "launch",
"envFile": "${workspaceFolder}/.env",
"host": "${env:ROKU_DEV_TARGET}",
"password": "${env:ROKU_DEVPASSWORD}",
"stopOnEntry": false,
"enableDebuggerAutoRecovery": false,
"stopDebuggerOnAppExit": false,
"rootDir": "${workspaceFolder}/build/playground",
"sourceDirs": [
"${workspaceFolder}/playground/src"
],
"files": [
"**"
],
"preLaunchTask": "build-playground",
"injectRdbOnDeviceComponent": true,
"injectRaleTrackerTask": true,
"raleTrackerTaskFileLocation": "${workspaceFolder}/tools/RALE/TrackerTask.xml",
"enableDebugProtocol": true
} }
], ],
"compounds": [ "compounds": [
+5
View File
@@ -49,6 +49,11 @@
"label": "build-web", "label": "build-web",
"script": "build:web", "script": "build:web",
"type": "npm" "type": "npm"
},
{
"label": "build-playground",
"script": "build:playground",
"type": "npm"
} }
] ]
} }
+22
View File
@@ -5,6 +5,28 @@ 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.4] - 2025-11-23
### Fixed
- Subscriptions looping instead of loading older videos
### Removed
- Trending endpoints from code base
## [0.44.3] - 2025-11-14
### Fixed
- Json parsing with invalid chars like `\u0000` preventing some channels from loading
## [0.44.2] - 2025-11-13
### Fixed
- Removed retry on trending feeds
## [0.44.1] - 2025-11-12 ## [0.44.1] - 2025-11-12
### Fixed ### Fixed
+6
View File
@@ -58,6 +58,12 @@
"regex": "\\bTr\\s*\\(\\s*\"[^\\\"]*\"\\s*\\)", "regex": "\\bTr\\s*\\(\\s*\"[^\\\"]*\"\\s*\\)",
"regexFlags": "ig", "regexFlags": "ig",
"message": "Tr(\"String\") is not allowed. Use Tr(Locale.Key) instead." "message": "Tr(\"String\") is not allowed. Use Tr(Locale.Key) instead."
},
{
"code": "NO_PARSE_JSON",
"regex": "\\s*ParseJson\\(",
"regexFlags": "ig",
"message": "ParseJson is not allowed. Use StringUtils.ParseJsonSafe() instead."
} }
], ],
"files": [ "files": [
+55 -1095
View File
File diff suppressed because it is too large. Load diff
+9 -8
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.44.1", "version": "0.44.4",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.38", "@rokucommunity/bslint": "^0.8.38",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",
"@types/node": "^24.10.0", "@types/node": "^24.10.1",
"@types/xml2js": "^0.4.14", "@types/xml2js": "^0.4.14",
"argparse": "^2.0.1", "argparse": "^2.0.1",
"brighterscript": "0.70.3", "brighterscript": "0.70.3",
@@ -15,14 +15,14 @@
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dotenv": "^17.2.3", "dotenv": "^17.2.3",
"fs-extra": "^11.3.2", "fs-extra": "^11.3.2",
"glob": "^11.0.3", "glob": "^13.0.0",
"imap": "^0.8.19", "imap": "^0.8.19",
"ip": "^2.0.1", "ip": "^2.0.1",
"json5": "^2.2.3", "json5": "^2.2.3",
"mailparser": "^3.9.0", "mailparser": "^3.9.0",
"protocol-buffers-schema": "^3.6.0", "protocol-buffers-schema": "^3.6.0",
"puppeteer": "^24.29.1", "puppeteer": "^24.31.0",
"roku-deploy": "^3.14.4", "roku-deploy": "^3.15.0",
"roku-test-automation": "^2.2.1", "roku-test-automation": "^2.2.1",
"rooibos-roku": "5.15.5", "rooibos-roku": "5.15.5",
"rounded-rect-9patch": "^1.1.2", "rounded-rect-9patch": "^1.1.2",
@@ -30,7 +30,7 @@
"shelljs": "^0.10.0", "shelljs": "^0.10.0",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "5.9.3", "typescript": "5.9.3",
"telnet-client": "^2.2.6", "telnet-client": "^2.2.9",
"xml2js": "^0.6.2", "xml2js": "^0.6.2",
"yaml": "^2.8.1" "yaml": "^2.8.1"
}, },
@@ -48,6 +48,7 @@
"build:lib:dev": "cd playlet-lib && npm run build:dev", "build:lib:dev": "cd playlet-lib && npm run build:dev",
"build:lib:prod": "cd playlet-lib && npm run build:prod", "build:lib:prod": "cd playlet-lib && npm run build:prod",
"build:web": "cd playlet-web && npm run build", "build:web": "cd playlet-web && npm run build",
"build:playground": "cd playground && npm run build",
"lint": "cd playlet-lib && npm run lint && cd ../playlet-app && npm run lint && cd ../playlet-web && npm run lint", "lint": "cd playlet-lib && npm run lint && cd ../playlet-app && npm run lint && cd ../playlet-web && npm run lint",
"lint:fix": "cd playlet-lib && npm run lint:fix && cd ../playlet-app && npm run lint:fix && cd ../playlet-web && npm run lint", "lint:fix": "cd playlet-lib && npm run lint:fix && cd ../playlet-app && npm run lint:fix && cd ../playlet-web && npm run lint",
"format": "cd playlet-lib && npm run format && cd ../playlet-app && npm run format", "format": "cd playlet-lib && npm run format && cd ../playlet-app && npm run format",
@@ -65,7 +66,7 @@
"screenshot": "node tools/screenshot.js", "screenshot": "node tools/screenshot.js",
"convert-images": "node tools/convert-images.js", "convert-images": "node tools/convert-images.js",
"update-rale-component": "cd tools/RALE && rm TrackerTask.xml && curl -o TrackerTask.zip https://devtools.web.roku.com/roku-advanced-layout-editor/app/TrackerTask.zip && unzip TrackerTask.zip && rm TrackerTask.zip", "update-rale-component": "cd tools/RALE && rm TrackerTask.xml && curl -o TrackerTask.zip https://devtools.web.roku.com/roku-advanced-layout-editor/app/TrackerTask.zip && unzip TrackerTask.zip && rm TrackerTask.zip",
"postinstall": "cd playlet-lib && npm install && cd ../playlet-app && npm install && cd ../playlet-web && npm install", "postinstall": "cd playlet-lib && npm install && cd ../playlet-app && npm install && cd ../playground && npm install && cd ../playlet-web && npm install",
"update-deps": "npx npm-check-updates --deep --upgrade --install always --reject rooibos-roku", "update-deps": "npx npm-check-updates --deep --upgrade --install always --reject rooibos-roku",
"registry:write": "node tools/registry.js --input registry.json", "registry:write": "node tools/registry.js --input registry.json",
"registry:read": "node tools/registry.js --output registry.json", "registry:read": "node tools/registry.js --output registry.json",
@@ -75,6 +76,6 @@
"shutdown": "node tools/shutdown.js" "shutdown": "node tools/shutdown.js"
}, },
"optionalDependencies": { "optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "^4.53.1" "@rollup/rollup-linux-x64-gnu": "^4.53.3"
} }
} }
+7
View File
@@ -0,0 +1,7 @@
# Playground
Playground is a test project to try things out or iterate on a concept.
Playlet app relies on playlet lib, and playlet lib relies on web app, so sometimes iteration speed can be slower when building everything everytime.
Just like Playlet, Playground can be launched from the VSCode "Run and debug" menu.
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "../config/bsconfig.base.jsonc",
"rootDir": "src/",
"stagingDir": "../build/playground",
"outFile": "../dist/playground.zip"
}
+7
View File
@@ -0,0 +1,7 @@
{
"extends": "bsconfig.json",
"createPackage": false,
"deploy": false,
"retainStagingDir": false,
"sourceMap": false
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "../config/bsconfig.tests.base.jsonc",
"rootDir": "src/",
"stagingDir": "../build/playground-tests",
"outFile": "../build/playground-tests.zip"
}
+12
View File
@@ -0,0 +1,12 @@
{
"name": "playground",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "playground",
"version": "0.1.0"
}
}
}
+17
View File
@@ -0,0 +1,17 @@
{
"name": "playground",
"version": "0.1.0",
"description": "A playground for testing Roku development",
"scripts": {
"prebuild": "node ../tools/rm.js ../build/playground",
"build": "bsc --debug --create-package --sourceMap=true --lintConfig ../config/bslint.jsonc",
"lint": "bslint --project bsconfig.lint.json --lintConfig ../config/bslint.jsonc",
"lint:fix": "npm run lint -- --fix",
"format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" --bsfmt-path ../config/bsfmt.jsonc",
"format": "npm run format:base -- --check",
"format:fix": "npm run format:base -- --write",
"test": "npm run test:build && npm run test:run",
"test:build": "bsc --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc",
"test:run": "node ../tools/run-test-app.js --package ../build/playground-tests.zip"
}
}
+3
View File
@@ -0,0 +1,3 @@
function Init()
print "Playground Init"
end function
+10
View File
@@ -0,0 +1,10 @@
<component name="Playground" extends="Scene">
<interface>
<field id="exitChannel" type="bool" alwaysNotify="true" />
<field id="launchArgs" type="assocarray" />
<field id="inputArgs" type="assocarray" alwaysNotify="true" />
</interface>
<children>
<Label text="Welcome to Playlet Playground!" />
</children>
</component>
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+31
View File
@@ -0,0 +1,31 @@
title=Playlet Playground
major_version=0
minor_version=1
build_version=00000
ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p
## Channel Assets
### Main Menu Icons / Channel Poster Artwork
#### Image sizes are FHD: 540x405px | HD: 290x218px | SD: 246x140px
mm_icon_focus_fhd=pkg:/images/channel-poster_fhd.png
mm_icon_focus_hd=pkg:/images/channel-poster_hd.png
mm_icon_focus_sd=pkg:/images/channel-poster_sd.png
### Splash Screen + Loading Screen Artwork
#### Image sizes are FHD: 1920x1080px | HD: 1280x720px | SD: 720x480px
splash_screen_fhd=pkg:/images/splash-screen_fhd.jpg
splash_screen_hd=pkg:/images/splash-screen_hd.jpg
splash_screen_sd=pkg:/images/splash-screen_sd.jpg
splash_color=#242424
splash_min_time=0
confirm_partner_button=1
supports_input_launch=1
requires_widevine_drm=1
requires_widevine_version=1.0
+56
View File
@@ -0,0 +1,56 @@
' Playlet (App to play videos from an Invidious server on Roku TVs)
' Copyright (C) 2025 Brahim Hadriche
' This program is free software: you can redistribute it and/or modify
' it under the terms of the GNU Affero General Public License as published by
' the Free Software Foundation, either version 3 of the License, or
' (at your option) any later version.
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU Affero General Public License for more details.
' You should have received a copy of the GNU Affero General Public License
' along with this program. If not, see <https://www.gnu.org/licenses/>.
function Main(args as object) as void
screen = CreateObject("roSGScreen")
port = CreateObject("roMessagePort")
screen.setMessagePort(port)
scene = screen.CreateScene("Playground")
screen.show()
scene.ObserveField("exitChannel", port)
scene.launchArgs = args
input = CreateObject("roInput")
input.setMessagePort(port)
' The following comment is to enable the SceneGraph inspector
' on the VSCode BrightScript plugin.
' vscode_rdb_on_device_component_entry
' The following comment is to enable RALE tracking
' vscode_rale_tracker_entry
while true
msg = wait(0, port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed()
return
end if
else if msgType = "roSGNodeEvent"
field = msg.getField()
data = msg.getData()
if field = "exitChannel" and data = true
return
end if
else if msgType = "roInputEvent"
scene.inputArgs = msg.getInfo()
end if
end while
end function
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.44.1", "version": "0.44.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-app", "name": "playlet-app",
"version": "0.44.1" "version": "0.44.4"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.44.1", "version": "0.44.4",
"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",
@@ -37,6 +37,7 @@ function GetLoadingMessagesFromCache() as object
if messagesFile = "" if messagesFile = ""
return invalid return invalid
end if end if
' bs:disable-next-line NO_PARSE_JSON
return ParseJson(messagesFile) return ParseJson(messagesFile)
end function end function
+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=00001 build_version=00004
ui_resolutions=hd ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p uri_resolution_autosub=$$RES$$,480p,720p,1080p
+1
View File
@@ -28,6 +28,7 @@ namespace Registry
if urlsJson = invalid if urlsJson = invalid
return invalid return invalid
end if end if
' bs:disable-next-line NO_PARSE_JSON
urls = ParseJson(urlsJson) urls = ParseJson(urlsJson)
return urls return urls
end function end function
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.44.1", "version": "0.44.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.44.1" "version": "0.44.4"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.44.1", "version": "0.44.4",
"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",
@@ -125,7 +125,7 @@ namespace DialogUtils
if hasMessageId if hasMessageId
messages = RegistryUtils.Read(RegistryUtils.MESSAGES) messages = RegistryUtils.Read(RegistryUtils.MESSAGES)
if not StringUtils.IsNullOrEmpty(messages) if not StringUtils.IsNullOrEmpty(messages)
messages = ParseJson(messages) messages = StringUtils.ParseJsonSafe(messages)
if IsAssociativeArray(messages) if IsAssociativeArray(messages)
savedMessageId = ValidString(messages["messageId"]) savedMessageId = ValidString(messages["messageId"])
if savedMessageId = messageId if savedMessageId = messageId
@@ -1,9 +1,10 @@
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs" import "pkg:/source/utils/Types.bs"
namespace HomeScreenUtils namespace HomeScreenUtils
function GetFeed(feedFileName as string, preferences as object) as object function GetFeed(feedFileName as string, preferences as object) as object
feed = ParseJson(ReadAsciiFile(feedFileName)) feed = StringUtils.ParseJsonSafe(ReadAsciiFile(feedFileName))
for each item in feed for each item in feed
item.title = Tr(item.title) item.title = Tr(item.title)
@@ -3,11 +3,12 @@ import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
import "pkg:/source/utils/Logging.bs" import "pkg:/source/utils/Logging.bs"
import "pkg:/source/utils/MathUtils.bs" import "pkg:/source/utils/MathUtils.bs"
import "pkg:/source/utils/RemoteKeys.bs" import "pkg:/source/utils/RemoteKeys.bs"
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs" import "pkg:/source/utils/Types.bs"
function Init() function Init()
m.homeLayout = {} m.homeLayout = {}
homeLayout = ParseJson(ReadAsciiFile("libpkg:/config/default_home_layout.yaml")) homeLayout = StringUtils.ParseJsonSafe(ReadAsciiFile("libpkg:/config/default_home_layout.yaml"))
for each item in homeLayout for each item in homeLayout
m.homeLayout[item.id] = item m.homeLayout[item.id] = item
end for end for
@@ -324,7 +324,7 @@ end function
function CanFetchWithCors(instance as string, testNode as object, cancellation as object) as void function CanFetchWithCors(instance as string, testNode as object, cancellation as object) as void
try try
url = `${instance}/api/v1/trending` url = `${instance}/api/v1/popular`
response = HttpClient.Get(url).NoCache().Cancellation(cancellation).Await() response = HttpClient.Get(url).NoCache().Cancellation(cancellation).Await()
if not response.IsSuccess() if not response.IsSuccess()
@@ -20,7 +20,7 @@ function Load() as void
end if end if
m.bookmarksString = bookmarksString m.bookmarksString = bookmarksString
bookmarks = ParseJson(bookmarksString) bookmarks = StringUtils.ParseJsonSafe(bookmarksString)
if bookmarks = invalid if bookmarks = invalid
LogWarn("Failed to parse bookmarks json") LogWarn("Failed to parse bookmarks json")
return return
@@ -267,63 +267,6 @@ namespace InnertubeService
return Innertube.Search(query, options) return Innertube.Search(query, options)
end function end function
function GetTrending(options = invalid as object) as object
cancellation = OptionUtils.Get(options, "cancellation")
trendingType = LCase(OptionUtils.GetOrDefault(options, "type", ""))
disableShorts = OptionUtils.GetOrDefault(options, "disableShorts", false)
raw = OptionUtils.GetOrDefault(options, "raw", false)
browseId = "FEtrending"
params = ""
if trendingType = "music"
' {"44:proto": {"3:string": "ytma_charts"}}
params = "4gINGgt5dG1hX2NoYXJ0cw%3D%3D"
else if trendingType = "gaming"
' {"44:proto": {"3:string": "gaming_corpus_most_popular"}}
params = "4gIcGhpnYW1pbmdfY29ycHVzX21vc3RfcG9wdWxhcg%3D%3D"
else if trendingType = "movies"
' {"44:proto": {"3:string": "trailers"}}
params = "4gIKGgh0cmFpbGVycw%3D%3D"
end if
request = Innertube.CreateBrowseRequest(browseId, Innertube.ClientType.WEB, { params: params })
request.Cancellation(cancellation)
if raw
request.LogCurlCommand(true)
request.NoCache()
end if
response = request.Await()
if not response.IsSuccess()
return {
error: response.ErrorMessage()
}
end if
if raw
return response.Json()
end if
feeds = Innertube.ParseResponseDataForFeeds(response.Json(), {
response: response
disableCreatorOnTheRise: true
disableShorts: disableShorts
browseId: browseId
})
result = {
feeds: feeds
}
cacheControl = Innertube.ParseResponseForCacheControl(response)
if cacheControl <> invalid
result["cache-control"] = cacheControl
end if
return result
end function
function GetHome(options = invalid as object) as object function GetHome(options = invalid as object) as object
return GetBrowseAuthenticatedPage("FEwhat_to_watch", options) return GetBrowseAuthenticatedPage("FEwhat_to_watch", options)
end function end function
@@ -251,6 +251,15 @@ namespace Innertube
context.currentFeed.sortOptions = sortOptions context.currentFeed.sortOptions = sortOptions
end if end if
end if end if
continuation = ObjectUtils.Dig(nodeData, ["continuations", 0, "nextContinuationData", "continuation"])
if IsString(continuation)
if not StringUtils.IsNullOrEmpty(context.currentFeed.continuation)
StartNewFeed("", context)
end if
context.currentFeed.continuation = continuation
end if
return nodeData["contents"] return nodeData["contents"]
end function end function
@@ -454,7 +454,7 @@ namespace Innertube
LogDebug(`ReadAsciiFile("tmp:/sts_cache.json")`) LogDebug(`ReadAsciiFile("tmp:/sts_cache.json")`)
cache = ReadAsciiFile("tmp:/sts_cache.json") cache = ReadAsciiFile("tmp:/sts_cache.json")
if not StringUtils.IsNullOrEmpty(cache) if not StringUtils.IsNullOrEmpty(cache)
json = ParseJson(cache) json = StringUtils.ParseJsonSafe(cache)
return json["sts"] return json["sts"]
end if end if
@@ -738,7 +738,7 @@ namespace Innertube
LogTelemetryEvent({ LogTelemetryEvent({
level: "error" level: "error"
message: msg + `\nVideoID: ${parsedResponse["videoId"]}\nUrl: ${url}\nHeaders: ${FormatJson(headers)}` message: msg + `\nVideoID: ${parsedResponse["videoId"]}\nUrl: ${url}\nHeaders: ${FormatJson(headers)}`
fingerprint: ["GetPostLiveDvrInfo Missing Post-Live DVR info in headers"] fingerprint: [msg]
}) })
end if end if
@@ -87,7 +87,7 @@ namespace Innertube
text = response.Text() text = response.Text()
text = text.Replace(`)]}'`, "") text = text.Replace(`)]}'`, "")
parsed = ParseJson(text) parsed = StringUtils.ParseJsonSafe(text)
if not IsArray(parsed) or parsed.Count() < 2 if not IsArray(parsed) or parsed.Count() < 2
return { return {
error: "Failed to parse search suggestions" error: "Failed to parse search suggestions"
@@ -46,7 +46,7 @@ namespace Innertube
text = response.Text() text = response.Text()
text = text.Replace(`)]}'`, "") text = text.Replace(`)]}'`, "")
json = ParseJson(text) json = StringUtils.ParseJsonSafe(text)
if json = invalid if json = invalid
return { return {
"error": "Failed to parse session data: " + text "error": "Failed to parse session data: " + text
@@ -78,7 +78,7 @@ namespace Innertube
return invalid return invalid
end if end if
sessionData = ParseJson(sessionData) sessionData = StringUtils.ParseJsonSafe(sessionData)
if sessionData = invalid if sessionData = invalid
RegistryUtils.Delete(RegistryUtils.INNERTUBE_SESSION_DATA) RegistryUtils.Delete(RegistryUtils.INNERTUBE_SESSION_DATA)
return invalid return invalid
@@ -1,7 +1,7 @@
import "InvidiousService.bs" import "InvidiousService.bs"
function Init() function Init()
m.top.apiDefinitions = ParseJson(ReadAsciiFile("libpkg:/config/invidious_video_api.yaml")) m.top.apiDefinitions = StringUtils.ParseJsonSafe(ReadAsciiFile("libpkg:/config/invidious_video_api.yaml"))
m.service = new Invidious.InvidiousService(m.top) m.service = new Invidious.InvidiousService(m.top)
end function end function
@@ -698,7 +698,7 @@ namespace Invidious
end function end function
function VerifyTokenScope(token as string) as boolean function VerifyTokenScope(token as string) as boolean
tokenObject = ParseJson(token) tokenObject = StringUtils.ParseJsonSafe(token)
if tokenObject = invalid if tokenObject = invalid
LogWarn("Failed to json parse token:", token) LogWarn("Failed to json parse token:", token)
return false return false
@@ -212,7 +212,7 @@ class LoungeApi
text = text.Mid(text.instr(`\n`) + 1) text = text.Mid(text.instr(`\n`) + 1)
messagesToSend = [] messagesToSend = []
commands = ParseJson(text) commands = StringUtils.ParseJsonSafe(text)
m.ProcessCommands(commands, messagesToSend) m.ProcessCommands(commands, messagesToSend)
m.SendMessages(messagesToSend) m.SendMessages(messagesToSend)
return true return true
@@ -268,7 +268,7 @@ class LoungeApi
payloadSize = chunk.Left(newLineIndex).trim() payloadSize = chunk.Left(newLineIndex).trim()
payloadSize = payloadSize.ToInt() payloadSize = payloadSize.ToInt()
payload = chunk.Mid(newLineIndex + 1, payloadSize) payload = chunk.Mid(newLineIndex + 1, payloadSize)
commands = ParseJson(payload) commands = StringUtils.ParseJsonSafe(payload)
m.ProcessCommands(commands, messagesToSend) m.ProcessCommands(commands, messagesToSend)
chunk = chunk.Mid(newLineIndex + payloadSize + 1) chunk = chunk.Mid(newLineIndex + payloadSize + 1)
newLineIndex = chunk.InStr(`\n`) newLineIndex = chunk.InStr(`\n`)
@@ -376,7 +376,7 @@ class LoungeApi
if not IsString(devices) if not IsString(devices)
return return
end if end if
devices = ParseJson(devices) devices = StringUtils.ParseJsonSafe(devices)
if devices = invalid if devices = invalid
return return
end if end if
@@ -618,7 +618,7 @@ class LoungeApi
RegistryUtils.Delete(RegistryUtils.LAST_LOUNGE_DATA) RegistryUtils.Delete(RegistryUtils.LAST_LOUNGE_DATA)
loungeData = ParseJson(loungeData) loungeData = StringUtils.ParseJsonSafe(loungeData)
if not IsAssociativeArray(loungeData) if not IsAssociativeArray(loungeData)
LogWarn("Can't disconnect from lounge. Invalid data:", loungeData) LogWarn("Can't disconnect from lounge. Invalid data:", loungeData)
return return
@@ -86,7 +86,7 @@ namespace LoungeVideoQueue
' - eventDetails is of the form {"eventType":"VIDEO_REMOVED","videoId":"<videoId>"} ' - eventDetails is of the form {"eventType":"VIDEO_REMOVED","videoId":"<videoId>"}
eventDetails = playlistData[FIELD_EVENT_DETAILS] eventDetails = playlistData[FIELD_EVENT_DETAILS]
if IsString(eventDetails) if IsString(eventDetails)
eventDetails = ParseJson(eventDetails) eventDetails = StringUtils.ParseJsonSafe(eventDetails)
end if end if
if eventDetails <> invalid and eventDetails["eventType"] = "VIDEO_ADDED" if eventDetails <> invalid and eventDetails["eventType"] = "VIDEO_ADDED"
eventVideoId = eventDetails[FIELD_VIDEO_ID] eventVideoId = eventDetails[FIELD_VIDEO_ID]
@@ -21,7 +21,7 @@ function Init()
end function end function
function LoadPreferencesFile() function LoadPreferencesFile()
m.top.prefsModel = ParseJson(ReadAsciiFile("libpkg:/config/preferences.json5")) m.top.prefsModel = StringUtils.ParseJsonSafe(ReadAsciiFile("libpkg:/config/preferences.json5"))
end function end function
function AddNodeFields() function AddNodeFields()
@@ -60,7 +60,7 @@ function LoadUserPreferencesFromRegistry()
if userPrefs = invalid if userPrefs = invalid
userPrefs = {} userPrefs = {}
else else
userPrefs = ParseJson(userPrefs) userPrefs = StringUtils.ParseJsonSafe(userPrefs)
end if end if
' Step 2: Migrate existing preferences to new format (if needed) ' Step 2: Migrate existing preferences to new format (if needed)
@@ -101,7 +101,7 @@ function MigrateExistingPreferences(userPrefs as object) as boolean
if not StringUtils.IsNullOrEmpty(instances) if not StringUtils.IsNullOrEmpty(instances)
currentInstance = userPrefs["invidious.instance"] currentInstance = userPrefs["invidious.instance"]
if StringUtils.IsNullOrEmpty(currentInstance) if StringUtils.IsNullOrEmpty(currentInstance)
instances = ParseJson(instances) instances = StringUtils.ParseJsonSafe(instances)
if IsArray(instances) and instances.Count() > 0 if IsArray(instances) and instances.Count() > 0
instance = instances[0] instance = instances[0]
if not StringUtils.IsNullOrEmpty(instance) if not StringUtils.IsNullOrEmpty(instance)
@@ -162,6 +162,20 @@ function MigrateExistingPreferences(userPrefs as object) as boolean
isDirty = true isDirty = true
end if end if
if userPrefs.__version = 5
filteredLayout = []
homeScreenLayout = ValidArray(userPrefs["misc.home_screen_layout"])
for each item in homeScreenLayout
if item.id = "trending" or item.id = "trending_music" or item.id = "trending_gaming" or item.id = "trending_movies"
continue for
end if
filteredLayout.Push(item)
end for
userPrefs["misc.home_screen_layout"] = filteredLayout
userPrefs.__version = 6
isDirty = true
end if
' TODO:P2 handle case where saved preferences version is higher than current version (e.g. user downgraded) ' TODO:P2 handle case where saved preferences version is higher than current version (e.g. user downgraded)
#if DEBUG #if DEBUG
@@ -5,7 +5,7 @@
user prefs saved need to be migrated. If the version is less than the user prefs saved need to be migrated. If the version is less than the
current version, a migration is needed. current version, a migration is needed.
--> -->
<field id="__version" type="integer" value="5" /> <field id="__version" type="integer" value="6" />
<field id="prefsModel" type="array" /> <field id="prefsModel" type="array" />
<field id="preferenceFields" type="assocarray" /> <field id="preferenceFields" type="assocarray" />
<function name="GetUserPreferences" /> <function name="GetUserPreferences" />
@@ -31,7 +31,7 @@ function LoadProfilesFromRegistry()
currentProfile: invalid currentProfile: invalid
} }
else else
userProfiles = ParseJson(userProfiles) userProfiles = StringUtils.ParseJsonSafe(userProfiles)
end if end if
' Step 2: Migrate existing profiles to new format (if needed) ' Step 2: Migrate existing profiles to new format (if needed)
@@ -98,7 +98,7 @@ function MigrateExistingProfiles(userProfiles as object) as boolean
return false return false
end if end if
authToken = ParseJson(tokenPayload) authToken = StringUtils.ParseJsonSafe(tokenPayload)
RegistryUtils.Delete(RegistryUtils.INVIDIOUS_TOKEN) RegistryUtils.Delete(RegistryUtils.INVIDIOUS_TOKEN)
if authToken = invalid or authToken.instance = invalid or authToken.token = invalid or authToken.username = invalid if authToken = invalid or authToken.instance = invalid or authToken.token = invalid or authToken.username = invalid
@@ -55,7 +55,7 @@ namespace SearchHistoryUtils
return [] return []
end if end if
history = ParseJson(history) history = StringUtils.ParseJsonSafe(history)
if not IsArray(history) if not IsArray(history)
return [] return []
end if end if
@@ -9,7 +9,7 @@ namespace SponsorBlock
class SponsorBlockService class SponsorBlockService
function new() function new()
' TODO:P2 this is being read and parsed on every skipped segment. It should be cached. ' TODO:P2 this is being read and parsed on every skipped segment. It should be cached.
m.sponsorBlockConfig = ParseJson(ReadAsciiFile("libpkg:/config/sponsorblock_config.json5")) m.sponsorBlockConfig = StringUtils.ParseJsonSafe(ReadAsciiFile("libpkg:/config/sponsorblock_config.json5"))
end function end function
function GetCategories() as object function GetCategories() as object
@@ -230,10 +230,11 @@ function RemoveSingleFailedRow(error as dynamic, feedSource as object, feedSourc
end if end if
isError = error = Invidious.ERROR_NOT_AUTHENTICATED isError = error = Invidious.ERROR_NOT_AUTHENTICATED
' Invidious admins disable endpoints sometimes
isError = isError or error.instr("Administrator has disabled this endpoint") <> -1 isError = isError or error.instr("Administrator has disabled this endpoint") <> -1
isError = isError or error.instr("API disabled") <> -1 isError = isError or error.instr("API disabled") <> -1
isError = isError or feedSource.id.instr("inv_trending") <> -1 ' Playlet not supporting popular
isError = isError or feedSource.id.instr("inv_popular") <> -1 isError = isError or feedSource.id = "inv_popular"
if not isError if not isError
return false return false
end if end if
@@ -341,7 +341,7 @@ function SetCaptions(metadata as object, service as object, contentNode as objec
return return
end if end if
isoLanguageList = ParseJson(ReadAsciiFile("libpkg:/config/ISO-639-1-to-ISO-639-2T.json5")) isoLanguageList = StringUtils.ParseJsonSafe(ReadAsciiFile("libpkg:/config/ISO-639-1-to-ISO-639-2T.json5"))
instance = service.GetInstance() instance = service.GetInstance()
subtitleTracks = [] subtitleTracks = []
@@ -66,7 +66,7 @@ namespace Http
return true return true
end if end if
feedSource = ParseJson(feedSource) feedSource = StringUtils.ParseJsonSafe(feedSource)
if feedSource = invalid if feedSource = invalid
response.Default(400, "Expected valid JSON for feed-source") response.Default(400, "Expected valid JSON for feed-source")
return true return true
@@ -253,9 +253,8 @@ namespace Http
return true return true
end function end function
@get("/playlet-invidious-backend/api/v1/trending")
@get("/playlet-invidious-backend/api/v1/popular") @get("/playlet-invidious-backend/api/v1/popular")
function GetTrending(context as object) as boolean function GetPopular(context as object) as boolean
request = context.request request = context.request
response = context.response response = context.response
@@ -264,40 +263,10 @@ namespace Http
return m.GetAuthRecommended(context) return m.GetAuthRecommended(context)
end if end if
raw = request.query.raw <> invalid
options = {
"disableShorts": m.preferences["content_feed.disable_shorts"]
raw: raw
type: request.query.type
}
result = InnertubeService.GetTrending(options)
if raw
response.Json(result)
return true
end if
if result.error <> invalid
response.Json(result)
response.http_code = 500
return true
end if
if not IsArray(result.feeds) or result.feeds.Count() = 0
response.Json({ response.Json({
"error": "Failed to get trending feed" "error": "Playlet built-in Invidious backend does not support popular videos."
}) })
response.http_code = 500 response.http_code = 400
return true
end if
response.Json(ValidArray(result.feeds[0].items))
if result.DoesExist("cache-control")
response.headers["cache-control"] = result["cache-control"]
end if
return true return true
end function end function
@@ -804,7 +773,7 @@ namespace Http
' (such as "newest", "oldest", etc.), we'll ignore it, as it is not supported. ' (such as "newest", "oldest", etc.), we'll ignore it, as it is not supported.
sortBy = request.query.sort_by sortBy = request.query.sort_by
if not StringUtils.IsNullOrEmpty(sortBy) and sortBy.StartsWith("{") if not StringUtils.IsNullOrEmpty(sortBy) and sortBy.StartsWith("{")
sortBy = ParseJson(sortBy) sortBy = StringUtils.ParseJsonSafe(sortBy)
if IsAssociativeArray(sortBy) if IsAssociativeArray(sortBy)
if sortBy.DoesExist("params") if sortBy.DoesExist("params")
options.params = sortBy.params options.params = sortBy.params
@@ -19,7 +19,7 @@ namespace Http
saved = RegistryUtils.Read(RegistryUtils.PLAYLET_LIB_URLS) saved = RegistryUtils.Read(RegistryUtils.PLAYLET_LIB_URLS)
if saved <> invalid if saved <> invalid
saved = ParseJson(saved) saved = StringUtils.ParseJsonSafe(saved)
end if end if
response.Json({ response.Json({
@@ -272,7 +272,7 @@ namespace Http
return invalid return invalid
end if end if
m.body_json = ParseJson(text) m.body_json = StringUtils.ParseJsonSafe(text)
return m.body_json return m.body_json
end function end function
end class end class
@@ -11,7 +11,7 @@ namespace Http
if StringUtils.IsNullOrEmpty(json) if StringUtils.IsNullOrEmpty(json)
return "application/octet-stream" return "application/octet-stream"
end if end if
map = ParseJson(json) map = StringUtils.ParseJsonSafe(json)
if not IsAssociativeArray(map) if not IsAssociativeArray(map)
return "application/octet-stream" return "application/octet-stream"
end if end if
@@ -41,7 +41,7 @@ namespace Http
if StringUtils.IsNullOrEmpty(json) if StringUtils.IsNullOrEmpty(json)
return "" return ""
end if end if
map = ParseJson(json) map = StringUtils.ParseJsonSafe(json)
if not IsAssociativeArray(map) if not IsAssociativeArray(map)
return "" return ""
end if end if
@@ -14,44 +14,6 @@
apiType: Invidious apiType: Invidious
endpoint: auth_recommended endpoint: auth_recommended
- title: Trending
id: trending
feedSources:
- id: inv_trending
title: Trending
apiType: Invidious
endpoint: trending
- title: Trending - Music
id: trending_music
feedSources:
- id: inv_trending_music
title: Trending - Music
apiType: Invidious
endpoint: trending
queryParams:
type: Music
- title: Trending - Gaming
id: trending_gaming
feedSources:
- id: inv_trending_gaming
title: Trending - Gaming
apiType: Invidious
endpoint: trending
queryParams:
type: Gaming
- title: Trending - Movies
id: trending_movies
feedSources:
- id: inv_trending_movies
title: Trending - Movies
apiType: Invidious
endpoint: trending
queryParams:
type: Movies
- title: Popular - title: Popular
id: popular id: popular
feedSources: feedSources:
@@ -1,18 +1,3 @@
trending:
title: Trending
url: /api/v1/trending
cacheSeconds: 21600 # 6 hours
queryParams:
type:
type:
- Music
- Gaming
- Movies
region:
type: "#ISO3166"
default: GetUserCountryCode
tryCount: 3 # trending is being phased out, sometimes it returns a 400 INVALID_ARGUMENT
popular: popular:
title: Popular title: Popular
url: /api/v1/popular url: /api/v1/popular
-16
View File
@@ -243,22 +243,6 @@
id: "recommended", id: "recommended",
enabled: true, enabled: true,
}, },
{
id: "trending",
enabled: true,
},
{
id: "trending_music",
enabled: true,
},
{
id: "trending_gaming",
enabled: true,
},
{
id: "trending_movies",
enabled: true,
},
{ {
id: "popular", id: "popular",
enabled: true, enabled: true,
@@ -312,22 +312,6 @@
<source>Watch history</source> <source>Watch history</source>
<translation>Wiedergabeverlauf</translation> <translation>Wiedergabeverlauf</translation>
</message> </message>
<message>
<source>Trending</source>
<translation>Trends</translation>
</message>
<message>
<source>Trending - Movies</source>
<translation>Trends - Filme</translation>
</message>
<message>
<source>Trending - Music</source>
<translation>Trends - Musik</translation>
</message>
<message>
<source>Trending - Gaming</source>
<translation>Trends - Gaming</translation>
</message>
<message> <message>
<source>Popular</source> <source>Popular</source>
<translation>Populär</translation> <translation>Populär</translation>
@@ -88,22 +88,6 @@
<source>Watch history</source> <source>Watch history</source>
<translation>Watch history</translation> <translation>Watch history</translation>
</message> </message>
<message>
<source>Trending</source>
<translation>Trending</translation>
</message>
<message>
<source>Trending - Movies</source>
<translation>Trending - Movies</translation>
</message>
<message>
<source>Trending - Music</source>
<translation>Trending - Music</translation>
</message>
<message>
<source>Trending - Gaming</source>
<translation>Trending - Gaming</translation>
</message>
<message> <message>
<source>Popular</source> <source>Popular</source>
<translation>Popular</translation> <translation>Popular</translation>
@@ -80,22 +80,6 @@
<source>Watch history</source> <source>Watch history</source>
<translation>Ver el historial</translation> <translation>Ver el historial</translation>
</message> </message>
<message>
<source>Trending</source>
<translation>Tendencias</translation>
</message>
<message>
<source>Trending - Movies</source>
<translation>Tendencias - Películas</translation>
</message>
<message>
<source>Trending - Music</source>
<translation>Tendencias - Música</translation>
</message>
<message>
<source>Trending - Gaming</source>
<translation>Tendencias - Juegos</translation>
</message>
<message> <message>
<source>Popular</source> <source>Popular</source>
<translation>Popular</translation> <translation>Popular</translation>
@@ -36,10 +36,6 @@
<source>Filters</source> <source>Filters</source>
<translation>Filtros</translation> <translation>Filtros</translation>
</message> </message>
<message>
<source>Trending - Music</source>
<translation>Tendencias - Música</translation>
</message>
<message> <message>
<source>Login to Invidious in order to view Subscriptions, Playlists, and use the Watch history.</source> <source>Login to Invidious in order to view Subscriptions, Playlists, and use the Watch history.</source>
<translation>Accede a Invidious para ver tus suscripciones, playlists, y usar el historial de reproducción.</translation> <translation>Accede a Invidious para ver tus suscripciones, playlists, y usar el historial de reproducción.</translation>
@@ -80,18 +76,6 @@
<source>Watch history</source> <source>Watch history</source>
<translation>Historial de reproducción</translation> <translation>Historial de reproducción</translation>
</message> </message>
<message>
<source>Trending</source>
<translation>Tendencias</translation>
</message>
<message>
<source>Trending - Movies</source>
<translation>Tendencias - Películas</translation>
</message>
<message>
<source>Trending - Gaming</source>
<translation>Tendencias - Videojuegos</translation>
</message>
<message> <message>
<source>Edit</source> <source>Edit</source>
<translation>Editar</translation> <translation>Editar</translation>
@@ -76,22 +76,6 @@
<source>Watch history</source> <source>Watch history</source>
<translation>Historique</translation> <translation>Historique</translation>
</message> </message>
<message>
<source>Trending</source>
<translation>Tendances</translation>
</message>
<message>
<source>Trending - Movies</source>
<translation>Tendances - Films</translation>
</message>
<message>
<source>Trending - Music</source>
<translation>Tendances - Musique</translation>
</message>
<message>
<source>Trending - Gaming</source>
<translation>Tendances - Jeux vidéo</translation>
</message>
<message> <message>
<source>Popular</source> <source>Popular</source>
<translation>Populaire</translation> <translation>Populaire</translation>
@@ -140,22 +140,6 @@
<source>Watch history</source> <source>Watch history</source>
<translation>Histórico de assistidos</translation> <translation>Histórico de assistidos</translation>
</message> </message>
<message>
<source>Trending</source>
<translation>Em alta</translation>
</message>
<message>
<source>Trending - Movies</source>
<translation>Em alta - Flimes</translation>
</message>
<message>
<source>Trending - Music</source>
<translation>Em alta - Música</translation>
</message>
<message>
<source>Trending - Gaming</source>
<translation>Em alta - Jogos</translation>
</message>
<message> <message>
<source>Popular</source> <source>Popular</source>
<translation>Popular</translation> <translation>Popular</translation>
+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=00001 build_version=00004
ui_resolutions=hd ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p uri_resolution_autosub=$$RES$$,480p,720p,1080p
@@ -703,7 +703,7 @@ namespace HttpClient
if text = invalid if text = invalid
return invalid return invalid
end if end if
m._json = ParseJson(text) m._json = StringUtils.ParseJsonSafe(text)
return m._json return m._json
end function end function
@@ -813,7 +813,7 @@ namespace HttpClientCache
end if end if
metadataText = cacheText.Left(firstLineIndex) metadataText = cacheText.Left(firstLineIndex)
metadata = ParseJson(metadataText) metadata = StringUtils.ParseJsonSafe(metadataText)
if metadata = invalid if metadata = invalid
LogWarn("Failed to parse metadata from cache.") LogWarn("Failed to parse metadata from cache.")
Delete(request) Delete(request)
@@ -821,7 +821,7 @@ namespace HttpClientCache
end if end if
headersText = cacheText.Mid(firstLineIndex + 1, metadata.headers) headersText = cacheText.Mid(firstLineIndex + 1, metadata.headers)
headers = ParseJson(headersText) headers = StringUtils.ParseJsonSafe(headersText)
if headers = invalid if headers = invalid
LogWarn("Failed to parse headers from cache.") LogWarn("Failed to parse headers from cache.")
Delete(request) Delete(request)
-4
View File
@@ -41,10 +41,6 @@ namespace Locale
Recommended = "Recommended" Recommended = "Recommended"
Playlists = "Playlists" Playlists = "Playlists"
WatchHistory = "Watch history" WatchHistory = "Watch history"
Trending = "Trending"
TrendingMovies = "Trending - Movies"
TrendingMusic = "Trending - Music"
TrendingGaming = "Trending - Gaming"
Popular = "Popular" Popular = "Popular"
Videos = "Videos" Videos = "Videos"
Shorts = "Shorts" Shorts = "Shorts"
@@ -29,5 +29,18 @@ namespace StringUtils
function RandomId() as string function RandomId() as string
return StrI(rnd(2147483647), 36) return StrI(rnd(2147483647), 36)
end function end function
function ParseJsonSafe(jsonString as dynamic) as dynamic
if IsNullOrEmpty(jsonString)
return invalid
end if
' bs:disable-next-line NO_PARSE_JSON
json = ParseJson(jsonString)
if json <> invalid
return json
end if
' bs:disable-next-line NO_PARSE_JSON
return ParseJson(jsonString.Replace("\u0000", ""))
end function
end namespace end namespace
+66 -53
View File
@@ -1,34 +1,34 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.44.1", "version": "0.44.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-web", "name": "playlet-web",
"version": "0.44.1", "version": "0.44.4",
"devDependencies": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^6.2.1", "@sveltejs/vite-plugin-svelte": "^6.2.1",
"@tailwindcss/postcss": "^4.1.17", "@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/typography": "^0.5.19", "@tailwindcss/typography": "^0.5.19",
"@tsconfig/svelte": "^5.0.5", "@tsconfig/svelte": "^5.0.6",
"@vitejs/plugin-legacy": "^7.2.1", "@vitejs/plugin-legacy": "^7.2.1",
"autoprefixer": "^10.4.21", "autoprefixer": "^10.4.22",
"bgutils-js": "^3.2.0", "bgutils-js": "^3.2.0",
"daisyui": "^5.4.7", "daisyui": "^5.5.5",
"dotenv": "^17.2.3", "dotenv": "^17.2.3",
"ip": "^2.0.1", "ip": "^2.0.1",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"postcss": "^8.5.6", "postcss": "^8.5.6",
"rollup-plugin-visualizer": "^6.0.5", "rollup-plugin-visualizer": "^6.0.5",
"svelte": "^5.43.4", "svelte": "^5.43.14",
"svelte-check": "^4.3.3", "svelte-check": "^4.3.4",
"svelte-preprocess": "^6.0.3", "svelte-preprocess": "^6.0.3",
"tailwindcss": "^4.1.17", "tailwindcss": "^4.1.17",
"terser": "^5.44.1", "terser": "^5.44.1",
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"vite": "^7.2.2", "vite": "^7.2.4",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-tsconfig-paths": "^5.1.4", "vite-tsconfig-paths": "^5.1.4",
"youtubei.js": "^16.0.1" "youtubei.js": "^16.0.1"
@@ -2678,9 +2678,9 @@
} }
}, },
"node_modules/@tsconfig/svelte": { "node_modules/@tsconfig/svelte": {
"version": "5.0.5", "version": "5.0.6",
"resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-5.0.5.tgz", "resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-5.0.6.tgz",
"integrity": "sha512-48fAnUjKye38FvMiNOj0J9I/4XlQQiZlpe9xaNPfe8vy2Y1hFBt8g1yqf2EGjVvHavo4jf2lC+TQyENCr4BJBQ==", "integrity": "sha512-yGxYL0I9eETH1/DR9qVJey4DAsCdeau4a9wYPKuXfEhm8lFO8wg+LLYJjIpAm6Fw7HSlhepPhYPDop75485yWQ==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
@@ -2760,9 +2760,9 @@
} }
}, },
"node_modules/autoprefixer": { "node_modules/autoprefixer": {
"version": "10.4.21", "version": "10.4.22",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.22.tgz",
"integrity": "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==", "integrity": "sha512-ARe0v/t9gO28Bznv6GgqARmVqcWOV3mfgUPn9becPHMiD3o9BwlRgaeccZnwTpZ7Zwqrm+c1sUSsMxIzQzc8Xg==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -2780,9 +2780,9 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"browserslist": "^4.24.4", "browserslist": "^4.27.0",
"caniuse-lite": "^1.0.30001702", "caniuse-lite": "^1.0.30001754",
"fraction.js": "^4.3.7", "fraction.js": "^5.3.4",
"normalize-range": "^0.1.2", "normalize-range": "^0.1.2",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
"postcss-value-parser": "^4.2.0" "postcss-value-parser": "^4.2.0"
@@ -2848,6 +2848,16 @@
"@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
} }
}, },
"node_modules/baseline-browser-mapping": {
"version": "2.8.28",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.28.tgz",
"integrity": "sha512-gYjt7OIqdM0PcttNYP2aVrr2G0bMALkBaoehD4BuRGjAOtipg0b6wHg1yNL+s5zSnLZZrGHOw4IrND8CD+3oIQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"baseline-browser-mapping": "dist/cli.js"
}
},
"node_modules/bgutils-js": { "node_modules/bgutils-js": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/bgutils-js/-/bgutils-js-3.2.0.tgz", "resolved": "https://registry.npmjs.org/bgutils-js/-/bgutils-js-3.2.0.tgz",
@@ -2859,9 +2869,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/browserslist": { "node_modules/browserslist": {
"version": "4.25.1", "version": "4.28.0",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz",
"integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==", "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -2879,10 +2889,11 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"caniuse-lite": "^1.0.30001726", "baseline-browser-mapping": "^2.8.25",
"electron-to-chromium": "^1.5.173", "caniuse-lite": "^1.0.30001754",
"node-releases": "^2.0.19", "electron-to-chromium": "^1.5.249",
"update-browserslist-db": "^1.1.3" "node-releases": "^2.0.27",
"update-browserslist-db": "^1.1.4"
}, },
"bin": { "bin": {
"browserslist": "cli.js" "browserslist": "cli.js"
@@ -2916,9 +2927,9 @@
"dev": true "dev": true
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001727", "version": "1.0.30001754",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001727.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz",
"integrity": "sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==", "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -3123,9 +3134,9 @@
} }
}, },
"node_modules/daisyui": { "node_modules/daisyui": {
"version": "5.4.7", "version": "5.5.5",
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.4.7.tgz", "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.5.5.tgz",
"integrity": "sha512-2wYO61vTPCXk7xEBgnzLZAYoE0xS5IRLu/GSq0vORpB+cTrtubdx69NnA0loc0exvCY1s2fYL4lGZtFHe2ohNQ==", "integrity": "sha512-ekvI93ZkWIJoCOtDl0D2QMxnWvTejk9V5nWBqRv+7t0xjiBXqAK5U6o6JE2RPvlIC3EqwNyUoIZSdHX9MZK3nw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"funding": { "funding": {
@@ -3193,9 +3204,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.182", "version": "1.5.252",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.182.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.252.tgz",
"integrity": "sha512-Lv65Btwv9W4J9pyODI6EWpdnhfvrve/us5h1WspW8B2Fb0366REPtY3hX7ounk1CkV/TBjWCEvCBBbYbmV0qCA==", "integrity": "sha512-53uTpjtRgS7gjIxZ4qCgFdNO2q+wJt/Z8+xAvxbCqXPJrY6h7ighUkadQmNMXH96crtpa6gPFNP7BF4UBGDuaA==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
@@ -3309,15 +3320,16 @@
} }
}, },
"node_modules/fraction.js": { "node_modules/fraction.js": {
"version": "4.3.7", "version": "5.3.4",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==",
"dev": true, "dev": true,
"license": "MIT",
"engines": { "engines": {
"node": "*" "node": "*"
}, },
"funding": { "funding": {
"type": "patreon", "type": "github",
"url": "https://github.com/sponsors/rawify" "url": "https://github.com/sponsors/rawify"
} }
}, },
@@ -3936,10 +3948,11 @@
} }
}, },
"node_modules/node-releases": { "node_modules/node-releases": {
"version": "2.0.19", "version": "2.0.27",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz",
"integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
"dev": true "dev": true,
"license": "MIT"
}, },
"node_modules/normalize-range": { "node_modules/normalize-range": {
"version": "0.1.2", "version": "0.1.2",
@@ -4403,9 +4416,9 @@
} }
}, },
"node_modules/svelte": { "node_modules/svelte": {
"version": "5.43.4", "version": "5.43.14",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-5.43.4.tgz", "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.43.14.tgz",
"integrity": "sha512-tPNp21nDWB0PSHE+VrTvEy9cFtDp2Q+ATxQoFomISEVdikZ1QZ69UqBPz/LlT+Oc8/LYS/COYwDQZrmZEUr+JQ==", "integrity": "sha512-pHeUrp1A5S6RGaXhJB7PtYjL1VVjbVrJ2EfuAoPu9/1LeoMaJa/pcdCsCSb0gS4eUHAHnhCbUDxORZyvGK6kOQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -4429,9 +4442,9 @@
} }
}, },
"node_modules/svelte-check": { "node_modules/svelte-check": {
"version": "4.3.3", "version": "4.3.4",
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.3.3.tgz", "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.3.4.tgz",
"integrity": "sha512-RYP0bEwenDXzfv0P1sKAwjZSlaRyqBn0Fz1TVni58lqyEiqgwztTpmodJrGzP6ZT2aHl4MbTvWP6gbmQ3FOnBg==", "integrity": "sha512-DVWvxhBrDsd+0hHWKfjP99lsSXASeOhHJYyuKOFYJcP7ThfSCKgjVarE8XfuMWpS5JV3AlDf+iK1YGGo2TACdw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -4670,9 +4683,9 @@
} }
}, },
"node_modules/update-browserslist-db": { "node_modules/update-browserslist-db": {
"version": "1.1.3", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz",
"integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -4707,9 +4720,9 @@
"dev": true "dev": true
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "7.2.2", "version": "7.2.4",
"resolved": "https://registry.npmjs.org/vite/-/vite-7.2.2.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.4.tgz",
"integrity": "sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==", "integrity": "sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
+7 -7
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.44.1", "version": "0.44.4",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
@@ -12,24 +12,24 @@
"@sveltejs/vite-plugin-svelte": "^6.2.1", "@sveltejs/vite-plugin-svelte": "^6.2.1",
"@tailwindcss/postcss": "^4.1.17", "@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/typography": "^0.5.19", "@tailwindcss/typography": "^0.5.19",
"@tsconfig/svelte": "^5.0.5", "@tsconfig/svelte": "^5.0.6",
"@vitejs/plugin-legacy": "^7.2.1", "@vitejs/plugin-legacy": "^7.2.1",
"autoprefixer": "^10.4.21", "autoprefixer": "^10.4.22",
"bgutils-js": "^3.2.0", "bgutils-js": "^3.2.0",
"daisyui": "^5.4.7", "daisyui": "^5.5.5",
"dotenv": "^17.2.3", "dotenv": "^17.2.3",
"ip": "^2.0.1", "ip": "^2.0.1",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"postcss": "^8.5.6", "postcss": "^8.5.6",
"rollup-plugin-visualizer": "^6.0.5", "rollup-plugin-visualizer": "^6.0.5",
"svelte": "^5.43.4", "svelte": "^5.43.14",
"svelte-check": "^4.3.3", "svelte-check": "^4.3.4",
"svelte-preprocess": "^6.0.3", "svelte-preprocess": "^6.0.3",
"tailwindcss": "^4.1.17", "tailwindcss": "^4.1.17",
"terser": "^5.44.1", "terser": "^5.44.1",
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"vite": "^7.2.2", "vite": "^7.2.4",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-tsconfig-paths": "^5.1.4", "vite-tsconfig-paths": "^5.1.4",
"youtubei.js": "^16.0.1" "youtubei.js": "^16.0.1"
+1 -1
View File
@@ -15,6 +15,6 @@ INVIDIOUS_HMAC_KEY=PASSWORD_1
INVIDIOUS_COMPANION_KEY=PASSWORD_2 INVIDIOUS_COMPANION_KEY=PASSWORD_2
``` ```
- Run `docker-compose up` - Run `docker compose up -d --pull always`
Invidious should now be running locally on port 3000. Invidious should now be running locally on port 3000.
+1 -1
View File
@@ -32,7 +32,7 @@ services:
# Use the key generated in the 2nd step # Use the key generated in the 2nd step
hmac_key: $INVIDIOUS_HMAC_KEY hmac_key: $INVIDIOUS_HMAC_KEY
healthcheck: healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1 test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/popular || exit 1
interval: 30s interval: 30s
timeout: 5s timeout: 5s
retries: 2 retries: 2