iobroker.squeezeboxrpc 1.3.11 → 1.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 oweitman <oweitman@gmx.de>
3
+ Copyright (c) 2019-2024 oweitman <oweitman@gmx.de>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -201,6 +201,20 @@ For more information visit the CLI-documentation:
201
201
  Placeholder for the next version (at the beginning of the line):
202
202
  ### **WORK IN PROGRESS**
203
203
  -->
204
+ ### 1.3.14 (2024-08-05)
205
+
206
+ - fix formatting
207
+
208
+ ### 1.3.13 (2024-08-05)
209
+
210
+ - revert the fix for artist handling due to negative effect of spotify
211
+
212
+ ### 1.3.12 (2024-08-05)
213
+
214
+ - improve cmdGoto handling by kairauer, close PR #74
215
+ - fix issues from adapter checker
216
+ - integrate squeezenode lib
217
+
204
218
  ### 1.3.11 (2024-08-05)
205
219
 
206
220
  - update adapter structure and switch to jsonconfig
package/io-package.json CHANGED
@@ -1,8 +1,47 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "squeezeboxrpc",
4
- "version": "1.3.11",
4
+ "version": "1.3.14",
5
5
  "news": {
6
+ "1.3.14": {
7
+ "en": "fix formatting",
8
+ "de": "fixe formatierung",
9
+ "ru": "форматирование фиксации",
10
+ "pt": "corrigir formatação",
11
+ "nl": "formatteren herstellen",
12
+ "fr": "corriger le formatage",
13
+ "it": "correzione della formattazione",
14
+ "es": "arreglar formato",
15
+ "pl": "naprawić formatowanie",
16
+ "uk": "фіксувати форматування",
17
+ "zh-cn": "固定格式化"
18
+ },
19
+ "1.3.13": {
20
+ "en": "revert the fix for artist handling due to negative effect of spotify",
21
+ "de": "die fix für die künstlerhandhabung aufgrund negativer wirkung von spotify",
22
+ "ru": "возвратить фиксацию для работы с художником из-за негативного эффекта спотификации",
23
+ "pt": "reverter a correção para manipulação de artista devido ao efeito negativo de identificar",
24
+ "nl": "terugzetten van de fix voor artist handling als gevolg van negatief effect van spotify",
25
+ "fr": "retourner la correction pour la manipulation de l'artiste en raison de l'effet négatif de spotify",
26
+ "it": "ripristinare la correzione per la gestione dell'artista a causa dell'effetto negativo di spotify",
27
+ "es": "revertir la fijación para el manejo del artista debido al efecto negativo de spotify",
28
+ "pl": "revert fix do obsługi artysty ze względu na negatywny efekt spotify",
29
+ "uk": "перевернути фіксацію для обробки художника через негативний ефект плямистості",
30
+ "zh-cn": "恢复对艺术家处理的固定,因为发现有负面影响"
31
+ },
32
+ "1.3.12": {
33
+ "en": "improve cmdGoto handling by kairauer, close PR #74\nfix issues from adapter checker\nintegrate squeezenode lib",
34
+ "de": "verbessern cmd Goto Handling von kairauer, close PR #74\nprobleme von adapter checker beheben\npressnode lib integrieren",
35
+ "ru": "улучшить смс Goto handling by kairauer, close PR #74\nпроблемы с адаптером\nинтегрировать сжимнод lib",
36
+ "pt": "melhorar cm Goto manipulação por kairauer, close PR #74\ncorrigir problemas do verificador do adaptador\nintegrar o espremido lib",
37
+ "nl": "verbetering cmd Ga naar behandeling door Kairauer, sluit PR #74\nproblemen oplossen van adaptercontrole\nintegreer crownode lib",
38
+ "fr": "améliorer cmd Goto manipulation par kairauer, fermer PR #74\ncorrection des problèmes de l'adaptateur checker\nintégrer la lib de pressingnode",
39
+ "it": "migliorare cmd Goto handling by kairauer, close PR #74\nrisolvere problemi da adattatore checker\nintegrare compressione lib",
40
+ "es": "mejorar cmd Goto manejo por kairauer, cerrar PR #74\nsolucionar problemas desde el control de adaptador\nintegrar el exprimido lib",
41
+ "pl": "poprawić cmd Goto handling by kairauer, close PR # 74\nnaprawianie problemów z sprawdzaczem adaptera\nzintegrować lib wyciskacza",
42
+ "uk": "поліпшення cmd Goto обслуговування за допомогою kairauer, Закрити PR #74\nвиправити проблеми з перевіркою адаптера\nінтегрувати squeezenode lib",
43
+ "zh-cn": "改进 cmd 由Kairauer处理\n从适配器检查器中校正问题\n集成压缩节点 lib"
44
+ },
6
45
  "1.3.11": {
7
46
  "en": "update adapter structure and switch to jsonconfig",
8
47
  "de": "adapterstruktur aktualisieren und auf jsonconfig wechseln",
@@ -54,48 +93,8 @@
54
93
  "pl": "* napraw widget btn do przesyłania obiektów",
55
94
  "uk": "* виправити віджет btn для пересилання об’єктів",
56
95
  "zh-cn": "* 修复对象转发 btn 小部件"
57
- },
58
- "1.3.7": {
59
- "en": "* fix object creation of states in player modul",
60
- "de": "* Objekterstellung von Zuständen im Player-Modul behoben",
61
- "ru": "* исправлено создание объектов состояний в модуле плеера",
62
- "pt": "* corrigir a criação de objetos de estados no módulo do player",
63
- "nl": "* probleem met het maken van statussen in de spelermodule",
64
- "fr": "* Correction de la création d'objets d'états dans le module joueur",
65
- "it": "* corretta la creazione di oggetti di stati nel modulo del lettore",
66
- "es": "* Corregir la creación de objetos de estados en el módulo del reproductor.",
67
- "pl": "* naprawiono tworzenie stanów obiektów w module odtwarzacza",
68
- "uk": "* виправлено створення об'єктів станів у модулі гравця",
69
- "zh-cn": "*修复玩家模块中状态的对象创建"
70
- },
71
- "1.3.6": {
72
- "en": "* fix object creation of states",
73
- "de": "* Objekterstellung von Zuständen behoben",
74
- "ru": "* исправлено создание объектов состояний",
75
- "pt": "* corrigir a criação de estados de objetos",
76
- "nl": "* probleem met het maken van statussen voor objecten",
77
- "fr": "* Correction de la création d'objets d'états",
78
- "it": "* corretta la creazione degli stati da parte degli oggetti",
79
- "es": "* arreglar la creación de objetos de estados",
80
- "pl": "* naprawiono tworzenie obiektów w stanach",
81
- "uk": "* виправити створення об'єктів станів",
82
- "zh-cn": "* 修复状态的对象创建"
83
- },
84
- "1.3.5": {
85
- "en": "* fix object creation for favorites",
86
- "de": "* Objekterstellung für Favoriten korrigiert",
87
- "ru": "* исправлено создание объектов для избранного",
88
- "pt": "* corrigir a criação de objetos para favoritos",
89
- "nl": "* probleem met het maken van objecten voor favorieten",
90
- "fr": "* correction de la création d'objets pour les favoris",
91
- "it": "* corretta la creazione di oggetti per i preferiti",
92
- "es": "* arreglar la creación de objetos para favoritos",
93
- "pl": "* naprawiono tworzenie obiektów dla ulubionych",
94
- "uk": "* виправлено створення об'єктів для обраних",
95
- "zh-cn": "* 修复收藏夹的对象创建"
96
96
  }
97
97
  },
