Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99f606610c | ||
|
|
62b4a90a7e | ||
|
|
ee98f0f368 | ||
|
|
81db556699 | ||
|
|
81ee5b3262 | ||
|
|
338ad6f82c | ||
|
|
c89eb3ccce | ||
|
|
7a38245630 | ||
|
|
6ca16bd0b2 | ||
|
|
70fc97ae38 | ||
|
|
22f8031b91 | ||
|
|
1e121fdddd | ||
|
|
97f4a0ed61 | ||
|
|
277c5e0562 | ||
|
|
fa64af7ff5 | ||
|
|
10bcf9f1f4 | ||
|
|
a75c42f4ac | ||
|
|
f5b81eff4d | ||
|
|
b6bdbee42f | ||
|
|
0fc9fbb79a | ||
|
|
f3c159218a | ||
|
|
e8624cdb1f | ||
|
|
d427989576 | ||
|
|
4706d71639 | ||
|
|
16df893c2c | ||
|
|
6129afd695 | ||
|
|
84504a5931 | ||
|
|
0123f9fa8e | ||
|
|
7227d4e26b | ||
|
|
58fe601b25 | ||
|
|
a61d132b57 | ||
|
|
ee4acfc8e7 | ||
|
|
fcd798a2fa | ||
|
|
f5be0e5842 | ||
|
|
2d9f3abe5d | ||
|
|
69fe737006 | ||
|
|
ac6c9122c2 | ||
|
|
d3e0883332 | ||
|
|
5c39405255 | ||
|
|
6535006d66 | ||
|
|
a43cb91e1e | ||
|
|
58ce807e42 | ||
|
|
2319ae7025 | ||
|
|
1f2058abce | ||
|
|
aadbde330d | ||
|
|
60df07c95c | ||
|
|
71757bb9d5 | ||
|
|
630176d8aa | ||
|
|
03c7f9afe6 |
No files matched your search
@@ -2,7 +2,7 @@ name: Stats
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 11 * * *"
|
||||
- cron: "0 9 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
Vendored
+23
@@ -76,6 +76,29 @@
|
||||
"args": "--log-level info --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc",
|
||||
"cwd": "${workspaceFolder}/playlet-lib",
|
||||
"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": [
|
||||
|
||||
Vendored
+5
@@ -49,6 +49,11 @@
|
||||
"label": "build-web",
|
||||
"script": "build:web",
|
||||
"type": "npm"
|
||||
},
|
||||
{
|
||||
"label": "build-playground",
|
||||
"script": "build:playground",
|
||||
"type": "npm"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,6 +5,66 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.45.0] - 2026-05-25
|
||||
|
||||
### Added
|
||||
|
||||
- Experimental support for changing playback speed from YouTube mobile app using Leanback/Lounge api
|
||||
- Support for disabling AI auto-dubbed audio tracks
|
||||
|
||||
### Fixed
|
||||
|
||||
- Bug where large playlists (1k+ videos) only load the first page
|
||||
|
||||
## [0.44.10] - 2026-05-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- Bug where home screen editor is empty with a fresh install
|
||||
|
||||
## [0.44.9] - 2026-04-25
|
||||
|
||||
### Fixed
|
||||
|
||||
- Updated dependencies and innertube versions
|
||||
|
||||
## [0.44.8] - 2026-04-24
|
||||
|
||||
### Fixed
|
||||
|
||||
- Always use `signatureTimestamp` in `/player` calls to prevent "reload page" errors. This affects watch history.
|
||||
- Attempt 2 to fix watch history and watch progress
|
||||
|
||||
## [0.44.7] - 2026-04-23
|
||||
|
||||
### Fixed
|
||||
|
||||
- Attempt to fix watch history and watch progress
|
||||
- Channel sort
|
||||
|
||||
## [0.44.6] - 2026-02-08
|
||||
|
||||
### Fixed
|
||||
|
||||
- Error dialog doesn't close automatically when playback recovers after an error
|
||||
- All audio track names are shown as "Other" in multi audio track videos
|
||||
|
||||
## [0.44.5] - 2026-01-17
|
||||
|
||||
### Fixed
|
||||
|
||||
- Error handling when ytjs formats have missing urls
|
||||
|
||||
## [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
|
||||
|
||||
+20
@@ -8,6 +8,26 @@ Playlet does not show advertising, whether personalized or non personalized.
|
||||
|
||||
Playlet may integrate with 3rd party telemetry services in order to capture anonymous diagnostics data. The only purpose of this data is to diagnose issues and improve the app.
|
||||
|
||||
### Current telemetry implementation
|
||||
|
||||
> This section tries to explain in more detail what data is collected and how it is used. Due to the granularity and details of the following explanation, it might be slightly out of date, but mostly represents the reality of the "Playlet may integrate with 3rd party telemetry services"
|
||||
|
||||
Currently, Playlet captures a bunch of errors through the [telemetry client code](https://github.com/iBicha/playlet/tree/f3c159218ac8e3eec08eb7b62cbd45ad6c451b99/playlet-lib/src/components/Telemetry).
|
||||
It's mostly OS info (version, device model, etc), app info, user country code, locale, error messages, and stack traces. Nothing more than necessary is captured to debug problems.
|
||||
|
||||
In addition to that, an anonymous user id (just a guid stable across app launches of Playlet) and a session id (generated on every launch) are collected.
|
||||
|
||||
The user id is used to understand how many people an error affects. Sometimes one issue is spread out evenly among users, sometimes it's a handful of users (or even just one) spamming the same errors. This helps investigate that aspect.
|
||||
|
||||
The session id is used to understand how an error happened. By isolating a specific error to a session, it helps understand what led to said error.
|
||||
|
||||
This data is currently sent to a server, then forwarded to a self-hosted instance [Glitch-Tip](https://gitlab.com/glitchtip/glitchtip) which provides a simple dashboard showing how frequent errors are, and on which versions they occur.
|
||||
|
||||
This data is anonymous. The data is not collected in a way that can be linked back to a real person, or a YouTube profile for example.
|
||||
The data is stored on a local hard drive, does not leave said hard drive, and accessed only by the currently single developer of Playlet, and frequently purged (because honestly I don't have the disk space).
|
||||
|
||||
The data is used to investigate errors, like playback errors, feed load errors, login errors, and so on.
|
||||
|
||||
## Invidious
|
||||
|
||||
Playlet may request information from one or more [Invidious](https://invidious.io/)
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
|
||||
Playlet is an unofficial YouTube client for Roku 📺
|
||||
|
||||
**[Playlet February 2026 Update](https://github.com/iBicha/playlet/discussions/827)**
|
||||
|
||||
|
||||
## Screenshots
|
||||
|
||||
<a href="./docs/screenshots/README.md">
|
||||
|
||||
Generated
+618
-1430
File diff suppressed because it is too large.
Load diff
+22
-21
@@ -1,38 +1,38 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.44.3",
|
||||
"version": "0.45.0",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.38",
|
||||
"@rokucommunity/bslint": "^0.8.43",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^24.10.0",
|
||||
"@types/node": "^25.9.1",
|
||||
"@types/xml2js": "^0.4.14",
|
||||
"argparse": "^2.0.1",
|
||||
"brighterscript": "0.70.3",
|
||||
"brighterscript-formatter": "^1.7.19",
|
||||
"brighterscript": "0.72.2",
|
||||
"brighterscript-formatter": "^1.7.26",
|
||||
"convert-svg-to-png": "^0.7.1",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dotenv": "^17.2.3",
|
||||
"fs-extra": "^11.3.2",
|
||||
"glob": "^11.0.3",
|
||||
"dotenv": "^17.4.2",
|
||||
"fs-extra": "^11.3.5",
|
||||
"glob": "^13.0.6",
|
||||
"imap": "^0.8.19",
|
||||
"ip": "^2.0.1",
|
||||
"json5": "^2.2.3",
|
||||
"mailparser": "^3.9.0",
|
||||
"protocol-buffers-schema": "^3.6.0",
|
||||
"puppeteer": "^24.29.1",
|
||||
"roku-deploy": "^3.14.4",
|
||||
"roku-test-automation": "^2.2.1",
|
||||
"rooibos-roku": "5.15.5",
|
||||
"mailparser": "^3.9.8",
|
||||
"protocol-buffers-schema": "^3.6.1",
|
||||
"puppeteer": "^25.0.4",
|
||||
"roku-deploy": "^3.17.4",
|
||||
"roku-test-automation": "^2.2.2",
|
||||
"rooibos-roku": "5.16.3",
|
||||
"rounded-rect-9patch": "^1.1.2",
|
||||
"semver": "^7.7.3",
|
||||
"semver": "^7.8.1",
|
||||
"shelljs": "^0.10.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "5.9.3",
|
||||
"telnet-client": "^2.2.6",
|
||||
"typescript": "6.0.3",
|
||||
"telnet-client": "^2.2.13",
|
||||
"xml2js": "^0.6.2",
|
||||
"yaml": "^2.8.1"
|
||||
"yaml": "^2.9.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "22"
|
||||
@@ -48,6 +48,7 @@
|
||||
"build:lib:dev": "cd playlet-lib && npm run build:dev",
|
||||
"build:lib:prod": "cd playlet-lib && npm run build:prod",
|
||||
"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: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",
|
||||
@@ -65,8 +66,8 @@
|
||||
"screenshot": "node tools/screenshot.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",
|
||||
"postinstall": "cd playlet-lib && npm install && cd ../playlet-app && npm install && cd ../playlet-web && npm install",
|
||||
"update-deps": "npx npm-check-updates --deep --upgrade --install always --reject rooibos-roku",
|
||||
"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 typescript,svelte-preprocess",
|
||||
"registry:write": "node tools/registry.js --input registry.json",
|
||||
"registry:read": "node tools/registry.js --output registry.json",
|
||||
"registry:clear": "node tools/registry.js --clear",
|
||||
@@ -75,6 +76,6 @@
|
||||
"shutdown": "node tools/shutdown.js"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-linux-x64-gnu": "^4.53.1"
|
||||
"@rollup/rollup-linux-x64-gnu": "^4.60.4"
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "../config/bsconfig.base.jsonc",
|
||||
"rootDir": "src/",
|
||||
"stagingDir": "../build/playground",
|
||||
"outFile": "../dist/playground.zip"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "bsconfig.json",
|
||||
"createPackage": false,
|
||||
"deploy": false,
|
||||
"retainStagingDir": false,
|
||||
"sourceMap": false
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "../config/bsconfig.tests.base.jsonc",
|
||||
"rootDir": "src/",
|
||||
"stagingDir": "../build/playground-tests",
|
||||
"outFile": "../build/playground-tests.zip"
|
||||
}
|
||||
Generated
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "playground",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playground",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
function Init()
|
||||
print "Playground Init"
|
||||
end function
|
||||
@@ -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 |
@@ -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
|
||||
@@ -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
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.44.3",
|
||||
"version": "0.45.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-app",
|
||||
"version": "0.44.3"
|
||||
"version": "0.45.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.44.3",
|
||||
"version": "0.45.0",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "node ../tools/rm.js ../build/playlet-app",
|
||||
|
||||
@@ -2,8 +2,8 @@ title=Playlet
|
||||
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=44
|
||||
build_version=00003
|
||||
minor_version=45
|
||||
build_version=00000
|
||||
|
||||
ui_resolutions=hd
|
||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.44.3",
|
||||
"version": "0.45.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-lib",
|
||||
"version": "0.44.3"
|
||||
"version": "0.45.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.44.3",
|
||||
"version": "0.45.0",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "node ../tools/rm.js ../build/playlet-lib",
|
||||
|
||||
@@ -50,7 +50,7 @@ end function
|
||||
|
||||
function JobError(error as dynamic) as void
|
||||
error = ErrorUtils.Format(error)
|
||||
LogError(error)
|
||||
LogError(`[${m.top.subtype()}]${error}`)
|
||||
callbackNode = JobGetCallbackNode()
|
||||
if callbackNode = invalid
|
||||
return
|
||||
|
||||
@@ -115,12 +115,17 @@ function OnLineSysLog(event as object, dateTime as object, logsFile as string, b
|
||||
if info.LogType <> "http.error"
|
||||
return
|
||||
end if
|
||||
httpCode = ValidInt(info.HttpCode)
|
||||
if httpCode >= 200 and httpCode < 300
|
||||
return
|
||||
end if
|
||||
|
||||
line = FormatTime(dateTime) + "[ERROR][SysLog] " + ToString(info)
|
||||
print line
|
||||
buffer.FromAsciiString(line + `\n`)
|
||||
buffer.AppendFile(logsFile)
|
||||
|
||||
fingerprint = `SysLog${info.Status}${info.LogType}${info.HttpCode}${info.Method}`
|
||||
fingerprint = `SysLog${info.Status}${info.LogType}${httpCode}${info.Method}`
|
||||
|
||||
if ThrottleEvent("SysLogError", fingerprint, 60)
|
||||
return
|
||||
@@ -145,11 +150,11 @@ function OnLineLogMonitorMemoryWarning(event as object, dateTime as object, logs
|
||||
return
|
||||
end if
|
||||
|
||||
LogTelemetryEvent({
|
||||
level: "warning"
|
||||
message: line + `\nCurrentTime: ${m.eventThrottleTimer.TotalSeconds()}`
|
||||
fingerprint: [message]
|
||||
})
|
||||
' LogTelemetryEvent({
|
||||
' level: "warning"
|
||||
' message: line + `\nCurrentTime: ${m.eventThrottleTimer.TotalSeconds()}`
|
||||
' fingerprint: [message]
|
||||
' })
|
||||
end function
|
||||
|
||||
function OnLineLogDeviceInfoMemoryWarning(event as object, dateTime as object, logsFile as string, buffer as object) as void
|
||||
@@ -168,11 +173,11 @@ function OnLineLogDeviceInfoMemoryWarning(event as object, dateTime as object, l
|
||||
buffer.FromAsciiString(line + `\n`)
|
||||
buffer.AppendFile(logsFile)
|
||||
|
||||
LogTelemetryEvent({
|
||||
level: "warning"
|
||||
message: line + `\nCurrentTime: ${m.eventThrottleTimer.TotalSeconds()}`
|
||||
fingerprint: [message]
|
||||
})
|
||||
' LogTelemetryEvent({
|
||||
' level: "warning"
|
||||
' message: line + `\nCurrentTime: ${m.eventThrottleTimer.TotalSeconds()}`
|
||||
' fingerprint: [message]
|
||||
' })
|
||||
end function
|
||||
|
||||
' Returns true if the event should be throttled
|
||||
|
||||
@@ -68,8 +68,8 @@ function LoginWithInvidious() as void
|
||||
DialogUtils.ShowDialogEx({
|
||||
title: "No Invidious Instance"
|
||||
message: [
|
||||
"Playlet built-in backend does not support login yet.",
|
||||
"Can only login if an Invidious instance is set in the settings."
|
||||
"Playlet built-in backend does not support Invidious login.",
|
||||
"Can only login with Invidious if an Invidious instance is set in the settings."
|
||||
]
|
||||
})
|
||||
return
|
||||
|
||||
+23
-6
@@ -7,10 +7,10 @@ import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
m.homeLayout = {}
|
||||
homeLayout = StringUtils.ParseJsonSafe(ReadAsciiFile("libpkg:/config/default_home_layout.yaml"))
|
||||
for each item in homeLayout
|
||||
m.homeLayout[item.id] = item
|
||||
m.homeLayoutMap = {}
|
||||
homeLayoutMap = StringUtils.ParseJsonSafe(ReadAsciiFile("libpkg:/config/default_home_layout.yaml"))
|
||||
for each item in homeLayoutMap
|
||||
m.homeLayoutMap[item.id] = item
|
||||
end for
|
||||
|
||||
m.checkList = m.top.findNode("checkList")
|
||||
@@ -81,17 +81,34 @@ function OnValueChange()
|
||||
|
||||
nodes = []
|
||||
checkedState = []
|
||||
homeLayoutMap = {}
|
||||
homeLayoutMap.Append(m.homeLayoutMap)
|
||||
|
||||
for each item in value
|
||||
feed = m.homeLayout[item.id]
|
||||
feed = homeLayoutMap[item.id]
|
||||
if feed = invalid
|
||||
LogWarn("unknown feed id:", item.id)
|
||||
continue for
|
||||
end if
|
||||
homeLayoutMap.Delete(item.id)
|
||||
node = CreateObject("roSGNode", "ContentNode")
|
||||
node.id = feed.id
|
||||
node.title = Tr(feed.title)
|
||||
nodes.push(node)
|
||||
checkedState.push(item.enabled)
|
||||
end for
|
||||
|
||||
for each id in homeLayoutMap
|
||||
feed = homeLayoutMap[id]
|
||||
if feed = invalid
|
||||
LogWarn("unknown feed id:", id)
|
||||
continue for
|
||||
end if
|
||||
node = CreateObject("roSGNode", "ContentNode")
|
||||
node.id = feed.id
|
||||
node.title = Tr(feed.title)
|
||||
nodes.push(node)
|
||||
checkedState.push(item.enabled)
|
||||
checkedState.push(false)
|
||||
end for
|
||||
|
||||
labelCount = content.getChildCount()
|
||||
|
||||
+1
-1
@@ -324,7 +324,7 @@ end function
|
||||
|
||||
function CanFetchWithCors(instance as string, testNode as object, cancellation as object) as void
|
||||
try
|
||||
url = `${instance}/api/v1/trending`
|
||||
url = `${instance}/api/v1/popular`
|
||||
response = HttpClient.Get(url).NoCache().Cancellation(cancellation).Await()
|
||||
|
||||
if not response.IsSuccess()
|
||||
|
||||
@@ -7,9 +7,11 @@ import "pkg:/source/utils/UrlUtils.bs"
|
||||
class DashManifest
|
||||
|
||||
public invidiousInstance as dynamic
|
||||
public disableAutoDubbed as boolean
|
||||
|
||||
function new(invidiousInstance as string)
|
||||
function new(invidiousInstance as string, disableAutoDubbed = false as boolean)
|
||||
m.invidiousInstance = invidiousInstance
|
||||
m.disableAutoDubbed = disableAutoDubbed
|
||||
|
||||
m.utils = new Http.Utils()
|
||||
|
||||
@@ -279,6 +281,9 @@ class DashManifest
|
||||
function GenerateAudioAdaptationSets(xml as object, audioGroups as object, id as integer, metadata as object) as integer
|
||||
for each group in audioGroups
|
||||
firstFormat = group[0]
|
||||
if m.disableAutoDubbed and ValidBool(firstFormat.isAutoDubbed)
|
||||
continue for
|
||||
end if
|
||||
hoisted = {}
|
||||
|
||||
adaptationSetAttributes = {
|
||||
@@ -289,8 +294,13 @@ class DashManifest
|
||||
"contentType": "audio"
|
||||
}
|
||||
|
||||
if IsAssociativeArray(firstFormat.audioTrack) and IsString(firstFormat.audioTrack.languageCode)
|
||||
adaptationSetAttributes["lang"] = firstFormat.audioTrack.languageCode
|
||||
if IsAssociativeArray(firstFormat.audioTrack)
|
||||
if IsString(firstFormat.audioTrack.languageCode)
|
||||
adaptationSetAttributes["lang"] = firstFormat.audioTrack.languageCode
|
||||
else if IsString(firstFormat.audioTrack.id)
|
||||
' ID is in the format "CODE.DIGIT" e.g. "en.4"
|
||||
adaptationSetAttributes["lang"] = firstFormat.audioTrack.id.split(".")[0]
|
||||
end if
|
||||
end if
|
||||
|
||||
' Hoist common attributes
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
const PLAYLET_SUPPORT_SERVER = "https://playlet-v8556.ondigitalocean.app"
|
||||
|
||||
const VIDEO_PLAYER_USER_AGENT = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0"
|
||||
const VIDEO_PLAYER_USER_AGENT = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
|
||||
|
||||
const INNERTUBE_IOS_CLIENT_NAME = "5"
|
||||
const INNERTUBE_IOS_CLIENT_VERSION = "20.39.4"
|
||||
const INNERTUBE_IOS_CLIENT_VERSION = "21.16.2"
|
||||
const INNERTUBE_IOS_DEVICE_MODEL = "iPhone16,2"
|
||||
const INNERTUBE_IOS_OS_VERSION = "18.1"
|
||||
const INNERTUBE_IOS_USER_AGENT = "com.google.ios.youtube/20.39.4 (iPhone16,2; U; CPU iOS 18_1_0 like Mac OS X)"
|
||||
const INNERTUBE_IOS_USER_AGENT = "com.google.ios.youtube/21.16.2 (iPhone16,2; U; CPU iOS 18_1_0 like Mac OS X)"
|
||||
|
||||
const INNERTUBE_WEB_BROWSER_NAME = "Chrome"
|
||||
const INNERTUBE_WEB_BROWSER_VERSION = "140.0.0.0"
|
||||
const INNERTUBE_WEB_BROWSER_VERSION = "147.0.0.0"
|
||||
const INNERTUBE_WEB_CLIENT_NAME = "1"
|
||||
const INNERTUBE_WEB_CLIENT_VERSION = "2.20250927.00.01"
|
||||
const INNERTUBE_WEB_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0"
|
||||
const INNERTUBE_WEB_CLIENT_VERSION = "2.20260424.01.00"
|
||||
const INNERTUBE_WEB_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36"
|
||||
|
||||
const INNERTUBE_TV_BROWSER_NAME = "SamsungBrowser"
|
||||
const INNERTUBE_TV_BROWSER_VERSION = "9.2"
|
||||
const INNERTUBE_TV_CLIENT_NAME = "2"
|
||||
const INNERTUBE_TV_CLIENT_VERSION = "7.20251015.07.00"
|
||||
const INNERTUBE_TV_CLIENT_VERSION = "7.20260422.12.00"
|
||||
const INNERTUBE_TV_DEVICE_MAKE = "Samsung"
|
||||
const INNERTUBE_TV_DEVICE_MODEL = "SmartTV"
|
||||
const INNERTUBE_TV_OS_NAME = "Tizen"
|
||||
|
||||
@@ -267,63 +267,6 @@ namespace InnertubeService
|
||||
return Innertube.Search(query, options)
|
||||
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
|
||||
return GetBrowseAuthenticatedPage("FEwhat_to_watch", options)
|
||||
end function
|
||||
@@ -419,6 +362,7 @@ namespace InnertubeService
|
||||
cancellation = OptionUtils.Get(options, "cancellation")
|
||||
accessToken = OptionUtils.Get(options, "accessToken")
|
||||
onBehalfOfUser = OptionUtils.Get(options, "onBehalfOfUser")
|
||||
cpn = OptionUtils.Get(options, "cpn")
|
||||
|
||||
videostatsPlaybackUrl = videostatsPlaybackUrl.replace("https://s.", "https://www.")
|
||||
queryParams = UrlUtils.ParseQueryComponents(videostatsPlaybackUrl)
|
||||
@@ -426,8 +370,8 @@ namespace InnertubeService
|
||||
queryParams["cbrver"] = INNERTUBE_TV_CLIENT_VERSION
|
||||
queryParams["cver"] = INNERTUBE_TV_CLIENT_VERSION
|
||||
queryParams["ver"] = "2"
|
||||
queryParams["cpn"] = InnertubeService.CreateClientPlaybackNonce()
|
||||
queryParams["cmt"] = 0
|
||||
queryParams["cmt"] = "0"
|
||||
queryParams["cpn"] = cpn
|
||||
queryParams["final"] = "1"
|
||||
videostatsPlaybackUrl = UrlUtils.SetQueryParams(videostatsPlaybackUrl, queryParams)
|
||||
|
||||
@@ -456,6 +400,7 @@ namespace InnertubeService
|
||||
onBehalfOfUser = OptionUtils.Get(options, "onBehalfOfUser")
|
||||
|
||||
timeStr = time.ToStr("%.3f")
|
||||
cpn = OptionUtils.Get(options, "cpn")
|
||||
|
||||
videostatsWatchtimeUrl = videostatsWatchtimeUrl.replace("https://s.", "https://www.")
|
||||
queryParams = UrlUtils.ParseQueryComponents(videostatsWatchtimeUrl)
|
||||
@@ -463,11 +408,11 @@ namespace InnertubeService
|
||||
queryParams["cbrver"] = INNERTUBE_TV_CLIENT_VERSION
|
||||
queryParams["cver"] = INNERTUBE_TV_CLIENT_VERSION
|
||||
queryParams["ver"] = "2"
|
||||
queryParams["cpn"] = InnertubeService.CreateClientPlaybackNonce()
|
||||
queryParams["cmt"] = 0
|
||||
queryParams["final"] = "1"
|
||||
queryParams["cpn"] = cpn
|
||||
queryParams["cmt"] = "0"
|
||||
queryParams["st"] = timeStr
|
||||
queryParams["et"] = timeStr
|
||||
queryParams["final"] = "1"
|
||||
videostatsWatchtimeUrl = UrlUtils.SetQueryParams(videostatsWatchtimeUrl, queryParams)
|
||||
|
||||
request = HttpClient.Get(videostatsWatchtimeUrl)
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Innertube
|
||||
"richGridRenderer": ParseRichGridRenderer
|
||||
"richItemRenderer": ParseRichItemRenderer
|
||||
"feedFilterChipBarRenderer": ParseFeedFilterChipBarRenderer
|
||||
"chipBarViewModel": ParseChipBarViewModel
|
||||
"continuationItemRenderer": ParseContinuationItemRenderer
|
||||
"appendContinuationItemsAction": ParseAppendContinuationItemsAction
|
||||
"reloadContinuationItemsCommand": ParseReloadContinuationItemsCommand
|
||||
@@ -163,6 +164,7 @@ namespace Innertube
|
||||
"emergencyOneboxRenderer": ParseNotImplemented
|
||||
' Suicide & crisis lifeline, within search
|
||||
"searchFrictionViewModel": ParseNotImplemented
|
||||
"shoppingTimelyShelfViewModel": ParseNotImplemented
|
||||
"backstagePostRenderer": ParseNotImplemented
|
||||
"backstagePostThreadRenderer": ParseNotImplemented
|
||||
"counterfactualRenderer": ParseNotImplemented
|
||||
@@ -251,6 +253,15 @@ namespace Innertube
|
||||
context.currentFeed.sortOptions = sortOptions
|
||||
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"]
|
||||
end function
|
||||
|
||||
@@ -1710,13 +1721,64 @@ namespace Innertube
|
||||
end function
|
||||
|
||||
function ParseRichGridRenderer(nodeData as object, context as object) as object
|
||||
feedFilterChipBarRenderer = ObjectUtils.Dig(nodeData, ["header", "feedFilterChipBarRenderer"])
|
||||
header = nodeData["header"]
|
||||
feedFilterChipBarRenderer = invalid
|
||||
chipBarViewModel = invalid
|
||||
if IsAssociativeArray(header)
|
||||
feedFilterChipBarRenderer = header["feedFilterChipBarRenderer"]
|
||||
chipBarViewModel = header["chipBarViewModel"]
|
||||
end if
|
||||
|
||||
if feedFilterChipBarRenderer <> invalid
|
||||
ParseFeedFilterChipBarRenderer(feedFilterChipBarRenderer, context)
|
||||
else if chipBarViewModel <> invalid
|
||||
ParseChipBarViewModel(chipBarViewModel, context)
|
||||
end if
|
||||
return nodeData["contents"]
|
||||
end function
|
||||
|
||||
function ParseChipBarViewModel(nodeData as object, context as object) as object
|
||||
chips = ObjectUtils.Dig(nodeData, ["chips"])
|
||||
if not IsArray(chips)
|
||||
return invalid
|
||||
end if
|
||||
|
||||
sortOptions = []
|
||||
for each chip in chips
|
||||
chipViewModel = chip["chipViewModel"]
|
||||
if not IsAssociativeArray(chipViewModel)
|
||||
continue for
|
||||
end if
|
||||
title = ValidString(chipViewModel["text"])
|
||||
isSelected = ValidBool(chipViewModel["selected"])
|
||||
token = invalid
|
||||
tapCommand = chipViewModel["tapCommand"]
|
||||
if IsAssociativeArray(tapCommand)
|
||||
innertubeCommand = tapCommand["innertubeCommand"]
|
||||
if IsAssociativeArray(innertubeCommand)
|
||||
continuationCommand = innertubeCommand["continuationCommand"]
|
||||
if IsAssociativeArray(continuationCommand)
|
||||
token = ValidString(continuationCommand["token"])
|
||||
end if
|
||||
end if
|
||||
end if
|
||||
if title = "" or StringUtils.IsNullOrEmpty(token)
|
||||
continue for
|
||||
end if
|
||||
sortOptions.Push({
|
||||
"title": title
|
||||
"continuation": token
|
||||
"isSelected": isSelected
|
||||
})
|
||||
end for
|
||||
|
||||
if sortOptions.Count() > 0
|
||||
context.currentFeed.sortOptions = sortOptions
|
||||
end if
|
||||
|
||||
return invalid
|
||||
end function
|
||||
|
||||
function ParseRichItemRenderer(nodeData as object, _context as object) as object
|
||||
return nodeData["content"]
|
||||
end function
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace Innertube
|
||||
playlistId = ObjectUtils.Dig(primaryInfo, ["navigationEndpoint", "watchEndpoint", "playlistId"])
|
||||
title = ParseText(ObjectUtils.Dig(primaryInfo, ["title"]))
|
||||
description = ParseText(ObjectUtils.Dig(primaryInfo, ["description"]))
|
||||
videoCount = ParseText(ObjectUtils.Dig(primaryInfo, ["stats", 0, "runs", 0, "text"])).ToInt()
|
||||
videoCount = ParseText(ObjectUtils.Dig(primaryInfo, ["stats", 0, "runs", 0, "text"])).Replace(",", "").ToInt()
|
||||
thumbnail = ObjectUtils.Dig(primaryInfo, ["thumbnailRenderer", "playlistVideoThumbnailRenderer", "thumbnail", "thumbnails", 0, "url"])
|
||||
|
||||
author = ParseText(ObjectUtils.Dig(secondaryInfo, ["videoOwner", "videoOwnerRenderer", "title"]))
|
||||
|
||||
@@ -13,8 +13,6 @@ namespace Innertube
|
||||
cancellation = OptionUtils.Get(options, "cancellation")
|
||||
visitorData = OptionUtils.Get(options, "visitorData")
|
||||
accessToken = OptionUtils.Get(options, "accessToken")
|
||||
doSignatureTimestamp = ValidBool(OptionUtils.Get(options, "signatureTimestamp"))
|
||||
|
||||
cpn = InnertubeService.CreateClientPlaybackNonce()
|
||||
|
||||
useAccessToken = client = Innertube.ClientType.TV and not StringUtils.IsNullOrEmpty(accessToken)
|
||||
@@ -52,12 +50,9 @@ namespace Innertube
|
||||
"contentCheckOk": true
|
||||
}
|
||||
|
||||
signatureTimestamp = invalid
|
||||
if doSignatureTimestamp
|
||||
signatureTimestamp = GetSignatureTimestamp(cancellation)
|
||||
if signatureTimestamp <> invalid
|
||||
payload["playbackContext"]["contentPlaybackContext"]["signatureTimestamp"] = signatureTimestamp
|
||||
end if
|
||||
signatureTimestamp = GetSignatureTimestamp(cancellation)
|
||||
if signatureTimestamp <> invalid
|
||||
payload["playbackContext"]["contentPlaybackContext"]["signatureTimestamp"] = signatureTimestamp
|
||||
end if
|
||||
|
||||
request = HttpClient.PostJson("https://www.youtube.com/youtubei/v1/player?prettyPrint=false&alt=json", payload)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
' Auto-generated file - do not modify manually
|
||||
' md5:252058d604a761c9fd33d800fce1b72b
|
||||
' md5:1dc03998a561a4b1270454e10a4d7ead
|
||||
|
||||
import "pkg:/source/Protobuf/BinaryReader.bs"
|
||||
import "pkg:/source/Protobuf/BinaryWriter.bs"
|
||||
|
||||
@@ -69,6 +69,7 @@ class LoungeApi
|
||||
commandHandlers[COMMAND_TYPE_GET_RECEIVER_STATUS] = m.HandleIgnoreCommand
|
||||
commandHandlers[COMMAND_TYPE_SEND_DEBUG_COMMAND] = m.HandleIgnoreCommand
|
||||
commandHandlers[COMMAND_TYPE_SET_AUTOPLAY_MODE] = m.HandleIgnoreCommand
|
||||
commandHandlers[COMMAND_TYPE_GET_PARTY_GAMES_MODE] = m.HandleIgnoreCommand
|
||||
|
||||
commandHandlers[COMMAND_TYPE_GET_NOW_PLAYING] = m.HandleGetPlayingNow
|
||||
commandHandlers[COMMAND_TYPE_SESSION_ID] = m.HandleSessionId
|
||||
@@ -84,6 +85,7 @@ class LoungeApi
|
||||
commandHandlers[COMMAND_TYPE_NEXT] = m.HandleNext
|
||||
commandHandlers[COMMAND_TYPE_STOP_VIDEO] = m.HandleStopVideo
|
||||
commandHandlers[COMMAND_TYPE_SEEK_TO] = m.HandleSeekTo
|
||||
commandHandlers[COMMAND_TYPE_SET_PLAYBACK_SPEED] = m.HandleSetPlaybackSpeed
|
||||
|
||||
for each key in commandHandlers
|
||||
m[COMMAND_HANDLER_PREFIX + key] = commandHandlers[key]
|
||||
@@ -176,7 +178,7 @@ class LoungeApi
|
||||
queryParams = {
|
||||
"device": "LOUNGE_SCREEN"
|
||||
"theme": "cl"
|
||||
"capabilities": ""
|
||||
"capabilities": "vsp"
|
||||
"mdxVersion": "2"
|
||||
"VER": "8"
|
||||
"v": "2"
|
||||
@@ -224,7 +226,7 @@ class LoungeApi
|
||||
queryParams = {
|
||||
"device": "LOUNGE_SCREEN"
|
||||
"theme": "cl"
|
||||
"capabilities": ""
|
||||
"capabilities": "vsp"
|
||||
"mdxVersion": "2"
|
||||
"VER": "8"
|
||||
"v": "2"
|
||||
@@ -490,6 +492,48 @@ class LoungeApi
|
||||
player.seek = seekTo
|
||||
end function
|
||||
|
||||
function HandleSetPlaybackSpeed(_commandId as integer, _commandType as string, commandArgs as object, messagesToSend as object) as void
|
||||
player = m.videoQueueNode.player
|
||||
if player = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
if not player.hasField("playbackSpeed")
|
||||
LogWarn("Video node does not support 'playbackSpeed' field on this device, ignoring setPlaybackSpeed command")
|
||||
return
|
||||
end if
|
||||
|
||||
speed = Val(commandArgs[FIELD_PLAYBACK_SPEED])
|
||||
if speed <= 0
|
||||
speed = 1.0
|
||||
end if
|
||||
|
||||
currentSpeed = ValidFloat(player.playbackSpeed)
|
||||
|
||||
if Abs(currentSpeed - speed) < 0.001
|
||||
LogDebug("Playback speed is already close to the requested speed. current:", currentSpeed, "requested:", speed)
|
||||
return
|
||||
end if
|
||||
|
||||
LogInfo("Setting playback speed to:", speed)
|
||||
|
||||
' Usually playbackSpeed doesn't get applied without pausing and resuming.
|
||||
didPause = false
|
||||
state = player.state
|
||||
if state = "playing"
|
||||
player.control = "pause"
|
||||
didPause = true
|
||||
end if
|
||||
|
||||
player.playbackSpeed = speed
|
||||
|
||||
if didPause
|
||||
player.control = "resume"
|
||||
end if
|
||||
|
||||
messagesToSend.Push(LoungeMessages.OnPlaybackSpeedChanged(speed, true))
|
||||
end function
|
||||
|
||||
function SendMessages(messages as object, loungeData = invalid as object) as void
|
||||
if messages.Count() = 0
|
||||
return
|
||||
@@ -498,7 +542,7 @@ class LoungeApi
|
||||
queryParams = {
|
||||
"device": "LOUNGE_SCREEN"
|
||||
"theme": "cl"
|
||||
"capabilities": ""
|
||||
"capabilities": "vsp"
|
||||
"mdxVersion": "2"
|
||||
"VER": "8"
|
||||
"v": "2"
|
||||
|
||||
@@ -3,6 +3,7 @@ const COMMAND_NOW_PLAYING = "nowPlaying"
|
||||
const COMMAND_ON_STATE_CHANGE = "onStateChange"
|
||||
const COMMAND_ON_VOLUME_CHANGED = "onVolumeChanged"
|
||||
const COMMAND_ON_PREVIOUS_NEXT_CHANGE = "onHasPreviousNextChanged"
|
||||
const COMMAND_ON_PLAYBACK_SPEED_CHANGED = "onPlaybackSpeedChanged"
|
||||
const COMMAND_LOUNGE_SCREEN_DISCONNECTED = "loungeScreenDisconnected"
|
||||
' Incoming commands
|
||||
const COMMAND_TYPE_SET_PLAYLIST = "setPlaylist"
|
||||
@@ -12,6 +13,7 @@ const COMMAND_TYPE_REMOTE_DISCONNECTED = "remoteDisconnected"
|
||||
const COMMAND_TYPE_GET_NOW_PLAYING = "getNowPlaying"
|
||||
const COMMAND_TYPE_GET_VOLUME = "getVolume"
|
||||
const COMMAND_TYPE_GET_SUBTITLES_TRACK = "getSubtitlesTrack"
|
||||
const COMMAND_TYPE_GET_PARTY_GAMES_MODE = "getPartyGamesMode"
|
||||
const COMMAND_TYPE_UPDATE_PLAYLIST = "updatePlaylist"
|
||||
const COMMAND_TYPE_NOOP = "noop"
|
||||
const COMMAND_TYPE_PLAY = "play"
|
||||
@@ -31,6 +33,7 @@ const COMMAND_TYPE_GRACEFUL_RECONNECT = "gracefulReconnect"
|
||||
const COMMAND_TYPE_GET_RECEIVER_STATUS = "getReceiverStatus"
|
||||
const COMMAND_TYPE_SEND_DEBUG_COMMAND = "sendDebugCommand"
|
||||
const COMMAND_TYPE_SET_AUTOPLAY_MODE = "setAutoplayMode"
|
||||
const COMMAND_TYPE_SET_PLAYBACK_SPEED = "setPlaybackSpeed"
|
||||
' Special commands
|
||||
const COMMAND_TYPE_SESSION_ID = "c"
|
||||
const COMMAND_TYPE_G_SESSION_ID = "S"
|
||||
@@ -64,6 +67,8 @@ const FIELD_SEEKABLE_END_TIME = "seekableEndTime"
|
||||
const FIELD_HAS_PREVIOUS = "hasPrevious"
|
||||
const FIELD_HAS_NEXT = "hasNext"
|
||||
const FIELD_NEW_TIME = "newTime"
|
||||
const FIELD_PLAYBACK_SPEED = "playbackSpeed"
|
||||
const FIELD_PLAYBACK_SPEED_INFO = "playbackSpeedInfo"
|
||||
|
||||
enum PlayerState
|
||||
UNSTARTED = -1
|
||||
|
||||
@@ -15,6 +15,20 @@ namespace LoungeMessages
|
||||
return message
|
||||
end function
|
||||
|
||||
function OnPlaybackSpeedChanged(speed as float, isContentSupportVSP as boolean) as object
|
||||
message = {
|
||||
commandType: COMMAND_ON_PLAYBACK_SPEED_CHANGED
|
||||
}
|
||||
commandArgs = {}
|
||||
commandArgs[FIELD_PLAYBACK_SPEED] = speed
|
||||
commandArgs[FIELD_PLAYBACK_SPEED_INFO] = FormatJson({
|
||||
"playbackSpeed": speed
|
||||
"isContentSupportVSP": isContentSupportVSP
|
||||
})
|
||||
message.commandArgs = commandArgs
|
||||
return message
|
||||
end function
|
||||
|
||||
function OnStateChange(player as object, overrides = invalid as object) as object
|
||||
message = {
|
||||
commandType: COMMAND_ON_STATE_CHANGE
|
||||
|
||||
@@ -162,6 +162,22 @@ function MigrateExistingPreferences(userPrefs as object) as boolean
|
||||
isDirty = true
|
||||
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
|
||||
if filteredLayout.Count() > 0
|
||||
userPrefs["misc.home_screen_layout"] = filteredLayout
|
||||
end if
|
||||
userPrefs.__version = 6
|
||||
isDirty = true
|
||||
end if
|
||||
|
||||
' TODO:P2 handle case where saved preferences version is higher than current version (e.g. user downgraded)
|
||||
|
||||
#if DEBUG
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
user prefs saved need to be migrated. If the version is less than the
|
||||
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="preferenceFields" type="assocarray" />
|
||||
<function name="GetUserPreferences" />
|
||||
|
||||
@@ -15,7 +15,7 @@ end function
|
||||
function OnNodeReady() as void
|
||||
m.top.ObserveField("enabled", FuncName(OnEnabledChanged))
|
||||
m.preferences.ObserveFieldScoped("dev.diagnostics.enabled", FuncName(OnPreferencesChanged))
|
||||
enabled = m.preferences["dev.diagnostics.enabled"]
|
||||
enabled = ValidBool(m.preferences["dev.diagnostics.enabled"])
|
||||
OnPreferencesChanged({
|
||||
enabled: enabled
|
||||
getData: function() as boolean
|
||||
|
||||
@@ -230,10 +230,11 @@ function RemoveSingleFailedRow(error as dynamic, feedSource as object, feedSourc
|
||||
end if
|
||||
|
||||
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("API disabled") <> -1
|
||||
isError = isError or feedSource.id.instr("inv_trending") <> -1
|
||||
isError = isError or feedSource.id.instr("inv_popular") <> -1
|
||||
' Playlet not supporting popular
|
||||
isError = isError or feedSource.id = "inv_popular"
|
||||
if not isError
|
||||
return false
|
||||
end if
|
||||
|
||||
@@ -4,7 +4,7 @@ import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
namespace Lounge
|
||||
|
||||
function SendNowPlayingLoading(videoId as dynamic) as void
|
||||
function SendNowPlayingLoading(videoId as dynamic, playbackSpeed as float) as void
|
||||
if StringUtils.IsNullOrEmpty(m.loungeService.loungeToken)
|
||||
return
|
||||
end if
|
||||
@@ -16,7 +16,9 @@ namespace Lounge
|
||||
overrides[FIELD_VIDEO_ID] = videoId
|
||||
end if
|
||||
nowPlayingMsg = LoungeMessages.NowPlaying(m.top, overrides)
|
||||
m.loungeService.outgoingMessages = [nowPlayingMsg, loungeStateMsg]
|
||||
' Sending playback speed to indicate that we will reset it to 1.0 when the content starts playing
|
||||
playbackSpeedMsg = LoungeMessages.OnPlaybackSpeedChanged(playbackSpeed, true)
|
||||
m.loungeService.outgoingMessages = [nowPlayingMsg, loungeStateMsg, playbackSpeedMsg]
|
||||
end function
|
||||
|
||||
function SendOnStateChange() as void
|
||||
|
||||
@@ -11,6 +11,7 @@ function ExecuteJob() as void
|
||||
authToken = input.authToken
|
||||
profileType = input.profileType
|
||||
playbackTrackingUrls = input.playbackTrackingUrls
|
||||
cpn = input.cpn
|
||||
|
||||
cancellation = JobGetCancellation()
|
||||
|
||||
@@ -43,9 +44,14 @@ function ExecuteJob() as void
|
||||
return
|
||||
end if
|
||||
|
||||
if StringUtils.IsNullOrEmpty(cpn)
|
||||
cpn = InnertubeService.CreateClientPlaybackNonce()
|
||||
end if
|
||||
|
||||
markedAsWatched = InnertubeService.AuthMarkVideoWatched(playbackTrackingUrls.videostatsPlaybackUrl, {
|
||||
accessToken: authToken.token
|
||||
onBehalfOfUser: authToken.activeIdentifyToken
|
||||
cpn: cpn
|
||||
cancellation: cancellation
|
||||
})
|
||||
if not markedAsWatched
|
||||
@@ -93,6 +99,7 @@ function ExecuteJob() as void
|
||||
success = InnertubeService.AuthMarkVideoWatchTime(watchTime, playbackTrackingUrls.videostatsWatchtimeUrl, {
|
||||
accessToken: authToken.token
|
||||
onBehalfOfUser: authToken.activeIdentifyToken
|
||||
cpn: cpn
|
||||
' TODO:P1 if we pass cancellation here, http client will remove scoped
|
||||
' observer, which is stored on the current node.
|
||||
' This requires an extra observer node to be independent.
|
||||
|
||||
@@ -61,7 +61,6 @@ function ExecuteJob() as void
|
||||
"visitorData": visitorData
|
||||
"accessToken": accessToken
|
||||
"onBehalfOfUser": onBehalfOfUser
|
||||
"signatureTimestamp": true
|
||||
})
|
||||
else
|
||||
metadata = service.GetVideoMetadata(contentNode.videoId, { cancellation: m.top.cancellation })
|
||||
|
||||
@@ -164,7 +164,12 @@ function PlayWithContent(contentNode as object)
|
||||
end if
|
||||
|
||||
StartVideoContentJob(videoContentNode)
|
||||
Lounge.SendNowPlayingLoading(contentNode.videoId)
|
||||
|
||||
playbackSpeed = ValidFloat(m.top.playbackSpeed)
|
||||
if playbackSpeed <= 0
|
||||
playbackSpeed = 1.0
|
||||
end if
|
||||
Lounge.SendNowPlayingLoading(contentNode.videoId, playbackSpeed)
|
||||
end function
|
||||
|
||||
function StartVideoContentJob(videoContentNode as object)
|
||||
@@ -226,7 +231,7 @@ function OnVideoContentJobDone(event as object) as void
|
||||
SeekToInitialPosition(content)
|
||||
|
||||
PlayAfterPreviousPlayerHasStopped()
|
||||
MarkVideoWatched(content.videoId, metadata.playbackTrackingUrls)
|
||||
MarkVideoWatched(content.videoId, metadata.playbackTrackingUrls, metadata.cpn)
|
||||
end function
|
||||
|
||||
function SeekToInitialPosition(content as object) as void
|
||||
@@ -329,6 +334,9 @@ function OnVideoContentJobErrorDialogResponse(event as object)
|
||||
shouldPlayNext = false
|
||||
if event <> invalid
|
||||
dialog = event.getRoSGNode()
|
||||
if m.errorDialog <> invalid and dialog.isSameNode(m.errorDialog)
|
||||
m.errorDialog = invalid
|
||||
end if
|
||||
dialog.unobserveFieldScoped("wasClosed")
|
||||
shouldPlayNext = dialog.actualButtonSelected = 0
|
||||
end if
|
||||
@@ -342,7 +350,7 @@ function OnVideoContentJobErrorDialogResponse(event as object)
|
||||
Lounge.SendOnStateChange()
|
||||
end function
|
||||
|
||||
function MarkVideoWatched(videoId as dynamic, playbackTrackingUrls as dynamic) as void
|
||||
function MarkVideoWatched(videoId as dynamic, playbackTrackingUrls as dynamic, cpn as dynamic) as void
|
||||
if StringUtils.IsNullOrEmpty(videoId)
|
||||
return
|
||||
end if
|
||||
@@ -365,6 +373,7 @@ function MarkVideoWatched(videoId as dynamic, playbackTrackingUrls as dynamic) a
|
||||
authToken: authToken
|
||||
profileType: profileType
|
||||
playbackTrackingUrls: playbackTrackingUrls
|
||||
cpn: cpn
|
||||
}
|
||||
|
||||
m.markVideoWatchedJob = JobSystem.CreateCallback()
|
||||
@@ -444,6 +453,14 @@ function OnVideoPlayerStateChange() as void
|
||||
' Reset isSeekingPosition when started to play the video
|
||||
if state = "playing"
|
||||
m.isSeekingPosition = false
|
||||
|
||||
' If we somehow was able to recover playback after an error dialog, close the dialog
|
||||
errorDialog = m.errorDialog
|
||||
if errorDialog <> invalid
|
||||
m.errorDialog = invalid
|
||||
errorDialog.unobserveFieldScoped("wasClosed")
|
||||
errorDialog.close = true
|
||||
end if
|
||||
end if
|
||||
|
||||
' If we successfully played the video, then any error that comes later is not due to a 403 (FORBIDDEN).
|
||||
@@ -520,6 +537,7 @@ function OnVideoPlayerStateChange() as void
|
||||
|
||||
dialog = DialogUtils.ShowTimedDialogButtons(errorData.body, errorData.title, buttons, 0, 10, true)
|
||||
if dialog <> invalid
|
||||
m.errorDialog = dialog
|
||||
dialog.observeFieldScoped("wasClosed", FuncName(OnVideoContentJobErrorDialogResponse))
|
||||
else
|
||||
OnVideoContentJobErrorDialogResponse(invalid)
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace Http
|
||||
|
||||
m.videoQueueNode = server.sceneNodes.videoQueue
|
||||
m.invidiousNode = server.sceneNodes.invidious
|
||||
m.preferencesNode = server.sceneNodes.preferences
|
||||
m.invidiousService = new Invidious.InvidiousService(m.invidiousNode)
|
||||
' No need to pass the invidious instance here, we will refresh it for
|
||||
' each request to make sure we are using the latest one
|
||||
@@ -51,6 +52,7 @@ namespace Http
|
||||
end if
|
||||
|
||||
m.dashManifest.invidiousInstance = m.invidiousService.GetInstance()
|
||||
m.dashManifest.disableAutoDubbed = ValidBool(m.preferencesNode["playback.disable_auto_dubbed"])
|
||||
|
||||
qualityFilter = m.CreateQualityFilter(quality)
|
||||
xmlContent = m.dashManifest.FromVideoMetadata(metadata, qualityFilter, ValidString(local) = "true")
|
||||
|
||||
+53
-98
@@ -56,17 +56,13 @@ namespace Http
|
||||
request = context.request
|
||||
response = context.response
|
||||
|
||||
accessToken = request.headers["authorization"]
|
||||
if StringUtils.IsNullOrEmpty(accessToken) or not accessToken.StartsWith("Bearer ")
|
||||
response.Json({
|
||||
"error": "Missing or invalid 'Authorization' header"
|
||||
})
|
||||
response.http_code = 403
|
||||
accessToken = m.RequireAccessToken(request, response)
|
||||
if accessToken = invalid
|
||||
return true
|
||||
end if
|
||||
|
||||
options = {
|
||||
"accessToken": accessToken.Mid("Bearer ".Len())
|
||||
"accessToken": accessToken
|
||||
"disableShorts": m.preferences["content_feed.disable_shorts"]
|
||||
}
|
||||
|
||||
@@ -117,12 +113,8 @@ namespace Http
|
||||
request = context.request
|
||||
response = context.response
|
||||
|
||||
accessToken = request.headers["authorization"]
|
||||
if StringUtils.IsNullOrEmpty(accessToken) or not accessToken.StartsWith("Bearer ")
|
||||
response.Json({
|
||||
"error": "Missing or invalid 'Authorization' header"
|
||||
})
|
||||
response.http_code = 403
|
||||
accessToken = m.RequireAccessToken(request, response)
|
||||
if accessToken = invalid
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -135,17 +127,13 @@ namespace Http
|
||||
request = context.request
|
||||
response = context.response
|
||||
|
||||
accessToken = request.headers["authorization"]
|
||||
if StringUtils.IsNullOrEmpty(accessToken) or not accessToken.StartsWith("Bearer ")
|
||||
response.Json({
|
||||
"error": "Missing or invalid 'Authorization' header"
|
||||
})
|
||||
response.http_code = 403
|
||||
accessToken = m.RequireAccessToken(request, response)
|
||||
if accessToken = invalid
|
||||
return true
|
||||
end if
|
||||
|
||||
options = {
|
||||
"accessToken": accessToken.Mid("Bearer ".Len())
|
||||
"accessToken": accessToken
|
||||
}
|
||||
|
||||
activeIdentifyToken = request.query.activeIdentifyToken
|
||||
@@ -187,17 +175,13 @@ namespace Http
|
||||
request = context.request
|
||||
response = context.response
|
||||
|
||||
accessToken = request.headers["authorization"]
|
||||
if StringUtils.IsNullOrEmpty(accessToken) or not accessToken.StartsWith("Bearer ")
|
||||
response.Json({
|
||||
"error": "Missing or invalid 'Authorization' header"
|
||||
})
|
||||
response.http_code = 403
|
||||
accessToken = m.RequireAccessToken(request, response)
|
||||
if accessToken = invalid
|
||||
return true
|
||||
end if
|
||||
|
||||
options = {
|
||||
"accessToken": accessToken.Mid("Bearer ".Len())
|
||||
"accessToken": accessToken
|
||||
}
|
||||
|
||||
activeIdentifyToken = request.query.activeIdentifyToken
|
||||
@@ -253,9 +237,8 @@ namespace Http
|
||||
return true
|
||||
end function
|
||||
|
||||
@get("/playlet-invidious-backend/api/v1/trending")
|
||||
@get("/playlet-invidious-backend/api/v1/popular")
|
||||
function GetTrending(context as object) as boolean
|
||||
function GetPopular(context as object) as boolean
|
||||
request = context.request
|
||||
response = context.response
|
||||
|
||||
@@ -264,40 +247,10 @@ namespace Http
|
||||
return m.GetAuthRecommended(context)
|
||||
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({
|
||||
"error": "Failed to get trending feed"
|
||||
})
|
||||
response.http_code = 500
|
||||
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
|
||||
|
||||
response.Json({
|
||||
"error": "Playlet built-in Invidious backend does not support popular videos."
|
||||
})
|
||||
response.http_code = 400
|
||||
return true
|
||||
end function
|
||||
|
||||
@@ -305,17 +258,13 @@ namespace Http
|
||||
request = context.request
|
||||
response = context.response
|
||||
|
||||
accessToken = request.headers["authorization"]
|
||||
if StringUtils.IsNullOrEmpty(accessToken) or not accessToken.StartsWith("Bearer ")
|
||||
response.Json({
|
||||
"error": "Missing or invalid 'Authorization' header"
|
||||
})
|
||||
response.http_code = 403
|
||||
accessToken = m.RequireAccessToken(request, response)
|
||||
if accessToken = invalid
|
||||
return true
|
||||
end if
|
||||
|
||||
options = {
|
||||
"accessToken": accessToken.Mid("Bearer ".Len())
|
||||
"accessToken": accessToken
|
||||
"disableShorts": m.preferences["content_feed.disable_shorts"]
|
||||
}
|
||||
|
||||
@@ -346,10 +295,6 @@ namespace Http
|
||||
|
||||
response.Json(result.feeds[0])
|
||||
|
||||
if result.DoesExist("cache-control")
|
||||
response.headers["cache-control"] = result["cache-control"]
|
||||
end if
|
||||
|
||||
return true
|
||||
end function
|
||||
|
||||
@@ -619,7 +564,6 @@ namespace Http
|
||||
}
|
||||
end if
|
||||
else
|
||||
options["signatureTimestamp"] = true
|
||||
options["credentialTransferToken"] = m.loungeService.credentialTransferToken
|
||||
metadata = InnertubeService.GetVideoMetadata(videoId, options)
|
||||
end if
|
||||
@@ -660,9 +604,9 @@ namespace Http
|
||||
raw: raw
|
||||
}
|
||||
|
||||
accessToken = request.headers["authorization"]
|
||||
if not StringUtils.IsNullOrEmpty(accessToken) and accessToken.StartsWith("Bearer ")
|
||||
options["accessToken"] = accessToken.Mid("Bearer ".Len())
|
||||
accessToken = m.GetAccessToken(request)
|
||||
if accessToken <> invalid
|
||||
options["accessToken"] = accessToken
|
||||
|
||||
activeIdentifyToken = request.query.activeIdentifyToken
|
||||
if not StringUtils.IsNullOrEmpty(activeIdentifyToken)
|
||||
@@ -728,12 +672,8 @@ namespace Http
|
||||
response = context.response
|
||||
route = request.route
|
||||
|
||||
accessToken = request.headers["authorization"]
|
||||
if StringUtils.IsNullOrEmpty(accessToken) or not accessToken.StartsWith("Bearer ")
|
||||
response.Json({
|
||||
"error": "Missing or invalid 'Authorization' header"
|
||||
})
|
||||
response.http_code = 403
|
||||
accessToken = m.RequireAccessToken(request, response)
|
||||
if accessToken = invalid
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -886,12 +826,8 @@ namespace Http
|
||||
response = context.response
|
||||
route = request.route
|
||||
|
||||
accessToken = request.headers["authorization"]
|
||||
if StringUtils.IsNullOrEmpty(accessToken) or not accessToken.StartsWith("Bearer ")
|
||||
response.Json({
|
||||
"error": "Missing or invalid 'Authorization' header"
|
||||
})
|
||||
response.http_code = 403
|
||||
accessToken = m.RequireAccessToken(request, response)
|
||||
if accessToken = invalid
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -909,7 +845,7 @@ namespace Http
|
||||
end if
|
||||
|
||||
options = {
|
||||
"accessToken": accessToken.Mid("Bearer ".Len())
|
||||
"accessToken": accessToken
|
||||
}
|
||||
|
||||
activeIdentifyToken = request.query.activeIdentifyToken
|
||||
@@ -946,12 +882,8 @@ namespace Http
|
||||
response = context.response
|
||||
route = request.route
|
||||
|
||||
accessToken = request.headers["authorization"]
|
||||
if StringUtils.IsNullOrEmpty(accessToken) or not accessToken.StartsWith("Bearer ")
|
||||
response.Json({
|
||||
"error": "Missing or invalid 'Authorization' header"
|
||||
})
|
||||
response.http_code = 403
|
||||
accessToken = m.RequireAccessToken(request, response)
|
||||
if accessToken = invalid
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -969,7 +901,7 @@ namespace Http
|
||||
end if
|
||||
|
||||
options = {
|
||||
"accessToken": accessToken.Mid("Bearer ".Len())
|
||||
"accessToken": accessToken
|
||||
}
|
||||
|
||||
activeIdentifyToken = request.query.activeIdentifyToken
|
||||
@@ -1049,6 +981,29 @@ namespace Http
|
||||
return true
|
||||
end function
|
||||
|
||||
|
||||
function GetAccessToken(request as object) as dynamic
|
||||
accessToken = request.headers["authorization"]
|
||||
if StringUtils.IsNullOrEmpty(accessToken) or not accessToken.StartsWith("Bearer ")
|
||||
return invalid
|
||||
end if
|
||||
|
||||
return accessToken.Mid("Bearer ".Len())
|
||||
end function
|
||||
|
||||
function RequireAccessToken(request as object, response as object) as dynamic
|
||||
accessToken = m.GetAccessToken(request)
|
||||
if accessToken = invalid
|
||||
response.Json({
|
||||
"error": "Missing or invalid 'Authorization' header. Please login again."
|
||||
})
|
||||
response.http_code = 403
|
||||
return invalid
|
||||
end if
|
||||
|
||||
return accessToken
|
||||
end function
|
||||
|
||||
end class
|
||||
|
||||
end namespace
|
||||
@@ -83,10 +83,10 @@ namespace Web
|
||||
for i = 7 to 0 step -1
|
||||
m.payload_size_buffer[i] = payloadSize and &hFF
|
||||
payloadSize = payloadSize >> 8
|
||||
next
|
||||
end for
|
||||
for i = 0 to 7
|
||||
m.WriteByte(m.payload_size_buffer[i])
|
||||
next
|
||||
end for
|
||||
end if
|
||||
end function
|
||||
|
||||
|
||||
@@ -14,44 +14,6 @@
|
||||
apiType: Invidious
|
||||
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
|
||||
id: popular
|
||||
feedSources:
|
||||
|
||||
@@ -1,17 +1,3 @@
|
||||
trending:
|
||||
title: Trending
|
||||
url: /api/v1/trending
|
||||
cacheSeconds: 21600 # 6 hours
|
||||
queryParams:
|
||||
type:
|
||||
type:
|
||||
- Music
|
||||
- Gaming
|
||||
- Movies
|
||||
region:
|
||||
type: "#ISO3166"
|
||||
default: GetUserCountryCode
|
||||
|
||||
popular:
|
||||
title: Popular
|
||||
url: /api/v1/popular
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
visibility: "web",
|
||||
svelteComponent: "EditQualityControl",
|
||||
},
|
||||
{
|
||||
displayText: "Disable auto-dubbed audio",
|
||||
key: "playback.disable_auto_dubbed",
|
||||
description: "Remove AI-generated dubbed audio tracks.",
|
||||
type: "boolean",
|
||||
defaultValue: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -243,22 +250,6 @@
|
||||
id: "recommended",
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
id: "trending",
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
id: "trending_music",
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
id: "trending_gaming",
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
id: "trending_movies",
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
id: "popular",
|
||||
enabled: true,
|
||||
|
||||
@@ -312,22 +312,6 @@
|
||||
<source>Watch history</source>
|
||||
<translation>Wiedergabeverlauf</translation>
|
||||
</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>
|
||||
<source>Popular</source>
|
||||
<translation>Populär</translation>
|
||||
|
||||
@@ -88,22 +88,6 @@
|
||||
<source>Watch history</source>
|
||||
<translation>Watch history</translation>
|
||||
</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>
|
||||
<source>Popular</source>
|
||||
<translation>Popular</translation>
|
||||
@@ -816,6 +800,14 @@
|
||||
<source>Feed preferences</source>
|
||||
<translation>Feed preferences</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Disable auto-dubbed audio</source>
|
||||
<translation>Disable auto-dubbed audio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remove AI-generated dubbed audio tracks.</source>
|
||||
<translation>Remove AI-generated dubbed audio tracks.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Disable Shorts</source>
|
||||
<translation>Disable Shorts</translation>
|
||||
|
||||
@@ -80,22 +80,6 @@
|
||||
<source>Watch history</source>
|
||||
<translation>Ver el historial</translation>
|
||||
</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>
|
||||
<source>Popular</source>
|
||||
<translation>Popular</translation>
|
||||
|
||||
@@ -36,10 +36,6 @@
|
||||
<source>Filters</source>
|
||||
<translation>Filtros</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trending - Music</source>
|
||||
<translation>Tendencias - Música</translation>
|
||||
</message>
|
||||
<message>
|
||||
<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>
|
||||
@@ -80,18 +76,6 @@
|
||||
<source>Watch history</source>
|
||||
<translation>Historial de reproducción</translation>
|
||||
</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>
|
||||
<source>Edit</source>
|
||||
<translation>Editar</translation>
|
||||
|
||||
@@ -76,22 +76,6 @@
|
||||
<source>Watch history</source>
|
||||
<translation>Historique</translation>
|
||||
</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>
|
||||
<source>Popular</source>
|
||||
<translation>Populaire</translation>
|
||||
|
||||
@@ -140,22 +140,6 @@
|
||||
<source>Watch history</source>
|
||||
<translation>Histórico de assistidos</translation>
|
||||
</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>
|
||||
<source>Popular</source>
|
||||
<translation>Popular</translation>
|
||||
|
||||
@@ -2,8 +2,8 @@ title=PlayletLib
|
||||
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=44
|
||||
build_version=00003
|
||||
minor_version=45
|
||||
build_version=00000
|
||||
|
||||
ui_resolutions=hd
|
||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
namespace DebugUtils
|
||||
function PrintStackTrace(message = invalid as dynamic)
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
namespace DebugUtils
|
||||
function PrintStackTrace(message = invalid as dynamic)
|
||||
|
||||
try
|
||||
throw "Handled throw in DebugUtils.PrintStackTrace()"
|
||||
catch error
|
||||
@@ -15,11 +16,9 @@ namespace DebugUtils
|
||||
end for
|
||||
PrintInABox(lines)
|
||||
end try
|
||||
#end if
|
||||
end function
|
||||
end function
|
||||
|
||||
function PrintInABox(lines as object)
|
||||
#if DEBUG
|
||||
function PrintInABox(lines as object)
|
||||
maxLen = 0
|
||||
for each line in lines
|
||||
if line.len() > maxLen
|
||||
@@ -32,6 +31,6 @@ namespace DebugUtils
|
||||
end for
|
||||
out += `\n` + "╚" + string(maxLen + 2, "═") + "╝"
|
||||
print out
|
||||
#end if
|
||||
end function
|
||||
end namespace
|
||||
end function
|
||||
end namespace
|
||||
#end if
|
||||
@@ -26,14 +26,14 @@ function DisposeObservers()
|
||||
if m._disposableObserveFields <> invalid
|
||||
for each item in m._disposableObserveFields
|
||||
item.node.UnobserveField(item.field)
|
||||
next
|
||||
end for
|
||||
m._disposableObserveFields = invalid
|
||||
end if
|
||||
|
||||
if m._disposableObserveFieldsScoped <> invalid
|
||||
for each item in m._disposableObserveFieldsScoped
|
||||
item.node.UnobserveFieldScoped(item.field)
|
||||
next
|
||||
end for
|
||||
m._disposableObserveFieldsScoped = invalid
|
||||
end if
|
||||
end function
|
||||
@@ -41,10 +41,6 @@ namespace Locale
|
||||
Recommended = "Recommended"
|
||||
Playlists = "Playlists"
|
||||
WatchHistory = "Watch history"
|
||||
Trending = "Trending"
|
||||
TrendingMovies = "Trending - Movies"
|
||||
TrendingMusic = "Trending - Music"
|
||||
TrendingGaming = "Trending - Gaming"
|
||||
Popular = "Popular"
|
||||
Videos = "Videos"
|
||||
Shorts = "Shorts"
|
||||
@@ -257,6 +253,9 @@ namespace Locale
|
||||
PreferredQualityDescription = "Preferred video quality"
|
||||
AutoQuality = "Auto"
|
||||
|
||||
DisableAutoDubbedAudio = "Disable auto-dubbed audio"
|
||||
DisableAutoDubbedAudioDescription = "Remove AI-generated dubbed audio tracks."
|
||||
|
||||
Backend = "Backend"
|
||||
BackendPreferences = "Backend preferences"
|
||||
SelectedBackend = "Selected backend"
|
||||
|
||||
Generated
+1332
-1664
File diff suppressed because it is too large.
Load diff
+17
-18
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-web",
|
||||
"version": "0.44.3",
|
||||
"version": "0.45.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -9,29 +9,28 @@
|
||||
"lint": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
||||
"@tailwindcss/postcss": "^4.1.17",
|
||||
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
||||
"@tailwindcss/postcss": "^4.3.0",
|
||||
"@tailwindcss/typography": "^0.5.19",
|
||||
"@tsconfig/svelte": "^5.0.5",
|
||||
"@vitejs/plugin-legacy": "^7.2.1",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"@tsconfig/svelte": "^5.0.8",
|
||||
"@vitejs/plugin-legacy": "^8.0.2",
|
||||
"autoprefixer": "^10.5.0",
|
||||
"bgutils-js": "^3.2.0",
|
||||
"daisyui": "^5.4.7",
|
||||
"dotenv": "^17.2.3",
|
||||
"daisyui": "^5.5.20",
|
||||
"dotenv": "^17.4.2",
|
||||
"ip": "^2.0.1",
|
||||
"jszip": "^3.10.1",
|
||||
"postcss": "^8.5.6",
|
||||
"rollup-plugin-visualizer": "^6.0.5",
|
||||
"svelte": "^5.43.4",
|
||||
"svelte-check": "^4.3.3",
|
||||
"svelte-preprocess": "^6.0.3",
|
||||
"tailwindcss": "^4.1.17",
|
||||
"terser": "^5.44.1",
|
||||
"postcss": "^8.5.15",
|
||||
"rollup-plugin-visualizer": "^7.0.1",
|
||||
"svelte": "^5.55.9",
|
||||
"svelte-check": "^4.4.8",
|
||||
"svelte-preprocess": "6.0.3",
|
||||
"tailwindcss": "^4.3.0",
|
||||
"terser": "^5.48.0",
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^7.2.2",
|
||||
"vite": "^8.0.14",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-tsconfig-paths": "^5.1.4",
|
||||
"youtubei.js": "^16.0.1"
|
||||
"youtubei.js": "^17.0.1"
|
||||
}
|
||||
}
|
||||
@@ -141,20 +141,8 @@ export class YoutubeJs {
|
||||
|
||||
static initJsEvaluator() {
|
||||
Platform.shim.eval = async (data: Types.BuildScriptResult, env: Record<string, Types.VMPrimative>) => {
|
||||
const properties = [];
|
||||
|
||||
if (env.n) {
|
||||
properties.push(`n: exportedVars.nFunction("${env.n}")`)
|
||||
}
|
||||
|
||||
if (env.sig) {
|
||||
properties.push(`sig: exportedVars.sigFunction("${env.sig}")`)
|
||||
}
|
||||
|
||||
const code = `${data.output}\nreturn { ${properties.join(', ')} }`;
|
||||
|
||||
return new Function(code)();
|
||||
}
|
||||
return new Function(data.output)();
|
||||
};
|
||||
}
|
||||
|
||||
static async generateVisitorData() {
|
||||
@@ -255,6 +243,10 @@ export class YoutubeJs {
|
||||
po_token: await YoutubeJs.generatePoToken(videoId),
|
||||
});
|
||||
|
||||
if (info.playability_status.status !== 'OK') {
|
||||
throw new Error(`Video is not playable: ${info.playability_status.status}\nReason: ${info.playability_status.reason}`);
|
||||
}
|
||||
|
||||
// We can't generate a proper dash from live videos.
|
||||
// By returning null, we're telling Playlet to fetch video info itself.
|
||||
if (info.basic_info.is_live) {
|
||||
@@ -320,12 +312,16 @@ export class YoutubeJs {
|
||||
init: format.init_range ? `${format.init_range.start}-${format.init_range.end}` : "",
|
||||
index: format.index_range ? `${format.index_range.start}-${format.index_range.end}` : "",
|
||||
bitrate: `${format.bitrate}`,
|
||||
url: await format.decipher(YoutubeJs.innerTube.session.player),
|
||||
itag: `${format.itag}`,
|
||||
type: format.mime_type,
|
||||
clen: `${format.approx_duration_ms}`,
|
||||
lmt: `${format.last_modified}`,
|
||||
};
|
||||
|
||||
if (format.url || format.signature_cipher || format.cipher) {
|
||||
result.url = await format.decipher(YoutubeJs.innerTube.session.player);
|
||||
}
|
||||
|
||||
if (format.audio_quality) {
|
||||
result.audioQuality = format.audio_quality;
|
||||
}
|
||||
|
||||
@@ -49,28 +49,43 @@
|
||||
});
|
||||
|
||||
async function playOnTv() {
|
||||
const videoInfo = getVideoInfo();
|
||||
await PlayletApi.playVideo(videoInfo);
|
||||
try {
|
||||
const videoInfo = getVideoInfo();
|
||||
await PlayletApi.playVideo(videoInfo);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
alert(error);
|
||||
}
|
||||
}
|
||||
|
||||
async function playOnTvYtjs() {
|
||||
const videoInfo = getVideoInfo() as any;
|
||||
try {
|
||||
const videoInfo = getVideoInfo() as any;
|
||||
|
||||
// measure length of time it takes to get video info
|
||||
const start = performance.now();
|
||||
const metadata = await YoutubeJs.getVideoInfo(videoId);
|
||||
const end = performance.now();
|
||||
console.log(`Time to get video info: ${end - start}ms`);
|
||||
// measure length of time it takes to get video info
|
||||
const start = performance.now();
|
||||
const metadata = await YoutubeJs.getVideoInfo(videoId);
|
||||
const end = performance.now();
|
||||
console.log(`Time to get video info: ${end - start}ms`);
|
||||
|
||||
if (metadata) {
|
||||
videoInfo.metadata = metadata;
|
||||
if (metadata) {
|
||||
videoInfo.metadata = metadata;
|
||||
}
|
||||
await PlayletApi.playVideo(videoInfo);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
alert(error);
|
||||
}
|
||||
await PlayletApi.playVideo(videoInfo);
|
||||
}
|
||||
|
||||
async function queueOnTv() {
|
||||
const videoInfo = getVideoInfo();
|
||||
await PlayletApi.queueVideo(videoInfo);
|
||||
try {
|
||||
const videoInfo = getVideoInfo();
|
||||
await PlayletApi.queueVideo(videoInfo);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
alert(error);
|
||||
}
|
||||
}
|
||||
|
||||
function openInvidious() {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node"
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext"
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
"include": [
|
||||
"vite.config.ts"
|
||||
]
|
||||
}
|
||||
@@ -2,7 +2,6 @@ import { visualizer } from 'rollup-plugin-visualizer';
|
||||
import { defineConfig, UserConfig } from 'vite'
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
||||
import viteCompression from 'vite-plugin-compression';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths'
|
||||
import ip from 'ip';
|
||||
import { existsSync, readFileSync } from 'fs'
|
||||
import { join as joinPath } from 'path'
|
||||
@@ -13,7 +12,6 @@ const PORT = 5173
|
||||
|
||||
const config: UserConfig = {
|
||||
plugins: [
|
||||
tsconfigPaths(),
|
||||
svelte(),
|
||||
legacy({
|
||||
targets: ['defaults', 'not IE 11'],
|
||||
@@ -23,6 +21,9 @@ const config: UserConfig = {
|
||||
deleteOriginFile: true
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
tsconfigPaths: true
|
||||
},
|
||||
build: {
|
||||
outDir: "../playlet-lib/src/www",
|
||||
emptyOutDir: true
|
||||
|
||||
@@ -260,7 +260,7 @@ end function`;
|
||||
bsfmtPath: bsfmtPath
|
||||
});
|
||||
|
||||
return new Formatter(options);
|
||||
return new Formatter(options ?? undefined);
|
||||
}
|
||||
|
||||
getCurrentFileHash() {
|
||||
|
||||
@@ -44,6 +44,9 @@ export class ValidationPlugin implements CompilerPlugin {
|
||||
|
||||
this.validation.forEach((validation) => {
|
||||
const regex = validation.regexObject;
|
||||
if (!regex) {
|
||||
return;
|
||||
}
|
||||
const fileContents = file.fileContents;
|
||||
|
||||
let match: RegExpExecArray | null;
|
||||
|
||||
@@ -15,6 +15,6 @@ INVIDIOUS_HMAC_KEY=PASSWORD_1
|
||||
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.
|
||||
@@ -32,7 +32,7 @@ services:
|
||||
# Use the key generated in the 2nd step
|
||||
hmac_key: $INVIDIOUS_HMAC_KEY
|
||||
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
|
||||
timeout: 5s
|
||||
retries: 2
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES6",
|
||||
"moduleResolution": "Node",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user