Compare commits

..
34 Commits
Author SHA1 Message Date
Brahim Hadricheandgithub-action linter a0efb3bd76 Release v0.25.6 (#456)
* Release v0.25.6

* Lint fix

---------

Co-authored-by: github-action linter <githubaction@githubaction.com>
2024-09-11 22:13:05 -04:00
Brahim Hadriche 026a1d49d9 add announcement back 2024-09-11 22:09:53 -04:00
Brahim Hadriche 2dc52cca04 [skip ci] fix for stats 2024-09-10 19:11:53 -04:00
Brahim Hadriche 5d100fb6eb update dependencies (#455) 2024-09-09 21:56:36 -04:00
Brahim Hadriche 8cd3264766 Support for parsing playlist urls in web app 2024-09-06 16:17:43 -04:00
Brahim Hadriche 46c7f3ebf6 Release v0.25.5 (#454) 2024-09-06 12:23:49 -04:00
Brahim Hadriche f4ebb9068a transpiled file 2024-09-06 12:17:15 -04:00
Brahim Hadriche d43d807f11 Removed announcement 2024-09-06 12:15:03 -04:00
Brahim Hadriche d41d4d990b update dependencies (#452) 2024-09-02 20:14:01 -04:00
Brahim Hadriche 20faa017fd Fix bug where channel view infinitely tries to load a Topic channel 2024-08-24 19:01:39 -04:00
Brahim Hadriche e7234c38cd [chore] update dependencies (#448)
* update dependencies

* changelog
2024-08-24 10:08:46 -04:00
Brahim Hadriche 77314aaf30 Release v0.25.4 (#447) 2024-08-24 09:58:42 -04:00
Brahim Hadriche 432f87ca52 Fix crash related to web server 2024-08-24 09:13:55 -04:00
Brahim Hadriche e0338a5c05 Fix rare crash related to NavBar 2024-08-24 09:03:24 -04:00
Brahim Hadriche 2c46319b31 [skip ci] Update README.md 2024-08-17 13:12:19 -04:00
Brahim Hadriche 43bce072da [skip ci] Update README.md 2024-08-17 13:08:04 -04:00
Brahim Hadriche b6bd3b52a6 [skip ci] lounge field 2024-08-17 12:40:46 -04:00
Brahim Hadriche b464c40f20 changelog 2024-08-17 11:18:38 -04:00
10b82159d5 Translations update from Hosted Weblate (#442)
* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (318 of 318 strings)

Translation: Playlet/Playlet
Translate-URL: https://hosted.weblate.org/projects/playlet/playlet/pt_BR/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (318 of 318 strings)

Translation: Playlet/Playlet
Translate-URL: https://hosted.weblate.org/projects/playlet/playlet/pt_BR/

---------

Co-authored-by: davbrasan <davidbrazps2@gmail.com>
Co-authored-by: Brahim Hadriche <brahim.hadriche@gmail.com>
2024-08-17 11:18:09 -04:00
Brahim Hadriche cb9cdb8112 update dependencies (#441) 2024-08-16 22:31:53 -04:00
Brahim Hadriche 6eedeb375b [skip ci] Update README.md 2024-08-16 18:25:43 -04:00
Brahim Hadriche dc5913883b changelog 2024-08-15 11:06:28 -04:00
Weblate (bot)anddavbrasan 0c386cda02 Translated using Weblate (Portuguese (Brazil)) (#440)
Currently translated at 18.8% (60 of 318 strings)

Translation: Playlet/Playlet
Translate-URL: https://hosted.weblate.org/projects/playlet/playlet/pt_BR/

Co-authored-by: davbrasan <davidbrazps2@gmail.com>
2024-08-15 11:06:09 -04:00
Brahim Hadriche feebf2b229 Release v0.25.3 (#439) 2024-08-13 20:58:02 -04:00
Brahim Hadriche 7d6f7f6314 added uri_resolution_autosub to manifest (needed to fix 720p UI) 2024-08-13 20:48:30 -04:00
Brahim Hadriche 088377fd82 Fix a bug where the web app qrcode doesn't show up 2024-08-11 17:11:03 -04:00
Brahim Hadriche 825b9e567b [chore] update dependencies (#438)
* update dependencies

* docs fix
2024-08-10 13:35:36 -04:00
Brahim Hadriche 585ab135ea Release v0.25.2 (#436) 2024-08-05 18:42:06 -04:00
Brahim Hadriche a42210ddfc Add announcement 2024-08-05 18:36:16 -04:00
Brahim Hadriche 6683392a78 Fix a rare crash in DIAL server 2024-08-05 18:14:39 -04:00
Brahim Hadriche b33136360d Adjust logging level on web server events 2024-08-04 18:23:52 -04:00
Brahim Hadriche 4af500bec0 [opt] large textures loading 2024-08-04 18:17:32 -04:00
Brahim Hadriche d967fa11bb [skip ci] docs 2024-08-03 22:53:15 -04:00
Brahim Hadriche 767f5250c9 [skip ci] docs 2024-08-03 22:51:25 -04:00
33 changed files with 2366 additions and 958 deletions

No files matched your search

+46
View File
@@ -5,6 +5,52 @@ 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.25.6] - 2024-09-12
### Added
- Support for parsing playlist urls in web app (`https://www.youtube.com/playlist?list=ID`)
- Back the announcement for the `This helps protect our community` error message
## [0.25.5] - 2024-09-06
### Fixed
- A bug where channel view infinitely tries to load a `Topic` channel
### Changed
- Removed announcement
## [0.25.4] - 2024-08-24
### Added
- Portuguese (Brazil) translations (Thanks to davbrasan)
### Fixed
- Rare crash related to NavBar
- Crash related to web server
## [0.25.3] - 2024-08-14
### Fixed
- a bug where the web app qrcode doesn't show up
- added `uri_resolution_autosub` to manifest (needed to fix 720p UI)
## [0.25.2] - 2024-08-05
### Added
- An announcement for the `This helps protect our community` error message
### Fixed
- Few optimizations with texture loading to improve memory usage
- A rare crash in DIAL server
## [0.25.1] - 2024-08-03
### Added
+4 -2
View File
@@ -15,7 +15,7 @@
<a href="/LICENSE">
<img alt="AGPL-3.0 license" src="https://img.shields.io/github/license/iBicha/playlet.svg"/>
</a>
<a href="https://channelstore.roku.com/en-ca/details/840aec36f51bfe6d96cf6db9055a372a/playlet">
<a href="https://channelstore.roku.com/details/840aec36f51bfe6d96cf6db9055a372a/playlet">
<img alt="Roku Channel Store" src="https://img.shields.io/badge/Roku%20Store-Install-blueviolet?logo=roku&logoColor=blueviolet&labelColor=white"/>
</a>
<a href="https://github.com/iBicha/playlet/wiki">
@@ -40,7 +40,9 @@ More under [Screenshots](./docs/screenshots/README.md)
## Installation
[Playlet on Roku channel store](https://channelstore.roku.com/en-ca/details/840aec36f51bfe6d96cf6db9055a372a/playlet)
[Playlet on Roku channel store](https://channelstore.roku.com/details/840aec36f51bfe6d96cf6db9055a372a/playlet)
Note: sometimes a bug in Roku channel store redirects to a random app instead of Playlet. If this happens to you, you can install Playlet from your Roku TV directly, by searching "Playlet" in the store.
## Features
+12 -6
View File
@@ -26,7 +26,8 @@ This document contains various kinds of information related to Playlet developme
- [Playlet Web App](#playlet-web-app)
- [Svelte development](#svelte-development)
- [Tailwind/Daisy UI](#tailwinddaisy-ui)
- [API calls (proxy authenticated)](#api-calls-proxy-authenticated)
- [API calls](#api-calls)
- [API calls (proxy authenticated)](#api-calls-proxy-authenticated)
- [Developer settings](#developer-settings)
- [In case of a softlock](#in-case-of-a-softlock)
- [CI/CD](#cicd)
@@ -144,7 +145,7 @@ There are a few reasons we made this separation:
- Playlet relies on [Invidious](https://github.com/iv-org/invidious). Invidious tries to keep up with YouTube making changes to their platform, but sometimes, a breaking change happens that requires Playlet to react quickly. Releasing through the Roku Channel store can take days, or a week. During this time, Playlet would be not functional, and that's not acceptable.
- The ability to roll back: Sometimes an app breaking bug gets released. Allowing users to choose a seperate version is a flexible way to keep things working. For example, it's possible to choose a different verrsion from the developer settings in the web app.
- It is simply easier to release: Releasing Playlet Lib on Github, and everyone receives the latest version immediately, is very conveninct and less of a hassle, than going through the Roku Channel store.
- It is simply easier to release: Releasing Playlet Lib on Github, and everyone receives the latest version immediately, is very convenient and less of a hassle, than going through the Roku Channel store.
- I've had instances where I was trying to pass the certfication for Playlet to publish it. One of the criterias is to pass a some automated tests. But the tests were failing because their system could not connect to their Roku test devices (connection keeps timing out). My only option was to keep trying over and over until it worked.
- It might sound that Playlet Lib is just a workaround for the Roku Channel release process. But phrased differently, Roku Channel release process is not good enough of what we need for Playlet.
- Canary builds: The latest version of Playlet can be tested as soon as it lands in the main branch. This is a great way to test newer features in production, without affecting the stability of the released version. Roku has the concept of "beta" channels, but they are more cumbersome.
@@ -181,7 +182,8 @@ These are useful to see if the files and caching are working as expected.
### Releases from Github
Since Component Libraries are simply zip files hosted at some https endpoint, Github releases are used to host and deliver Playet Lib to users. By default, Playlet grabs `https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip` and loads it, but this can be pointed to somewhere else, if for some reason the Github repository becomes unavailable.
Since Component Libraries are simply zip/squashfs files hosted at some HTTPS endpoint, Github releases are used to host and deliver Playet Lib to users. By default, Playlet grabs `https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.squashfs.pkg` and loads it, but this can be pointed to somewhere else, if for some reason the Github repository becomes unavailable.
Squashfs files are faster to load, but they require signing. Zip files can be used without signing if they are served from an HTTPS endpoint.
### Dev library hosted by VS Code Extension
@@ -272,7 +274,11 @@ For debugging, choose the compound target `Playlet Web (Debug)`.
The Playlet web app uses [Tailwind CSS](https://tailwindcss.com/) as its base styling library. Additionally, it uses [DaisyUI](https://daisyui.com/) as it offers a versatile set of components, and has built-in supports for themes.
### API calls (proxy authenticated)
### API calls
The Playlet web app communicates with the Playlet Roku app using web APIs. Most of the APIs used are described in the OpenAPI spec [playlet-web-api.yml](./playlet-web-api.yml). The web app also uses Invidious apis documented at [https://docs.invidious.io/api](https://docs.invidious.io/api)
#### API calls (proxy authenticated)
When making authenticated calls to Invidious (for example to fetch the user Subscription feed) the Bearer token is needed.
@@ -286,9 +292,9 @@ For API calls that don't require authentication, the web app fetches data from I
### Developer settings
The developer settings are only visible through the web app. They are found at the buttom of the settings page.
The developer settings are found at the buttom of the settings page.
For now, it allows you to point to a different Github release other than the default `latest`.
One setting that is only available in the web app is `Playlet Library version`. It allows you to point to a different Github release other than the default `latest`.
This is mostly useful to QA the `canary` release (see [Canary release](https://en.wikipedia.org/wiki/Feature_toggle#Canary_release)) in a "production" setting before making it available to all users as the official "latest" version.
+1 -1
View File
@@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: Playlet Web API
version: 0.25.1
version: 0.25.6
description:
Playlet Web API is a RESTful API for controlling the Playlet app on
Roku devices. The API is intended to be used by the Playlet web app, but can
+24 -22
View File
@@ -1,21 +1,21 @@
{
"name": "playlet",
"version": "0.25.1",
"version": "0.25.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "playlet",
"version": "0.25.1",
"version": "0.25.6",
"hasInstallScript": true,
"devDependencies": {
"@rokucommunity/bslint": "^0.8.22",
"@rokucommunity/bslint": "^0.8.24",
"@types/crypto-js": "^4.2.2",
"@types/fs-extra": "^11.0.4",
"@types/node": "^22.1.0",
"@types/node": "^22.5.4",
"@types/xml2js": "^0.4.14",
"argparse": "^2.0.1",
"brighterscript": "0.67.5",
"brighterscript": "0.67.6",
"brighterscript-formatter": "^1.7.4",
"convert-svg-to-png": "^0.6.4",
"cross-fetch": "^4.0.0",
@@ -36,7 +36,7 @@
"ts-node": "^10.9.2",
"typescript": "^5.5.4",
"xml2js": "^0.6.2",
"yaml": "^2.5.0"
"yaml": "^2.5.1"
},
"engines": {
"node": "20"
@@ -289,10 +289,11 @@
"dev": true
},
"node_modules/@rokucommunity/bslint": {
"version": "0.8.22",
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.22.tgz",
"integrity": "sha512-ulHGouWoIUuJ7lMRpTGWGjM9lcI/9tfas4hrXifDePZfga65DsBvnDh1aLgHp79X1SUtpV/QpWR3ymKCwlG0Yw==",
"version": "0.8.24",
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.24.tgz",
"integrity": "sha512-1EbA6VeW3QC2QQ/Tqf9qTTcCdZ2ZP9q7H9ZvkeN9gzWYiXFSpJo9AnS41LzEsjRKUtC95UXxIhNhIt4Y+x5szg==",
"dev": true,
"license": "MIT",
"dependencies": {
"fs-extra": "^10.0.0",
"jsonc-parser": "^2.3.0",
@@ -514,13 +515,13 @@
"dev": true
},
"node_modules/@types/node": {
"version": "22.1.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz",
"integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==",
"version": "22.5.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.4.tgz",
"integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~6.13.0"
"undici-types": "~6.19.2"
}
},
"node_modules/@types/xml2js": {
@@ -888,9 +889,9 @@
}
},
"node_modules/brighterscript": {
"version": "0.67.5",
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.67.5.tgz",
"integrity": "sha512-OUJ5xLymzKXir8/RdWKamRIYbcqFy2JgqSp6eu2F+wdlCp3rlKCrP83pjEJ9kuqwJCo/V2pjTUcilcNBLkvuIg==",
"version": "0.67.6",
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.67.6.tgz",
"integrity": "sha512-MsqPOTJSzvVaOY4R5aykdg9jqesBPZbIXZZvmBKHI5DYwBWtY9SMDe2G+AwTwQ3q8KJvmsPQ6Yw/UbL8tReizQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5170,9 +5171,9 @@
"dev": true
},
"node_modules/undici-types": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz",
"integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==",
"version": "6.19.6",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.6.tgz",
"integrity": "sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org==",
"dev": true,
"license": "MIT"
},
@@ -5536,10 +5537,11 @@
"dev": true
},
"node_modules/yaml": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz",
"integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==",
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz",
"integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==",
"dev": true,
"license": "ISC",
"bin": {
"yaml": "bin.mjs"
},
+5 -5
View File
@@ -1,15 +1,15 @@
{
"name": "playlet",
"version": "0.25.1",
"version": "0.25.6",
"description": "Unofficial YouTube client for Roku",
"devDependencies": {
"@rokucommunity/bslint": "^0.8.22",
"@rokucommunity/bslint": "^0.8.24",
"@types/crypto-js": "^4.2.2",
"@types/fs-extra": "^11.0.4",
"@types/node": "^22.1.0",
"@types/node": "^22.5.4",
"@types/xml2js": "^0.4.14",
"argparse": "^2.0.1",
"brighterscript": "0.67.5",
"brighterscript": "0.67.6",
"brighterscript-formatter": "^1.7.4",
"convert-svg-to-png": "^0.6.4",
"cross-fetch": "^4.0.0",
@@ -30,7 +30,7 @@
"ts-node": "^10.9.2",
"typescript": "^5.5.4",
"xml2js": "^0.6.2",
"yaml": "^2.5.0"
"yaml": "^2.5.1"
},
"engines": {
"node": "20"
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-app",
"version": "0.25.1",
"version": "0.25.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "playlet-app",
"version": "0.25.1"
"version": "0.25.6"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-app",
"version": "0.25.1",
"version": "0.25.6",
"description": "Unofficial YouTube client for Roku",
"scripts": {
"prebuild": "rm -rf ../build/playlet-app",
@@ -1,10 +1,14 @@
function Init()
m.busySpinner = m.top.findNode("busySpinner")
m.busyspinner.poster.width = 150
m.busyspinner.poster.height = 150
poster = m.busyspinner.poster
poster.width = 150
poster.height = 150
poster.loadWidth = 150
poster.loadHeight = 150
poster.loadDisplayMode = "limitSize"
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
m.busyspinner.poster.observeField("loadStatus", "PositionSpinner")
m.busySpinner.poster.uri = "pkg:/images/spinner.png"
poster.observeField("loadStatus", "PositionSpinner")
poster.uri = "pkg:/images/spinner.png"
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
m.top.observeField("visible", "OnVisibleChange")
end function
+2 -1
View File
@@ -3,9 +3,10 @@ title=Playlet
# Do not update version manually, it is auto updated from package.json
major_version=0
minor_version=25
build_version=00001
build_version=00006
ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p
## Channel Assets
### Main Menu Icons / Channel Poster Artwork
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-lib",
"version": "0.25.1",
"version": "0.25.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "playlet-lib",
"version": "0.25.1"
"version": "0.25.6"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-lib",
"version": "0.25.1",
"version": "0.25.6",
"description": "Unofficial YouTube client for Roku",
"scripts": {
"prebuild": "rm -rf ../build/playlet-lib",
@@ -17,6 +17,9 @@
<Poster
id="banner"
width="1280"
loadWidth="1280"
loadHeight="500"
loadDisplayMode="limitSize"
visible="false" />
<Group id="container">
@@ -7,13 +7,13 @@ import "pkg:/source/utils/Locale.bs"
import "pkg:/source/utils/Logging.bs"
function LoadChannel(invidiousNode as object) as void
if m.contentTask <> invalid
m.contentTask.cancel = true
loadState = m.top.loadState
if loadState = FeedLoadState.Loading or loadState = FeedLoadState.Loaded or loadState = FeedLoadState.Error
return
end if
loadState = m.top.loadState
if loadState = FeedLoadState.Loading or loadState = FeedLoadState.Loaded
return
if m.contentTask <> invalid
m.contentTask.cancel = true
end if
m.top.loadState = FeedLoadState.Loading
+27
View File
@@ -2,6 +2,7 @@ import "pkg:/components/EcpArgs.bs"
import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
import "pkg:/source/utils/LoadingScreen.bs"
import "pkg:/source/utils/Locale.bs"
function Init()
m.scene = m.top.getScene()
@@ -18,6 +19,7 @@ function MainSceneContainerChanged()
InitEcpArgs()
m.scene.signalBeacon("AppLaunchComplete")
CopyLoadingMessagesToCache()
ShowAnnouncement()
end function
function StartWebServer()
@@ -30,3 +32,28 @@ function StartWebServer()
m.dialServer = m.top.findNode("DialServer")
m.dialServer@.StartServer()
end function
function ShowAnnouncement()
title = "Announcement"
message = [
"Hello again!",
"Invidious servers are actively getting blocked by YouTube.",
`You might see the error message "This helps protect our community. Learn more" when playing a video.`,
"This is a known issue and the Invidious dev team is working to fix it."
"See more information at https://github.com/iv-org/invidious/issues/4734"
"We apologize for the inconvenience."
]
buttons = [Tr(Locale.Buttons.OK)]
dialog = CreateObject("roSGNode", "SimpleDialog")
dialog.title = title
dialog.message = message
dialog.buttons = buttons
deviceInfo = CreateObject("roDeviceInfo")
displaySize = deviceInfo.GetDisplaySize()
dialog.width = displaySize.w - 180
m.top.getScene().dialog = dialog
end function
@@ -2,6 +2,7 @@
'import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
'import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
'import "pkg:/source/utils/LoadingScreen.bs"
'import "pkg:/source/utils/Locale.bs"
function Init()
InitializeBindings() ' auto-generated!
@@ -19,6 +20,7 @@ function MainSceneContainerChanged()
InitEcpArgs()
m.scene.signalBeacon("AppLaunchComplete")
CopyLoadingMessagesToCache()
ShowAnnouncement()
end function
function StartWebServer()
@@ -29,4 +31,27 @@ function StartWebServer()
m.dialServer = m.top.findNode("DialServer")
m.dialServer.callfunc("StartServer", invalid)
end function
function ShowAnnouncement()
title = "Announcement"
message = [
"Hello again!"
"Invidious servers are actively getting blocked by YouTube."
"You might see the error message " + chr(34) + "This helps protect our community. Learn more" + chr(34) + " when playing a video."
"This is a known issue and the Invidious dev team is working to fix it."
"See more information at https://github.com/iv-org/invidious/issues/4734"
"We apologize for the inconvenience."
]
buttons = [
Tr("OK")
]
dialog = CreateObject("roSGNode", "SimpleDialog")
dialog.title = title
dialog.message = message
dialog.buttons = buttons
deviceInfo = CreateObject("roDeviceInfo")
displaySize = deviceInfo.GetDisplaySize()
dialog.width = displaySize.w - 180
m.top.getScene().dialog = dialog
end function
'//# sourceMappingURL=./MainScene.brs.map
@@ -1,27 +1,20 @@
function Init()
m.titleLabel = m.top.findNode("TitleLabel")
m.titleLabelFocused = m.top.findNode("TitleLabelFocused")
m.iconPoster = m.top.findNode("IconPoster")
m.profileIcon = m.top.findNode("ProfileIcon")
end function
function OnContentSet() as void
content = m.top.itemContent
if content = invalid
return
end if
m.titleLabel.text = content.text
m.titleLabelFocused.text = content.text
m.top.titleLabelText = content.text
m.top.titleLabelFocusedText = content.text
isProfile = content.isProfile
if isProfile
m.iconPoster.visible = false
m.profileIcon.visible = true
m.top.iconPosterVisible = false
m.top.profileIconVisible = true
else
m.iconPoster.visible = true
m.profileIcon.visible = false
m.iconPoster.uri = content.icon
m.top.iconPosterVisible = true
m.top.profileIconVisible = false
m.top.iconPosterUri = content.icon
end if
OnListHasFocusChange()
@@ -29,15 +22,15 @@ end function
function OnItemHasFocusChange() as void
itemHasFocus = m.top.itemHasFocus
m.titleLabelFocused.visible = itemHasFocus
m.titleLabel.visible = not itemHasFocus
m.top.titleLabelFocusedVisible = itemHasFocus
m.top.titleLabelVisible = not itemHasFocus
end function
function OnListHasFocusChange()
listHasFocus = m.top.listHasFocus
if not listHasFocus
m.titleLabelFocused.visible = false
m.titleLabel.visible = false
m.top.titleLabelFocusedVisible = false
m.top.titleLabelVisible = false
m.top.opacity = 0.8
else
OnItemHasFocusChange()
@@ -3,6 +3,14 @@
<field id="itemContent" type="node" onChange="OnContentSet" />
<field id="itemHasFocus" type="boolean" onChange="OnItemHasFocusChange" />
<field id="listHasFocus" type="boolean" onChange="OnListHasFocusChange" />
<field id="titleLabelText" type="string" alias="TitleLabel.text" />
<field id="titleLabelFocusedText" type="string" alias="TitleLabelFocused.text" />
<field id="titleLabelVisible" type="boolean" alias="TitleLabel.visible" />
<field id="titleLabelFocusedVisible" type="boolean" alias="TitleLabelFocused.visible" />
<field id="iconPosterVisible" type="boolean" alias="IconPoster.visible" />
<field id="iconPosterUri" type="uri" alias="IconPoster.uri" />
<field id="profileIconVisible" type="boolean" alias="ProfileIcon.visible" />
</interface>
<children>
@@ -1,29 +1,49 @@
import "pkg:/source/AsyncTask/AsyncTask.bs"
import "pkg:/source/AsyncTask/Tasks.bs"
import "pkg:/source/utils/Logging.bs"
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs"
function Init()
m.busySpinner = m.top.findNode("busySpinner")
m.busySpinnerPoster = m.busySpinner.poster
m.busySpinnerPoster.uri = "pkg:/images/spinner.png"
m.busySpinnerPoster.loadDisplayMode = "limitSize"
m.top.observeField("width", FuncName(OnSizeChange))
m.top.observeField("height", FuncName(OnSizeChange))
OnSizeChange()
m.busySpinnerPoster.uri = "pkg:/images/spinner.png"
m.top.observeField("loadStatus", FuncName(OnLoadStatusChange))
end function
function OnSizeChange()
width = m.top.width
height = m.top.height
m.busySpinnerPoster.width = width / 2
m.busySpinnerPoster.height = height / 2
m.busySpinner.translation = [width / 4, height / 4]
spinnerWidth = m.top.width / 2
spinnerHeight = m.top.height / 2
m.busySpinnerPoster.width = spinnerWidth
m.busySpinnerPoster.height = spinnerHeight
m.busySpinnerPoster.loadWidth = spinnerWidth
m.busySpinnerPoster.loadHeight = spinnerHeight
m.busySpinner.translation = [spinnerWidth / 2, spinnerHeight / 2]
end function
function OnTextChange() as void
GenerateQrCode()
end function
function OnLoadStatusChange() as void
if m.top.loadStatus <> "failed"
return
end if
' If the image failed to load, it might have been deleted from cachefs:
' Try to generate it again
LogInfo("QrCode image failed to load, trying to generate it again")
GenerateQrCode()
end function
function GenerateQrCode() as void
if m.qrCodeGenTask <> invalid
m.qrCodeGenTask.cancel = true
end if
@@ -103,7 +103,9 @@ end function
function OnEditButtonSelected()
keyboardDialog = createObject("roSGNode", "StandardKeyboardDialog")
SetPalette(keyboardDialog)
' TODO:P2 localize
keyboardDialog.title = "Edit Instance"
' TODO:P2 localize
keyboardDialog.message = [`Enter the instance url (e.g. ${Invidious.DEFAULT_INSTANCE})`]
keyboardDialog.text = m.top.text
keyboardDialog.buttons = [Tr(Locale.Buttons.OK), Tr(Locale.Buttons.Cancel)]
@@ -44,6 +44,7 @@ const FIELD_VIDEO_ID = "videoId"
const FIELD_VIDEO_IDS = "videoIds"
const FIELD_EVENT_DETAILS = "eventDetails"
const FIELD_LIST_ID = "listId"
const FIELD_MDX_EXPANDED_RECEIVER_VIDEO_ID_LIST = "mdxExpandedReceiverVideoIdList"
const FIELD_CURRENT_TIME = "currentTime"
const FIELD_DURATION = "duration"
const FIELD_VOLUME = "volume"
@@ -56,7 +56,7 @@ namespace Http
m.SetState(Http.HttpConnectionState.RECV_REQUEST)
m.client = m.socket.getReceivedFromAddress().getAddress()
LogInfo("accepted connection @" + m.client)
LogDebug("accepted connection @" + m.client)
' try to read right away rather than going through another iteration
' of the poll loop.
@@ -162,7 +162,7 @@ namespace Http
'info(m,op + " would have blocked @"+m.client)
else
if m.socket.eSuccess()
LogInfo(op + " peer closed @" + m.client)
LogDebug(op + " peer closed @" + m.client)
else
LogError(op + " transfer error @" + m.client, m.socket.status())
end if
@@ -121,7 +121,8 @@ ${m.GeneratedBy()}
buf_pos = m.start + m.sent - m.buf_start
buf_remaining = m.body_buffer.count() - buf_pos
if buf_remaining = 0
LogInfo("source buffer is empty")
' This is expected if there's an ETag cache hit
LogDebug("source buffer is empty")
end if
req_remaining = m.body_buffer_length - m.sent
if buf_remaining > req_remaining
@@ -6,7 +6,14 @@ namespace Http
function MimeType(uri = "" as string) as string
map = m.MimeTypes
if map = invalid
map = ParseJson(ReadAsciiFile("libpkg:/config/mime-types.json5"))
json = ReadAsciiFile("libpkg:/config/mime-types.json5")
if StringUtils.IsNullOrEmpty(json)
return "application/octet-stream"
end if
map = ParseJson(json)
if not IsAssociativeArray(map)
return "application/octet-stream"
end if
m.MimeTypes = map
end if
ext = m.GetExtension(uri)
@@ -29,7 +36,14 @@ namespace Http
function HttpTitle(code = 0 as integer) as string
map = m.httpCodesMap
if map = invalid
map = ParseJson(ReadAsciiFile("libpkg:/config/http-codes.json5"))
json = ReadAsciiFile("libpkg:/config/http-codes.json5")
if StringUtils.IsNullOrEmpty(json)
return ""
end if
map = ParseJson(json)
if not IsAssociativeArray(map)
return ""
end if
m.httpCodesMap = map
end if
return ValidString(map[`${code}`])
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -3,9 +3,10 @@ title=PlayletLib
# Do not update version manually, it is auto updated from package.json
major_version=0
minor_version=25
build_version=00001
build_version=00006
ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p
sg_component_libs_provided=PlayletLib
hidden=1
+2 -2
View File
@@ -11,9 +11,9 @@ namespace QrCode
function Generate(text as string, size as integer, padding as integer, mode = QrCode.QrMode.Byte as QrCode.QrMode) as string
fileName = m.GetFileName(text, mode, size, padding)
#if DEBUG
#if DISABLE_CACHE
#else
#if DISABLE_CACHE
#if DEBUG
#else
fs = CreateObject("roFileSystem")
if fs.exists(fileName)
@@ -87,18 +87,42 @@ class ApplicationInfo
function GetLibVersion() as string
values = m.GetLibManifestValues()
if values = invalid
return "0.0.0"
end if
Major = values["major_version"].toInt()
Minor = values["minor_version"].toInt()
Build = values["build_version"].toInt()
major = 0
minor = 0
build = 0
return `${Major}.${Minor}.${Build}`
if values.DoesExist("major_version")
value = values["major_version"]
if IsString(value)
major = value.toInt()
end if
end if
if values.DoesExist("minor_version")
value = values["minor_version"]
if IsString(value)
minor = value.toInt()
end if
end if
if values.DoesExist("build_version")
value = values["build_version"]
if IsString(value)
build = value.toInt()
end if
end if
return `${major}.${minor}.${build}`
end function
function GetLibGitCommitHash() as string
values = m.GetLibManifestValues()
if values.doesexist("git_commit_sha")
if values.DoesExist("git_commit_sha")
return values["git_commit_sha"]
end if
return ""
+880 -849
View File
File diff suppressed because it is too large. Load diff
+12 -12
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-web",
"version": "0.25.1",
"version": "0.25.6",
"type": "module",
"scripts": {
"dev": "vite",
@@ -9,23 +9,23 @@
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"@tailwindcss/typography": "^0.5.13",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tailwindcss/typography": "^0.5.15",
"@tsconfig/svelte": "^5.0.4",
"@vitejs/plugin-legacy": "^5.4.1",
"@vitejs/plugin-legacy": "^5.4.2",
"autoprefixer": "^10.4.20",
"daisyui": "^4.12.10",
"dotenv": "^16.4.5",
"ip": "^2.0.1",
"postcss": "^8.4.40",
"svelte": "^4.2.18",
"svelte-check": "^3.8.5",
"postcss": "^8.4.45",
"svelte": "^4.2.19",
"svelte-check": "^4.0.1",
"svelte-preprocess": "^6.0.2",
"tailwindcss": "^3.4.7",
"terser": "^5.31.3",
"tslib": "^2.6.3",
"tailwindcss": "^3.4.10",
"terser": "^5.31.6",
"tslib": "^2.7.0",
"typescript": "^5.5.4",
"vite": "^5.3.5",
"vite-tsconfig-paths": "^4.3.2"
"vite": "^5.4.3",
"vite-tsconfig-paths": "^5.0.1"
}
}
+9
View File
@@ -57,6 +57,15 @@ export class InvidiousApi {
return await response.json();
}
public async getPlaylistMetadata(plid: string) {
if (plid.startsWith("VLPL")) {
plid = plid.substring(2);
}
const response = await fetch(`${this.instance}/api/v1/playlists/${plid}`);
return await response.json();
}
public async resolveUrl(url: string) {
const response = await fetch(`${this.instance}/api/v1/resolveurl?url=${encodeURIComponent(url)}`);
return await response.json();
+27
View File
@@ -4,9 +4,11 @@
import { InvidiousApi } from "lib/Api/InvidiousApi";
import VideoCastDialog from "./VideoFeed/VideoCastDialog.svelte";
import ChannelCastDialog from "./VideoFeed/ChannelCastDialog.svelte";
import PlaylistCastDialog from "./VideoFeed/PlaylistCastDialog.svelte";
let videoModal;
let channelModal;
let playlistModal;
let isDragging;
let isLoading;
let dragEndTimeout;
@@ -16,6 +18,7 @@
let videoMetadata;
let channelMetadata;
let playlistMetadata;
let invidiousApi = new InvidiousApi();
@@ -71,6 +74,9 @@
if (urlInfo && urlInfo.pageType === "WEB_PAGE_TYPE_CHANNEL") {
searchForChannelById(urlInfo.ucid);
return;
} else if (urlInfo && urlInfo.pageType === "WEB_PAGE_TYPE_PLAYLIST") {
searchForPlaylistById(urlInfo.ucid);
return;
}
}
}
@@ -100,6 +106,16 @@
}
}
async function searchForPlaylistById(playlistId) {
try {
isLoading = true;
playlistMetadata = await invidiousApi.getPlaylistMetadata(playlistId);
playlistModal.show();
} finally {
isLoading = false;
}
}
function onDragOver(event) {
closeModal();
clearTimeout(dragEndTimeout);
@@ -183,8 +199,10 @@
function closeModal() {
videoModal?.close();
channelModal?.close();
playlistModal?.close();
videoMetadata = undefined;
channelMetadata = undefined;
playlistMetadata = undefined;
}
</script>
@@ -221,3 +239,12 @@
authorId={channelMetadata?.authorId}
authorThumbnails={channelMetadata?.authorThumbnails}
/>
<PlaylistCastDialog
bind:this={playlistModal}
title={playlistMetadata?.title}
playlistId={playlistMetadata?.playlistId}
playlistThumbnail={playlistMetadata?.playlistThumbnail}
videoCount={playlistMetadata?.videoCount}
videos={playlistMetadata?.videos}
/>
+5 -4
View File
@@ -183,10 +183,11 @@ imap.once('ready', async () => {
writeMarkDownFile(images);
await moveToTrash('bdp_noreply@data.roku.com', 'Channel Health', yesterdayString);
await moveToTrash('bdp_noreply@data.roku.com', 'Channel Engagement', yesterdayString);
await moveToTrash('bdp_noreply@data.roku.com', 'Viewership Summary', yesterdayString);
await moveToTrash('bdp_noreply@data.roku.com', 'Channel Stability', yesterdayString);
// TODO:P0 deleting emails hangs the process, so it's disabled for now
// await moveToTrash('bdp_noreply@data.roku.com', 'Channel Health', yesterdayString);
// await moveToTrash('bdp_noreply@data.roku.com', 'Channel Engagement', yesterdayString);
// await moveToTrash('bdp_noreply@data.roku.com', 'Viewership Summary', yesterdayString);
// await moveToTrash('bdp_noreply@data.roku.com', 'Channel Stability', yesterdayString);
imap.end();
} catch (error) {