Skip to content

Commit

Permalink
updated neutralino binary and bundled node
Browse files Browse the repository at this point in the history
  • Loading branch information
bocchilorenzo committed Oct 20, 2023
1 parent 0880cc7 commit 95727f3
Show file tree
Hide file tree
Showing 6 changed files with 354 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ await Neutralino.events.on(`windowClose`, () => {
## Building

### Requirements
- NodeJS v14+. It's required for the extension to work (the dns lookup required by the radio API)
- NodeJS v18+. It's required for the extension to work (the dns lookup required by the radio API)
- Neutralino CLI

### Steps
Expand Down
10 changes: 5 additions & 5 deletions extensions/dnslookup/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ const NL_PORT = argv["nl-port"];
const NL_TOKEN = argv["nl-token"];
const NL_EXTID = argv["nl-extension-id"];

let client = new WS(`ws://localhost:${NL_PORT}?extensionId=${NL_EXTID}`);
let client = new WS(`ws://127.0.0.1:${NL_PORT}?extensionId=${NL_EXTID}`);

/**
* Get a list of base urls of all available radio-browser servers
* Returns: array of strings - base urls of radio-browser servers
*/
function get_radiobrowser_base_urls() {
return resolve4("all.api.radio-browser.info")
async function get_radiobrowser_base_urls() {
return await resolve4("all.api.radio-browser.info")
.then((hosts) => {
let jobs = hosts.map((host) => reverse(host));
return Promise.all(jobs);
Expand All @@ -35,8 +35,8 @@ function get_radiobrowser_base_urls() {
* Get a random available radio-browser server.
* Returns: string - base url for radio-browser api
*/
function get_radiobrowser_base_url_random() {
return get_radiobrowser_base_urls().then((hosts) => {
async function get_radiobrowser_base_url_random() {
return await get_radiobrowser_base_urls().then((hosts) => {
var item = hosts[Math.floor(Math.random() * hosts.length)];
return item;
});
Expand Down
7 changes: 4 additions & 3 deletions neutralino.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"applicationId": "js.neutralino.xradio",
"version": "1.0.3",
"version": "1.0.4",
"defaultMode": "window",
"documentRoot": "/xradio-vue/dist/",
"port": 6498,
"url": "/",
"enableServer": true,
"enableNativeAPI": true,
"tokenSecurity": "one-time",
"extensions": [
{
"id": "js.neutralino.dnslookup",
Expand Down Expand Up @@ -38,8 +39,8 @@
"resourcesPath": "/xradio-vue/dist/",
"extensionsPath": "/extensions/",
"clientLibrary": "/xradio-vue/public/neutralino.js",
"binaryVersion": "4.11.0",
"clientVersion": "3.8.0",
"binaryVersion": "4.12.0",
"clientVersion": "3.12.0",
"frontendLibrary": {
"patchFile": "/xradio-vue/public/index.html",
"devUrl": "http://localhost:8080"
Expand Down
Loading

0 comments on commit 95727f3

Please sign in to comment.