Compare commits

..
11 Commits
Author SHA1 Message Date
Brahim Hadriche 436078bdf8 Release 0.20.1 (#305) 2024-02-23 18:24:00 -05:00
Brahim Hadriche 20120538e4 Small perf optm 2024-02-23 17:04:33 -05:00
Brahim Hadriche eec4101d29 Fix for repeated 2024-02-23 12:44:55 -05:00
Brahim Hadriche b135ba2a0a Log connect and disconnect events 2024-02-22 23:40:40 -05:00
Brahim Hadriche 9c9f24cb39 rollback rooibos 2024-02-22 19:37:17 -05:00
Brahim Hadriche 6aeb4bc8b9 Changelog 2024-02-22 19:16:55 -05:00
Brahim Hadriche 4beb7fbf3c humor 2024-02-22 19:16:23 -05:00
Brahim Hadriche 4f3512023f Move devices array to lounge api class 2024-02-22 18:58:47 -05:00
Brahim Hadriche f38115171b Error handling for registry script 2024-02-22 17:11:51 -05:00
Brahim Hadriche 7456917cec fix rale tracker warnings 2024-02-22 13:30:51 -05:00
Brahim Hadriche 4482d3333f Update info and screenshots 2024-02-21 19:52:40 -05:00
24 changed files with 104 additions and 75 deletions

No files matched your search

+6
View File
@@ -5,6 +5,12 @@ 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.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.20.1] - 2024-02-23
### Fixed
- `Device connected` notification showing repeatedly
## [0.20.0] - 2024-02-21
### Added
+6 -6
View File
@@ -42,16 +42,16 @@ More under [Screenshots](./docs/screenshots/README.md)
- 🕵️ No Tracking
- 🛡️ Privacy driven (uses Invidious backend)
- ⚔️ SponsorBlock integration (skips undesirable sections in videos)
- 📱 Browse, search, and cast from phone using the web app
- 📱 Browse, search, and cast from phone using the YouTube app or the browser
- 🔮 Picture-in-picture mode
- ⚡ Fast! [Check out how we compare with the official YouTube app](https://youtu.be/qmSvA-QQW20)
### Cast from phone
1. Open "Web app" tab in Playlet
1. Scan QR Code with Phone
1. Browse or search videos
1. Click the video and choose the "Play on TV" option
- Open "Remote" tab in Playlet
- Scan QR Code with Phone, and use the browser; OR
- Use the YouTube app to connect using the same Wi-Fi; OR
- Use the `Link with TV code` to connect
### Picture-in-picture
@@ -63,7 +63,7 @@ More under [Screenshots](./docs/screenshots/README.md)
1. Open settings in Playlet
1. Select Invidious -> Instance
1. Set a custom instance, or choose a public one hosted by volunteers (from https://api.invidious.io/)
1. Set a custom instance, or choose a public one hosted by volunteers (from [api.invidious.io](https://api.invidious.io/))
1. Optionally, Select `Test instance` to make sure it works
1. Hit save
+1 -1
View File
@@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: Playlet Web API
version: 0.20.0
version: 0.20.1
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
+3 -3
View File
@@ -18,9 +18,9 @@
| --------------------------- | ------------------------------------------------ | --------------------------------------------- |
| ![Settings](./settings.jpg) | ![Invidious instances](./invidious-settings.jpg) | ![Invidious testing](./invidious-testing.jpg) |
| Link to web app | App info |
| ----------------------------------- | --------------------------- |
| ![Link to web app](./webapp-qr.jpg) | ![App info](./app-info.jpg) |
| Remote | App info |
| ----------------------- | --------------------------- |
| ![Remote](./remote.jpg) | ![App info](./app-info.jpg) |
## Playlet web app
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

+6 -6
View File
@@ -1,12 +1,12 @@
{
"name": "playlet",
"version": "0.20.0",
"version": "0.20.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "playlet",
"version": "0.20.0",
"version": "0.20.1",
"hasInstallScript": true,
"devDependencies": {
"@rokucommunity/bslint": "^0.8.17",
@@ -29,7 +29,7 @@
"json5": "^2.2.3",
"mailparser": "^3.6.7",
"roku-deploy": "^3.11.2",
"rooibos-roku": "^5.11.0",
"rooibos-roku": "5.10.0",
"semver": "^7.6.0",
"shelljs": "^0.8.5",
"ts-node": "^10.9.2",
@@ -3921,9 +3921,9 @@
}
},
"node_modules/rooibos-roku": {
"version": "5.11.0",
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.11.0.tgz",
"integrity": "sha512-qxTYwsyp6Ihb6B8tmFm+24DE/s2gMCxagvdABElGWgqL834M+kZtmwrQXvSrMkM+0gkmQfIDuw1M4v484gycYQ==",
"version": "5.10.0",
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.10.0.tgz",
"integrity": "sha512-Idiv3nWQOEr5V8z8oHcIovjcoBffgqRtTQ5B6K+x/cGAouKxyVJp0fsZ80xQvUul9IwHQ0XIPUYbNWCR3RQ3sA==",
"dev": true,
"dependencies": {
"source-map": "^0.7.3",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "playlet",
"version": "0.20.0",
"version": "0.20.1",
"description": "Unofficial YouTube client for Roku",
"devDependencies": {
"@rokucommunity/bslint": "^0.8.17",
@@ -23,7 +23,7 @@
"json5": "^2.2.3",
"mailparser": "^3.6.7",
"roku-deploy": "^3.11.2",
"rooibos-roku": "^5.11.0",
"rooibos-roku": "5.10.0",
"semver": "^7.6.0",
"shelljs": "^0.8.5",
"ts-node": "^10.9.2",
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-app",
"version": "0.20.0",
"version": "0.20.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "playlet-app",
"version": "0.20.0"
"version": "0.20.1"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-app",
"version": "0.20.0",
"version": "0.20.1",
"description": "Unofficial YouTube client for Roku",
"scripts": {
"prebuild": "rm -rf build/playlet-app",
@@ -20,6 +20,11 @@ function GetLoadingMessage() as string
"Don't forget to like and subscribe...",
"Shoveling coal into the server...",
"Counting down from infinity...",
"Unfortunately, the internet is closed today...",
"Unfortunately, we have no ads to show you...",
"Looking for the remote...",
"Finding that song that goes 'La la lala la'...",
"Waiting for the spinny thing to finish...",
]
end if
index = GetRandom(0, messages.count() - 1)
+1 -1
View File
@@ -3,7 +3,7 @@ title=Playlet
# Do not update version manually, it is auto updated from package.json
major_version=0
minor_version=20
build_version=00000
build_version=00001
ui_resolutions=hd
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-lib",
"version": "0.20.0",
"version": "0.20.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "playlet-lib",
"version": "0.20.0"
"version": "0.20.1"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-lib",
"version": "0.20.0",
"version": "0.20.1",
"description": "Unofficial YouTube client for Roku",
"scripts": {
"prebuild": "rm -rf build/playlet-lib",
@@ -57,7 +57,10 @@ namespace Invidious
end function
function GetInstance() as string
instance = m.node.preferences["invidious.instance"]
if m.preferences = invalid
m.preferences = m.node.preferences
end if
instance = m.preferences["invidious.instance"]
if not StringUtils.IsNullOrEmpty(instance)
return instance
end if
@@ -27,6 +27,7 @@ class LoungeApi
public loungeToken
public sessionId
public gSessionId
public devices
private ofs
private lastProcessedCommandIndex = -1
@@ -46,6 +47,7 @@ class LoungeApi
m.ofs = 0
m.poller = invalid
m.outgoingMessagesRequests = {}
m.devices = {}
commandHandlers = {}
commandHandlers[COMMAND_TYPE_NOOP] = m.HandleIgnoreCommand
@@ -336,35 +338,35 @@ class LoungeApi
return
end if
devicesDict = {}
for each device in devices
devicesDict[device.id] = device
if m.devices.DoesExist(device.id)
device.lastConnectEventType = m.devices[device.id].lastConnectEventType
end if
m.devices[device.id] = device
end for
m.loungeServiceNode.devices = devicesDict
end function
function HandleRemoteConnected(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void
LogInfo(commandType)
LogInfo(commandType, FormatJson(commandArgs))
newDevice = commandArgs
id = newDevice.id
if StringUtils.IsNullOrEmpty(id)
return
end if
devices = m.loungeServiceNode.devices
if devices = invalid
devices = {}
end if
if devices.DoesExist(id)
device = devices[id]
if m.devices.DoesExist(id)
device = m.devices[id]
device.Append(newDevice)
newDevice = device
end if
devices[id] = newDevice
m.loungeServiceNode.devices = devices
m.devices[id] = newDevice
if ValidString(newDevice.lastConnectEventType) = commandType
return
end if
newDevice.lastConnectEventType = commandType
userName = newDevice.user
deviceName = newDevice.name
@@ -374,21 +376,18 @@ class LoungeApi
end function
function HandleRemoteDisconnected(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void
LogInfo(commandType)
device = commandArgs
id = device.id
LogInfo(commandType, FormatJson(commandArgs))
newDevice = commandArgs
id = newDevice.id
if StringUtils.IsNullOrEmpty(id)
return
end if
devices = m.loungeServiceNode.devices
if devices = invalid
devices = {}
if not m.devices.DoesExist(id)
return
end if
if devices.Delete(id)
m.loungeServiceNode.devices = devices
end if
' TODO:P1 disconnect notification
m.devices[id].lastConnectEventType = commandType
end function
function HandleSetVolume(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void
@@ -6,8 +6,6 @@
<field id="screenId" type="string" />
<field id="loungeToken" type="string" />
<field id="devices" type="assocarray" />
<field id="join" type="boolean" alwaysNotify="true" />
<field id="outgoingMessages" type="array" alwaysNotify="true" />
@@ -17,4 +17,9 @@
"Don't forget to like and subscribe...",
"Shoveling coal into the server...",
"Counting down from infinity...",
"Unfortunately, the internet is closed today...",
"Unfortunately, we have no ads to show you...",
"Looking for the remote...",
"Finding that song that goes 'La la lala la'...",
"Waiting for the spinny thing to finish...",
]
+1 -1
View File
@@ -3,7 +3,7 @@ title=PlayletLib
# Do not update version manually, it is auto updated from package.json
major_version=0
minor_version=20
build_version=00000
build_version=00001
ui_resolutions=hd
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-web",
"version": "0.20.0",
"version": "0.20.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "playlet-web",
"version": "0.20.0",
"version": "0.20.1",
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.0.2",
"@tailwindcss/typography": "^0.5.10",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-web",
"version": "0.20.0",
"version": "0.20.1",
"type": "module",
"scripts": {
"dev": "vite",
+17 -17
View File
@@ -293,7 +293,7 @@ end sub
' RALE_Logger__GetTime - Returns current time
' @param {string} message - log message
' @return {string} - current time in format: "[hours]:[minutes]:[seconds].[miliseconds]"
function RALE_Logger__GetTime(message as String, level as Integer)
function RALE_Logger__GetTime(_message as String, _level as Integer)
m.dt.Mark()
h = RALE_Logger__getZeroNumber(m.dt.getHours())
@@ -311,7 +311,7 @@ end function
' RALE_Logger__GetDate - Returns current date
' @param {string} message - log message
' @return {string} - current date in format: "[year]-[month]-[day]"
function RALE_Logger__GetDate(message as String, level as Integer)
function RALE_Logger__GetDate(_message as String, _level as Integer)
m.dt.Mark()
y = str(m.dt.getYear()).trim()
mm = RALE_Logger__getZeroNumber(m.dt.getMonth())
@@ -322,14 +322,14 @@ end function
' RALE_Logger__GetLevel - Returns current verbosity level
' @param {string} message - log message
' @return {integer} - verbosity level
function RALE_Logger__GetLevel(message as String, level as Integer)
function RALE_Logger__GetLevel(_message as String, level as Integer)
return m.verbosityList[level]
end function
' RALE_Logger__GetMessage - Returns log message (needed for formating log message)
' @param {string} message - log message
' @return {string} - log message
function RALE_Logger__GetMessage(message as String, level as Integer)
function RALE_Logger__GetMessage(message as String, _level as Integer)
return message
end function
@@ -658,7 +658,7 @@ End Function
' @param {object} handlersMap - map that contains all RALE commands handlers
' @param {object} config - configuration constants
' @return {string} - connection status
Sub SocketConnection_StartConnection(addr, messagePort, port, buffer, handlersMap, config) as String
Sub SocketConnection_StartConnection(addr, messagePort, port, _buffer, handlersMap, config) as String
connections = {}
appManager = createObject("roAppManager")
screensaverTimer = CreateObject("roTimespan")
@@ -923,7 +923,7 @@ End Sub
' UIThread_showSelectorView - RALE "showSelectorView" command handler. Shows Selector (Live) View
' @param {object} args - command arguments
Sub UIThread_showSelectorView(args) as Object
Sub UIThread_showSelectorView(_args) as Object
m.showSelectorView = true
setSelectorView(m.currentNode, type(m.currentNode), m.currentPath)
m.logger.debug("Selector View was disabled")
@@ -931,7 +931,7 @@ End Sub
' UIThread_hideSelectorView - RALE "hideSelectorView" command handler. Hides Selector (Live) View
' @param {object} args - command arguments
Sub UIThread_hideSelectorView(args) as Object
Sub UIThread_hideSelectorView(_args) as Object
m.showSelectorView = false
setSelectorView(m.currentNode, type(m.currentNode), m.currentPath)
m.logger.debug("Selector View was enabled")
@@ -978,7 +978,7 @@ End Sub
' UIThread_updateNode - RALE "updateNode" command handler. Updates selected node
' @param {object} args - command arguments
' @return {object} - response of command. Contains node path and data (id, type, fields, layout etc.)
Sub UIThread_updateNode(args) as Object
Sub UIThread_updateNode(_args) as Object
return {
path: m.currentPath,
node: getNodeData(m.currentNode, m.currentPath, Invalid)
@@ -1198,7 +1198,7 @@ Sub UIThread_removeField(args) as Object
ownerPath.append(m.currentPath)
ownerPath.pop()
owner = setInParentNode(ownerPath, inOwnerField, node)
_owner = setInParentNode(ownerPath, inOwnerField, node)
end if
m.logger.debug("Field '" + FW_AsString(field) + "' of selected node was removed")
@@ -1227,7 +1227,7 @@ End Sub
' UIThread_selectFocusedNode - RALE "selectFocusedNode" command handler. Select focused node
' @param {object} args - command arguments
' @return {object} - response of command. Contains node path and data (id, type, fields, layout etc.)
Sub UIThread_selectFocusedNode(args) as Object
Sub UIThread_selectFocusedNode(_args) as Object
root = m.top.getScene()
node = getFocusedNodeObj(root)
if m.currentNode.IsSameNode(node) then
@@ -1333,7 +1333,7 @@ Sub UIThread_removeRulerLine(args) as Object
End Sub
' UIThread_removeRulerLine - TBD
Sub UIThread_removeAllRulerLines(args) as Object
Sub UIThread_removeAllRulerLines(_args) as Object
m.guides.removeAllLines()
return { success: true }
End Sub
@@ -1343,12 +1343,12 @@ End Sub
'=======================
' UIThread_getRegistrySections - TBD
Sub UIThread_getRegistrySections(args) as Object
Sub UIThread_getRegistrySections(_args) as Object
return getRegistrySections()
End Sub
' UIThread_addRegistrySection - TBD
Sub UIThread_clearRegistry(args) as Object
Sub UIThread_clearRegistry(_args) as Object
return clearRegistry()
End Sub
@@ -1515,7 +1515,7 @@ Sub getFieldList(node) as Object
fieldList = {}
result = 0
_result = 0
if type(fields) = "roArray" then
count = fields.count() - 1
for i = 0 to count
@@ -1636,7 +1636,7 @@ Sub getNodeById(rootNode, id) as Object
return storage.node
End Sub
Sub getNodeByIdCallback(node, index, parentObj, childObj, storage) as Boolean
Sub getNodeByIdCallback(node, _index, _parentObj, _childObj, storage) as Boolean
if node.id = storage.id then
storage.node = node
@@ -1670,7 +1670,7 @@ Sub getNodeByName(rootNode, name) as Object
return storage.node
End Sub
Sub getNodeByNameCallback(node, index, parentObj, childObj, storage) as Boolean
Sub getNodeByNameCallback(node, _index, _parentObj, _childObj, storage) as Boolean
if node.subtype() = storage.name then
storage.node = node
@@ -1916,7 +1916,7 @@ Function clearRegistry() as Object
return { success: true }
End Function
Sub clearRegistryCallback(section, sectionName, storage) as Object
Sub clearRegistryCallback(_section, sectionName, _storage) as Object
return removeRegistrySection(sectionName)
End Sub
+15 -2
View File
@@ -38,19 +38,28 @@ const getEnvVars = require('./get-env-vars');
}
}
await fetch(playletServer, {
const response = await fetch(playletServer, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(registry),
});
if (!response.ok) {
throw new Error(`Failed to write registry: ${response.status} ${response.statusText}`);
}
}
else if (output) {
if (fs.existsSync(output)) {
throw new Error(`File "${output}" already exists`);
}
const response = await fetch(playletServer);
if (!response.ok) {
throw new Error(`Failed to read registry: ${response.status} ${response.statusText}`);
}
const registry = await response.json();
for (const section in registry) {
@@ -64,9 +73,13 @@ const getEnvVars = require('./get-env-vars');
fs.writeFileSync(output, JSON.stringify(registry, null, 4));
}
else if (clear) {
await fetch(playletServer, {
const response = await fetch(playletServer, {
method: 'DELETE',
});
if (!response.ok) {
throw new Error(`Failed to clear registry: ${response.status} ${response.statusText}`);
}
}
else {
console.error('No action specified');