Compare commits

...
6 Commits
Author SHA1 Message Date
Brahim Hadriche a4c4f3d622 Release v0.23.7 (#391) 2024-05-28 11:49:59 -04:00
Brahim Hadriche 91a62cd3ac Bugfix 2024-05-27 09:38:06 -04:00
Brahim Hadriche 057b1fa1ee [skip ci] Error log 2024-05-27 09:32:14 -04:00
Brahim Hadricheandgithub-action linter 090d96c602 Feature/clock (#388)
* Clock

* Adjust clock work

* Lint fix

* Formatting

---------

Co-authored-by: github-action linter <githubaction@githubaction.com>
2024-05-26 19:01:33 -04:00
Brahim Hadriche 1afd295c7c [skip ci] todo 2024-05-26 09:32:27 -04:00
Brahim Hadriche 0d4c224703 update dependencies (#387) 2024-05-24 22:56:14 -04:00
19 changed files with 119 additions and 40 deletions

No files matched your search

+10
View File
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.23.7] - 2024-05-28
### Added
- A clock to show the time
### Fixed
- Attempt to fix a race condition when closing player
## [0.23.6] - 2024-05-23 ## [0.23.6] - 2024-05-23
### Added ### Added
+1 -1
View File
@@ -2,7 +2,7 @@ openapi: 3.0.0
info: info:
title: Playlet Web API title: Playlet Web API
version: 0.23.6 version: 0.23.7
description: description:
Playlet Web API is a RESTful API for controlling the Playlet app on 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 Roku devices. The API is intended to be used by the Playlet web app, but can
+23 -23
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.23.6", "version": "0.23.7",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet", "name": "playlet",
"version": "0.23.6", "version": "0.23.7",
"hasInstallScript": true, "hasInstallScript": true,
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.21", "@rokucommunity/bslint": "^0.8.21",
@@ -23,7 +23,7 @@
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"express": "^4.19.2", "express": "^4.19.2",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"glob": "^10.3.15", "glob": "^10.4.1",
"imap": "^0.8.19", "imap": "^0.8.19",
"ip": "^2.0.1", "ip": "^2.0.1",
"json5": "^2.2.3", "json5": "^2.2.3",
@@ -2456,16 +2456,16 @@
} }
}, },
"node_modules/glob": { "node_modules/glob": {
"version": "10.3.15", "version": "10.4.1",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.15.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz",
"integrity": "sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==", "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"foreground-child": "^3.1.0", "foreground-child": "^3.1.0",
"jackspeak": "^2.3.6", "jackspeak": "^3.1.2",
"minimatch": "^9.0.1", "minimatch": "^9.0.4",
"minipass": "^7.0.4", "minipass": "^7.1.2",
"path-scurry": "^1.11.0" "path-scurry": "^1.11.1"
}, },
"bin": { "bin": {
"glob": "dist/esm/bin.mjs" "glob": "dist/esm/bin.mjs"
@@ -2532,9 +2532,9 @@
} }
}, },
"node_modules/glob/node_modules/minimatch": { "node_modules/glob/node_modules/minimatch": {
"version": "9.0.3", "version": "9.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"brace-expansion": "^2.0.1" "brace-expansion": "^2.0.1"
@@ -2999,9 +2999,9 @@
"dev": true "dev": true
}, },
"node_modules/jackspeak": { "node_modules/jackspeak": {
"version": "2.3.6", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.1.2.tgz",
"integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "integrity": "sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@isaacs/cliui": "^8.0.2" "@isaacs/cliui": "^8.0.2"
@@ -3419,9 +3419,9 @@
} }
}, },
"node_modules/minipass": { "node_modules/minipass": {
"version": "7.1.1", "version": "7.1.2",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.1.tgz", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
"integrity": "sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA==", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=16 || 14 >=14.17" "node": ">=16 || 14 >=14.17"
@@ -3900,16 +3900,16 @@
"dev": true "dev": true
}, },
"node_modules/path-scurry": { "node_modules/path-scurry": {
"version": "1.11.0", "version": "1.11.1",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.0.tgz", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
"integrity": "sha512-LNHTaVkzaYaLGlO+0u3rQTz7QrHTFOuKyba9JMTQutkmtNew8dw8wOD7mTU/5fCPZzCWpfW0XnQKzY61P0aTaw==", "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"lru-cache": "^10.2.0", "lru-cache": "^10.2.0",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
}, },
"engines": { "engines": {
"node": ">=16 || 14 >=14.17" "node": ">=16 || 14 >=14.18"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/isaacs"
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.23.6", "version": "0.23.7",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.21", "@rokucommunity/bslint": "^0.8.21",
@@ -17,7 +17,7 @@
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"express": "^4.19.2", "express": "^4.19.2",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"glob": "^10.3.15", "glob": "^10.4.1",
"imap": "^0.8.19", "imap": "^0.8.19",
"ip": "^2.0.1", "ip": "^2.0.1",
"json5": "^2.2.3", "json5": "^2.2.3",
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.23.6", "version": "0.23.7",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-app", "name": "playlet-app",
"version": "0.23.6" "version": "0.23.7"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.23.6", "version": "0.23.7",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"scripts": { "scripts": {
"prebuild": "rm -rf ../build/playlet-app", "prebuild": "rm -rf ../build/playlet-app",
+1 -1
View File
@@ -3,7 +3,7 @@ title=Playlet
# Do not update version manually, it is auto updated from package.json # Do not update version manually, it is auto updated from package.json
major_version=0 major_version=0
minor_version=23 minor_version=23
build_version=00006 build_version=00007
ui_resolutions=hd ui_resolutions=hd
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.23.6", "version": "0.23.7",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.23.6" "version": "0.23.7"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.23.6", "version": "0.23.7",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"scripts": { "scripts": {
"prebuild": "rm -rf ../build/playlet-lib", "prebuild": "rm -rf ../build/playlet-lib",
+62
View File
@@ -0,0 +1,62 @@
import "pkg:/source/utils/Types.bs"
function Init()
m.top.font.size = 18
m.top.horizAlign = "right"
m.top.translation = [1034, 34]
m.top.width = 200
m.dateTime = CreateObject("roDateTime")
Update()
seconds = m.dateTime.GetSeconds()
m.timer = CreateObject("roSGNode", "Timer")
' add 2 seconds delay between real clock time and the displayed time to in case of inaccuracy of the timer
m.timer.duration = 60 - seconds + 2
m.timer.repeat = false
m.timer.ObserveField("fire", FuncName(FirstUpdate))
m.timer.control = "start"
end function
function FirstUpdate()
m.timer.control = "stop"
m.timer.unobserveField("fire")
m.timer.ObserveField("fire", FuncName(Update))
m.timer.duration = 60
m.timer.repeat = true
m.timer.control = "start"
Update()
end function
' format time HH:MM AM/PM
function Update()
m.dateTime.Mark()
m.dateTime.ToLocalTime()
hours = m.dateTime.GetHours()
minutes = m.dateTime.GetMinutes()
if hours >= 12
ampm = "PM"
else
ampm = "AM"
end if
if hours > 12
hours = hours - 12
end if
hoursStr = hours.ToStr()
minutesStr = minutes.ToStr()
if hours < 10
hoursStr = "0" + hoursStr
end if
if minutes < 10
minutesStr = "0" + minutesStr
end if
m.top.text = hoursStr + ":" + minutesStr + " " + ampm
end function
@@ -0,0 +1,2 @@
<component name="Clock" extends="Label">
</component>
@@ -35,6 +35,7 @@
</NavBar> </NavBar>
</AppRoot> </AppRoot>
</Group> </Group>
<Clock />
<VideoContainer id="VideoContainer" /> <VideoContainer id="VideoContainer" />
<Group id="Notifications" /> <Group id="Notifications" />
<VideoQueue id="VideoQueue" /> <VideoQueue id="VideoQueue" />
+1
View File
@@ -52,6 +52,7 @@
</AppRoot> </AppRoot>
</Group> </Group>
<Clock />
<VideoContainer id="VideoContainer" /> <VideoContainer id="VideoContainer" />
<Group id="Notifications" /> <Group id="Notifications" />
@@ -234,5 +234,6 @@ function LoadPlaylistIfNeeded() as void
return return
end if end if
' TODO:P1 use a field instead of function call
m.top.content@.LoadPlaylistPage(m.top.invidious) m.top.content@.LoadPlaylistPage(m.top.invidious)
end function end function
@@ -115,7 +115,7 @@ namespace SponsorBlock
function OnSponsorBlockTaskResults(output as object) as void function OnSponsorBlockTaskResults(output as object) as void
m.sponsorBlockTask = invalid m.sponsorBlockTask = invalid
if output.cancelled if output.cancelled or m.onCloseCalled = true
return return
end if end if
@@ -114,7 +114,7 @@ end function
function OnVideoContentTaskResults(output as object) as void function OnVideoContentTaskResults(output as object) as void
m.videoContentTask = invalid m.videoContentTask = invalid
if output.cancelled if output.cancelled or m.onCloseCalled = true
return return
end if end if
@@ -247,7 +247,9 @@ function OnClose()
try try
m.top.control = "stop" m.top.control = "stop"
catch error catch error
DialogUtils.ShowDialog(ErrorUtils.Format(error), Tr(Locale.VideoPlayer.ErrorClosingVideo), true) errorMessage = ErrorUtils.Format(error)
LogError("Error stopping video:", errorMessage)
DialogUtils.ShowDialog(errorMessage, Tr(Locale.VideoPlayer.ErrorClosingVideo), true)
end try end try
m.top.content = invalid m.top.content = invalid
+1 -1
View File
@@ -3,7 +3,7 @@ title=PlayletLib
# Do not update version manually, it is auto updated from package.json # Do not update version manually, it is auto updated from package.json
major_version=0 major_version=0
minor_version=23 minor_version=23
build_version=00006 build_version=00007
ui_resolutions=hd ui_resolutions=hd
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.23.6", "version": "0.23.7",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-web", "name": "playlet-web",
"version": "0.23.6", "version": "0.23.7",
"devDependencies": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.0", "@sveltejs/vite-plugin-svelte": "^3.1.0",
"@tailwindcss/typography": "^0.5.13", "@tailwindcss/typography": "^0.5.13",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.23.6", "version": "0.23.7",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",