98
- "title": "SqueezeboxRPC: Controller for Logitech media Server over RPC-protokol",
99
98
  "titleLang": {
100
99
  "en": "SqueezeboxRPC: Controller for Logitech media Server over RPC-protokol",
101
100
  "de": "SqueezeboxRPC: Controller für Logitech Media Server über RPC-Protokoll",
@@ -126,17 +125,16 @@
126
125
  "oweitman <oweitman@gmx.de>"
127
126
  ],
128
127
  "keywords": [
129
- "ioBroker",
130
- "template",
131
- "Smart Home",
132
- "home automation"
128
+ "squeezebox",
129
+ "LMS",
130
+ "Logitech Media Server",
131
+ "music server"
133
132
  ],
134
133
  "licenseInformation": {
135
134
  "type": "free",
136
135
  "license": "MIT"
137
136
  },
138
137
  "platform": "Javascript/Node.js",
139
- "main": "squeezeboxrpc.js",
140
138
  "icon": "squeezeboxrpc.png",
141
139
  "enabled": true,
142
140
  "extIcon": "https://raw.githubusercontent.com/oweitman/ioBroker.squeezeboxrpc/main/admin/squeezeboxrpc.png",
@@ -157,7 +155,7 @@
157
155
  },
158
156
  "dependencies": [
159
157
  {
160
- "js-controller": ">=3.3.22"
158
+ "js-controller": ">=5.0.19"
161
159
  }
162
160
  ],
163
161
  "globalDependencies": [
@@ -166,6 +164,12 @@
166
164
  }
167
165
  ]
168
166
  },
167
+ "encryptedNative": [
168
+ "password"
169
+ ],
170
+ "protectedNative": [
171
+ "password"
172
+ ],
169
173
  "native": {
170
174
  "server": "0.0.0.0",
171
175
  "port": 9000,
package/lib/iosbplayer.js CHANGED
@@ -585,48 +585,45 @@ function ioSBPlayer(server, playerdata) {
585
585
  value = decodeURIComponent(m[1]);
586
586
  }
587
587
  }
