Skip to content

Commit

Permalink
chore: release v3.0.3
Browse files Browse the repository at this point in the history
* (arteck) setStringSettings corr
  • Loading branch information
arteck committed Nov 4, 2023
1 parent a69919d commit bfebb91
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 20 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ Many thanks to @Acgua (https://github.com/Acgua) for [ioBroker.fully-mqtt](https


## Changelog
### 3.0.3 (2023-11-04)
* (arteck) setStringSettings corr

### 3.0.2 (2023-11-02)
* (arteck) add motionDetection
* (arteck) for Rooted Devices add rebootDevice
Expand Down
28 changes: 14 additions & 14 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{
"common": {
"name": "fullybrowser",
"version": "3.0.2",
"version": "3.0.3",
"news": {
"3.0.3": {
"en": "setStringSettings corr",
"de": "setStringSettings Korr",
"ru": "setStringНастройки corr",
"pt": "setStringSettings corr",
"nl": "vertaling:",
"fr": "setStringSettings corr",
"it": "setStringSettings corr",
"es": "setStringSettings corr",
"pl": "stworzenie korekty",
"uk": "setStringSettings корр",
"zh-cn": "导 言"
},
"3.0.2": {
"en": "add motionDetection\nfor Rooted Devices add rebootDevice",
"de": "bewegung hinzufügenDetektion\nfür Rooted Devices Neustart hinzufügen",
Expand Down Expand Up @@ -80,19 +93,6 @@
"pl": "dodaj nazwę urządzenia do administratora",
"uk": "додати назву пристрою до адміністратора",
"zh-cn": "将设备名称添加到管理员中"
},
"2.1.2": {
"en": "encodeuri for psw",
"de": "encodeuri for psw",
"ru": "encodeuri for psw",
"pt": "codificador para psw",
"nl": "encodeuri voor psw",
"fr": "encodeur pour PSW",
"it": "codificatori per psw",
"es": "codificador para psw",
"pl": "encodeuri dla psw",
"uk": "encodeuri для psw",
"zh-cn": "PSW 的编码器"
}
},
"title": "fullyBrowser",
Expand Down
2 changes: 1 addition & 1 deletion lib/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function isIpAddressValid(ip) {
function getConfigValuePerKey(config, key1, key1Value, key2) {
for (const lpConfDevice of config) {
if (lpConfDevice[key1] === key1Value) {
if (lpConfDevice[key2] === undefined) {
if (lpConfDevice[key2] === void 0) {
return -1;
} else {
return lpConfDevice[key2];
Expand Down
13 changes: 11 additions & 2 deletions lib/restApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class RestApiFully {
startApplication: {urlParameter: 'cmd=startApplication&package=', cleanSpaces: true},
screenBrightness: {urlParameter: 'cmd=setStringSetting&key=screenBrightness&value='},
setAudioVolume: {urlParameter: 'cmd=setAudioVolume&stream=3&level='},
motionDetection: {urlParameter: 'cmd=setBooleanSetting&key=motionDetection&value='}
motionDetection: {urlParameter: 'cmd=setBooleanSetting&key=motionDetection&value='},
setStringSetting: {urlParameter: '', cleanSpaces: true, encode: false, raw: true},
};

let finalUrlParam = '';
Expand All @@ -29,7 +30,15 @@ class RestApiFully {
val = val.toString().trim();
val = encodeURIComponent(val);
}
finalUrlParam = cmds[cmd].urlParameter + val;

if (cmds[cmd].raw) {
finalUrlParam = 'cmd=setStringSetting' + cmds[cmd].urlParameter + val;

} else {
finalUrlParam = cmds[cmd].urlParameter + val;


}
} else {
finalUrlParam = 'cmd=' + cmd;
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.fullybrowser",
"version": "3.0.2",
"version": "3.0.3",
"description": "Manage yours Fully Browser",
"main": "main.js",
"repository": {
Expand Down

0 comments on commit bfebb91

Please sign in to comment.