588
- this.artisthandling = true;
589
- if (key == "artist" && !playerdata["artisthandling"] && this.artisthandling == true) {
590
-
591
- if (Object.prototype.hasOwnProperty.call(playerdata, "artist")) {
592
- value = playerdata["artist"];
593
- }
594
- if (Object.prototype.hasOwnProperty.call(playerdata, "composer")) {
595
- value = playerdata["composer"];
596
- }
597
- if (Object.prototype.hasOwnProperty.call(playerdata, "conductor")) {
598
- value = playerdata["conductor"];
599
- }
600
- if (Object.prototype.hasOwnProperty.call(playerdata, "band")) {
601
- value = playerdata["band"];
602
- }
603
- if (Object.prototype.hasOwnProperty.call(playerdata, "albumartist")) {
604
- value = playerdata["albumartist"];
605
- }
606
- if (Object.prototype.hasOwnProperty.call(playerdata, "trackartist")) {
607
- value = playerdata["trackartist"];
608
- }
609
- playerdata["artisthandling"] = true;
610
- }
611
-
612
-
588
+ /* this.artisthandling = true;
589
+ if (key == "artist" && !playerdata["artisthandling"] && this.artisthandling == true) {
613
590
 
591
+ if (Object.prototype.hasOwnProperty.call(playerdata, "artist")) {
592
+ value = playerdata["artist"];
593
+ }
594
+ if (Object.prototype.hasOwnProperty.call(playerdata, "composer")) {
595
+ value = playerdata["composer"];
596
+ }
597
+ if (Object.prototype.hasOwnProperty.call(playerdata, "conductor")) {
598
+ value = playerdata["conductor"];
599
+ }
600
+ if (Object.prototype.hasOwnProperty.call(playerdata, "band")) {
601
+ value = playerdata["band"];
602
+ }
603
+ if (Object.prototype.hasOwnProperty.call(playerdata, "albumartist")) {
604
+ value = playerdata["albumartist"];
605
+ }
606
+ if (Object.prototype.hasOwnProperty.call(playerdata, "trackartist")) {
607
+ value = playerdata["trackartist"];
608
+ }
609
+ playerdata["artisthandling"] = true;
610
+ } */
614
611
 
615
612
  this.setState(this.sbPlayerStatusLoop[key].name, this.convertState(this.sbPlayerStatusLoop[key], value), this.statePath, this.playername);
616
613
  } else {
617
614
  if (key == "remote_title" && this.remote == 0) {
618
615
  value = "";
619
616
  }
620
- if (key == "artist" && (Object.prototype.hasOwnProperty.call(playerdata, "albumartist") || "") == "") {
621
- value = "";
622
- } else {
623
- value = playerdata["albumartist"];
624
- }
625
- if (key == "albumartist" && (Object.prototype.hasOwnProperty.call(playerdata, "artist") || "") == "") {
626
- value = "";
627
- } else {
628
- value = playerdata["artist"];
629
- }
617
+ /* if (key == "artist" && (Object.prototype.hasOwnProperty.call(playerdata, "albumartist") || "") == "") {
618
+ value = "";
619
+ } else {
620
+ value = playerdata["albumartist"];
621
+ }
622
+ if (key == "albumartist" && (Object.prototype.hasOwnProperty.call(playerdata, "artist") || "") == "") {
623
+ value = "";
624
+ } else {
625
+ value = playerdata["artist"];
626
+ } */
630
627
  if (fullStatus) this.setState(this.sbPlayerStatusLoop[key].name, this.convertState(this.sbPlayerStatusLoop[key], value), this.statePath, this.playername);
631
628
  }
632
629
  }
@@ -752,6 +749,12 @@ function ioSBPlayer(server, playerdata) {
752
749
  }
753
750
  }
754
751
  if (idParts[0] == "cmdGoTime") {
752
+ // state.val needs to be a string, although the time is set in seconds
753
+ // when settings cmdGoTime via ioBroker.simple-api its not possible to submit a number as string
754
+ // if we receive a number, we need to cast this to a string
755
+ if (typeof state.val === "number") {
756
+ state.val = state.val.toString();
757
+ }
755
758
  if (state.val.trim() !== "" && !isNaN(state.val.trim())) {
756
759
  this.request(this.playerid, ["time", state.val.trim()]);
757
760
  this.setState(idParts[0], " ", this.statePath, this.playername, false);
package/lib/iosbserver.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  //const utils = require('@iobroker/adapter-core');
5
5
  const dgram = require('dgram');
6
- const SqueezeServer = require('squeezenode-oweitman');
6
+ const SqueezeServerNew = require(__dirname + '/squeezenode/squeezeserver');
7
7
  const ioSBPlayer = require(__dirname + '/iosbplayer');
8
8
 
9
9
  function IoSbServer(adapter) {
@@ -212,7 +212,7 @@ function IoSbServer(adapter) {
212
212
  this.adapter.setState('info.connection', false, true);
213
213
  this.adapter.subscribeStates('*');
214
214
 
215
- this.sbServer = (adapter.config.username != "") ? new SqueezeServer('http://' + this.adapter.config.server, Number.parseInt(this.adapter.config.port), adapter.config.username, adapter.config.password) : new SqueezeServer('http://' + this.adapter.config.server, Number.parseInt(this.adapter.config.port));
215
+ this.sbServer = (adapter.config.username != "") ? new SqueezeServerNew('http://' + this.adapter.config.server, Number.parseInt(this.adapter.config.port), adapter.config.username, adapter.config.password) : new SqueezeServerNew('http://' + this.adapter.config.server, Number.parseInt(this.adapter.config.port));
216
216
 
217
217
  this.log = {};
218
218
  this.islogsilly = this.adapter.config.outputserversilly;