iobroker.jellyfin 0.1.1 → 0.1.3
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/README.md +8 -0
- package/build/lib/names.js +599 -0
- package/build/lib/names.js.map +7 -0
- package/build/lib/objects.js +2 -1
- package/build/lib/objects.js.map +2 -2
- package/build/main.js +5 -2
- package/build/main.js.map +2 -2
- package/io-package.json +53 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -149,6 +149,14 @@ Jellyfin is a free software project. This adapter is not affiliated with or endo
|
|
|
149
149
|
Placeholder for the next version (at the beginning of the line):
|
|
150
150
|
### **WORK IN PROGRESS**
|
|
151
151
|
-->
|
|
152
|
+
### 0.1.3 (2026-11-01)
|
|
153
|
+
|
|
154
|
+
- (Schimi) Existing installations also get the translated names of `info` and `info.connection`
|
|
155
|
+
|
|
156
|
+
### 0.1.2 (2026-11-01)
|
|
157
|
+
|
|
158
|
+
- (Schimi) Object names are now translated into all 11 admin languages
|
|
159
|
+
|
|
152
160
|
### 0.1.1 (2026-10-31)
|
|
153
161
|
|
|
154
162
|
- (Schimi) Releases are now published by GitHub Actions (trusted publishing with provenance)
|
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var names_exports = {};
|
|
20
|
+
__export(names_exports, {
|
|
21
|
+
TRANSLATED_NAMES: () => TRANSLATED_NAMES,
|
|
22
|
+
tr: () => tr
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(names_exports);
|
|
25
|
+
const t = (en, de, ru, pt, nl, fr, it, es, pl, uk, zh) => ({ en, de, ru, pt, nl, fr, it, es, pl, uk, "zh-cn": zh });
|
|
26
|
+
const LIST = [
|
|
27
|
+
// channels
|
|
28
|
+
t(
|
|
29
|
+
"Information",
|
|
30
|
+
"Informationen",
|
|
31
|
+
"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",
|
|
32
|
+
"Informa\xE7\xF5es",
|
|
33
|
+
"Informatie",
|
|
34
|
+
"Informations",
|
|
35
|
+
"Informazioni",
|
|
36
|
+
"Informaci\xF3n",
|
|
37
|
+
"Informacje",
|
|
38
|
+
"\u0406\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u044F",
|
|
39
|
+
"\u4FE1\u606F"
|
|
40
|
+
),
|
|
41
|
+
t("Media", "Medien", "\u041C\u0435\u0434\u0438\u0430", "M\xEDdia", "Media", "M\xE9dia", "Media", "Medios", "Multimedia", "\u041C\u0435\u0434\u0456\u0430", "\u5A92\u4F53"),
|
|
42
|
+
t(
|
|
43
|
+
"Commands",
|
|
44
|
+
"Befehle",
|
|
45
|
+
"\u041A\u043E\u043C\u0430\u043D\u0434\u044B",
|
|
46
|
+
"Comandos",
|
|
47
|
+
"Opdrachten",
|
|
48
|
+
"Commandes",
|
|
49
|
+
"Comandi",
|
|
50
|
+
"Comandos",
|
|
51
|
+
"Polecenia",
|
|
52
|
+
"\u041A\u043E\u043C\u0430\u043D\u0434\u0438",
|
|
53
|
+
"\u547D\u4EE4"
|
|
54
|
+
),
|
|
55
|
+
t(
|
|
56
|
+
"Jellyfin server",
|
|
57
|
+
"Jellyfin-Server",
|
|
58
|
+
"\u0421\u0435\u0440\u0432\u0435\u0440 Jellyfin",
|
|
59
|
+
"Servidor Jellyfin",
|
|
60
|
+
"Jellyfin-server",
|
|
61
|
+
"Serveur Jellyfin",
|
|
62
|
+
"Server Jellyfin",
|
|
63
|
+
"Servidor Jellyfin",
|
|
64
|
+
"Serwer Jellyfin",
|
|
65
|
+
"\u0421\u0435\u0440\u0432\u0435\u0440 Jellyfin",
|
|
66
|
+
"Jellyfin \u670D\u52A1\u5668"
|
|
67
|
+
),
|
|
68
|
+
t(
|
|
69
|
+
"Connected to Jellyfin",
|
|
70
|
+
"Mit Jellyfin verbunden",
|
|
71
|
+
"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A Jellyfin",
|
|
72
|
+
"Conectado ao Jellyfin",
|
|
73
|
+
"Verbonden met Jellyfin",
|
|
74
|
+
"Connect\xE9 \xE0 Jellyfin",
|
|
75
|
+
"Connesso a Jellyfin",
|
|
76
|
+
"Conectado a Jellyfin",
|
|
77
|
+
"Po\u0142\u0105czono z Jellyfin",
|
|
78
|
+
"\u041F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u0434\u043E Jellyfin",
|
|
79
|
+
"\u5DF2\u8FDE\u63A5\u5230 Jellyfin"
|
|
80
|
+
),
|
|
81
|
+
// info
|
|
82
|
+
t(
|
|
83
|
+
"Device name",
|
|
84
|
+
"Ger\xE4tename",
|
|
85
|
+
"\u0418\u043C\u044F \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430",
|
|
86
|
+
"Nome do dispositivo",
|
|
87
|
+
"Apparaatnaam",
|
|
88
|
+
"Nom de l'appareil",
|
|
89
|
+
"Nome del dispositivo",
|
|
90
|
+
"Nombre del dispositivo",
|
|
91
|
+
"Nazwa urz\u0105dzenia",
|
|
92
|
+
"\u041D\u0430\u0437\u0432\u0430 \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u044E",
|
|
93
|
+
"\u8BBE\u5907\u540D\u79F0"
|
|
94
|
+
),
|
|
95
|
+
t(
|
|
96
|
+
"App",
|
|
97
|
+
"App",
|
|
98
|
+
"\u041F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435",
|
|
99
|
+
"Aplicativo",
|
|
100
|
+
"App",
|
|
101
|
+
"Application",
|
|
102
|
+
"App",
|
|
103
|
+
"Aplicaci\xF3n",
|
|
104
|
+
"Aplikacja",
|
|
105
|
+
"\u0417\u0430\u0441\u0442\u043E\u0441\u0443\u043D\u043E\u043A",
|
|
106
|
+
"\u5E94\u7528"
|
|
107
|
+
),
|
|
108
|
+
t(
|
|
109
|
+
"App version",
|
|
110
|
+
"App-Version",
|
|
111
|
+
"\u0412\u0435\u0440\u0441\u0438\u044F \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F",
|
|
112
|
+
"Vers\xE3o do aplicativo",
|
|
113
|
+
"App-versie",
|
|
114
|
+
"Version de l'application",
|
|
115
|
+
"Versione dell'app",
|
|
116
|
+
"Versi\xF3n de la aplicaci\xF3n",
|
|
117
|
+
"Wersja aplikacji",
|
|
118
|
+
"\u0412\u0435\u0440\u0441\u0456\u044F \u0437\u0430\u0441\u0442\u043E\u0441\u0443\u043D\u043A\u0443",
|
|
119
|
+
"\u5E94\u7528\u7248\u672C"
|
|
120
|
+
),
|
|
121
|
+
t(
|
|
122
|
+
"User",
|
|
123
|
+
"Benutzer",
|
|
124
|
+
"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C",
|
|
125
|
+
"Usu\xE1rio",
|
|
126
|
+
"Gebruiker",
|
|
127
|
+
"Utilisateur",
|
|
128
|
+
"Utente",
|
|
129
|
+
"Usuario",
|
|
130
|
+
"U\u017Cytkownik",
|
|
131
|
+
"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447",
|
|
132
|
+
"\u7528\u6237"
|
|
133
|
+
),
|
|
134
|
+
t(
|
|
135
|
+
"Connected to the server",
|
|
136
|
+
"Mit dem Server verbunden",
|
|
137
|
+
"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A \u0441\u0435\u0440\u0432\u0435\u0440\u0443",
|
|
138
|
+
"Conectado ao servidor",
|
|
139
|
+
"Verbonden met de server",
|
|
140
|
+
"Connect\xE9 au serveur",
|
|
141
|
+
"Connesso al server",
|
|
142
|
+
"Conectado al servidor",
|
|
143
|
+
"Po\u0142\u0105czono z serwerem",
|
|
144
|
+
"\u041F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u0434\u043E \u0441\u0435\u0440\u0432\u0435\u0440\u0430",
|
|
145
|
+
"\u5DF2\u8FDE\u63A5\u5230\u670D\u52A1\u5668"
|
|
146
|
+
),
|
|
147
|
+
t(
|
|
148
|
+
"Can be controlled remotely",
|
|
149
|
+
"Fernsteuerbar",
|
|
150
|
+
"\u041C\u043E\u0436\u043D\u043E \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u0443\u0434\u0430\u043B\u0451\u043D\u043D\u043E",
|
|
151
|
+
"Pode ser controlado remotamente",
|
|
152
|
+
"Op afstand bedienbaar",
|
|
153
|
+
"Contr\xF4lable \xE0 distance",
|
|
154
|
+
"Controllabile da remoto",
|
|
155
|
+
"Se puede controlar a distancia",
|
|
156
|
+
"Mo\u017Cna sterowa\u0107 zdalnie",
|
|
157
|
+
"\u041C\u043E\u0436\u043D\u0430 \u043A\u0435\u0440\u0443\u0432\u0430\u0442\u0438 \u0434\u0438\u0441\u0442\u0430\u043D\u0446\u0456\u0439\u043D\u043E",
|
|
158
|
+
"\u53EF\u8FDC\u7A0B\u63A7\u5236"
|
|
159
|
+
),
|
|
160
|
+
t(
|
|
161
|
+
"Last activity",
|
|
162
|
+
"Letzte Aktivit\xE4t",
|
|
163
|
+
"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C",
|
|
164
|
+
"\xDAltima atividade",
|
|
165
|
+
"Laatste activiteit",
|
|
166
|
+
"Derni\xE8re activit\xE9",
|
|
167
|
+
"Ultima attivit\xE0",
|
|
168
|
+
"\xDAltima actividad",
|
|
169
|
+
"Ostatnia aktywno\u015B\u0107",
|
|
170
|
+
"\u041E\u0441\u0442\u0430\u043D\u043D\u044F \u0430\u043A\u0442\u0438\u0432\u043D\u0456\u0441\u0442\u044C",
|
|
171
|
+
"\u6700\u540E\u6D3B\u52A8"
|
|
172
|
+
),
|
|
173
|
+
// media
|
|
174
|
+
t(
|
|
175
|
+
"Playback state",
|
|
176
|
+
"Wiedergabestatus",
|
|
177
|
+
"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0432\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0434\u0435\u043D\u0438\u044F",
|
|
178
|
+
"Estado da reprodu\xE7\xE3o",
|
|
179
|
+
"Afspeelstatus",
|
|
180
|
+
"\xC9tat de lecture",
|
|
181
|
+
"Stato di riproduzione",
|
|
182
|
+
"Estado de reproducci\xF3n",
|
|
183
|
+
"Stan odtwarzania",
|
|
184
|
+
"\u0421\u0442\u0430\u043D \u0432\u0456\u0434\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F",
|
|
185
|
+
"\u64AD\u653E\u72B6\u6001"
|
|
186
|
+
),
|
|
187
|
+
t("Title", "Titel", "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435", "T\xEDtulo", "Titel", "Titre", "Titolo", "T\xEDtulo", "Tytu\u0142", "\u041D\u0430\u0437\u0432\u0430", "\u6807\u9898"),
|
|
188
|
+
t(
|
|
189
|
+
"Media type",
|
|
190
|
+
"Medientyp",
|
|
191
|
+
"\u0422\u0438\u043F \u043C\u0435\u0434\u0438\u0430",
|
|
192
|
+
"Tipo de m\xEDdia",
|
|
193
|
+
"Mediatype",
|
|
194
|
+
"Type de m\xE9dia",
|
|
195
|
+
"Tipo di media",
|
|
196
|
+
"Tipo de medio",
|
|
197
|
+
"Typ multimedi\xF3w",
|
|
198
|
+
"\u0422\u0438\u043F \u043C\u0435\u0434\u0456\u0430",
|
|
199
|
+
"\u5A92\u4F53\u7C7B\u578B"
|
|
200
|
+
),
|
|
201
|
+
t("Series", "Serie", "\u0421\u0435\u0440\u0438\u0430\u043B", "S\xE9rie", "Serie", "S\xE9rie", "Serie", "Serie", "Serial", "\u0421\u0435\u0440\u0456\u0430\u043B", "\u5267\u96C6"),
|
|
202
|
+
t("Season", "Staffel", "\u0421\u0435\u0437\u043E\u043D", "Temporada", "Seizoen", "Saison", "Stagione", "Temporada", "Sezon", "\u0421\u0435\u0437\u043E\u043D", "\u5B63"),
|
|
203
|
+
t(
|
|
204
|
+
"Episode",
|
|
205
|
+
"Folge",
|
|
206
|
+
"\u042D\u043F\u0438\u0437\u043E\u0434",
|
|
207
|
+
"Epis\xF3dio",
|
|
208
|
+
"Aflevering",
|
|
209
|
+
"\xC9pisode",
|
|
210
|
+
"Episodio",
|
|
211
|
+
"Episodio",
|
|
212
|
+
"Odcinek",
|
|
213
|
+
"\u0415\u043F\u0456\u0437\u043E\u0434",
|
|
214
|
+
"\u96C6"
|
|
215
|
+
),
|
|
216
|
+
t(
|
|
217
|
+
"Artist",
|
|
218
|
+
"Interpret",
|
|
219
|
+
"\u0418\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C",
|
|
220
|
+
"Artista",
|
|
221
|
+
"Artiest",
|
|
222
|
+
"Artiste",
|
|
223
|
+
"Artista",
|
|
224
|
+
"Artista",
|
|
225
|
+
"Wykonawca",
|
|
226
|
+
"\u0412\u0438\u043A\u043E\u043D\u0430\u0432\u0435\u0446\u044C",
|
|
227
|
+
"\u827A\u672F\u5BB6"
|
|
228
|
+
),
|
|
229
|
+
t("Album", "Album", "\u0410\u043B\u044C\u0431\u043E\u043C", "\xC1lbum", "Album", "Album", "Album", "\xC1lbum", "Album", "\u0410\u043B\u044C\u0431\u043E\u043C", "\u4E13\u8F91"),
|
|
230
|
+
t("Genre", "Genre", "\u0416\u0430\u043D\u0440", "G\xEAnero", "Genre", "Genre", "Genere", "G\xE9nero", "Gatunek", "\u0416\u0430\u043D\u0440", "\u7C7B\u578B"),
|
|
231
|
+
t("Year", "Jahr", "\u0413\u043E\u0434", "Ano", "Jaar", "Ann\xE9e", "Anno", "A\xF1o", "Rok", "\u0420\u0456\u043A", "\u5E74\u4EFD"),
|
|
232
|
+
t(
|
|
233
|
+
"Jellyfin id of the item",
|
|
234
|
+
"Jellyfin-ID des Eintrags",
|
|
235
|
+
"Jellyfin-ID \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",
|
|
236
|
+
"ID Jellyfin do item",
|
|
237
|
+
"Jellyfin-id van het item",
|
|
238
|
+
"ID Jellyfin de l'\xE9l\xE9ment",
|
|
239
|
+
"ID Jellyfin dell'elemento",
|
|
240
|
+
"ID de Jellyfin del elemento",
|
|
241
|
+
"Identyfikator Jellyfin elementu",
|
|
242
|
+
"Jellyfin-ID \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",
|
|
243
|
+
"\u9879\u76EE\u7684 Jellyfin ID"
|
|
244
|
+
),
|
|
245
|
+
t(
|
|
246
|
+
"Cover URL",
|
|
247
|
+
"Cover-Adresse",
|
|
248
|
+
"URL \u043E\u0431\u043B\u043E\u0436\u043A\u0438",
|
|
249
|
+
"URL da capa",
|
|
250
|
+
"Cover-URL",
|
|
251
|
+
"URL de la pochette",
|
|
252
|
+
"URL della copertina",
|
|
253
|
+
"URL de la car\xE1tula",
|
|
254
|
+
"Adres URL ok\u0142adki",
|
|
255
|
+
"URL \u043E\u0431\u043A\u043B\u0430\u0434\u0438\u043D\u043A\u0438",
|
|
256
|
+
"\u5C01\u9762\u7F51\u5740"
|
|
257
|
+
),
|
|
258
|
+
t(
|
|
259
|
+
"Duration",
|
|
260
|
+
"Dauer",
|
|
261
|
+
"\u0414\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",
|
|
262
|
+
"Dura\xE7\xE3o",
|
|
263
|
+
"Duur",
|
|
264
|
+
"Dur\xE9e",
|
|
265
|
+
"Durata",
|
|
266
|
+
"Duraci\xF3n",
|
|
267
|
+
"Czas trwania",
|
|
268
|
+
"\u0422\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C",
|
|
269
|
+
"\u65F6\u957F"
|
|
270
|
+
),
|
|
271
|
+
t(
|
|
272
|
+
"Position",
|
|
273
|
+
"Position",
|
|
274
|
+
"\u041F\u043E\u0437\u0438\u0446\u0438\u044F",
|
|
275
|
+
"Posi\xE7\xE3o",
|
|
276
|
+
"Positie",
|
|
277
|
+
"Position",
|
|
278
|
+
"Posizione",
|
|
279
|
+
"Posici\xF3n",
|
|
280
|
+
"Pozycja",
|
|
281
|
+
"\u041F\u043E\u0437\u0438\u0446\u0456\u044F",
|
|
282
|
+
"\u4F4D\u7F6E"
|
|
283
|
+
),
|
|
284
|
+
t(
|
|
285
|
+
"Position in percent (write to jump)",
|
|
286
|
+
"Position in Prozent (schreiben zum Springen)",
|
|
287
|
+
"\u041F\u043E\u0437\u0438\u0446\u0438\u044F \u0432 \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u0430\u0445 (\u0437\u0430\u043F\u0438\u0448\u0438\u0442\u0435 \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430)",
|
|
288
|
+
"Posi\xE7\xE3o em percentagem (escrever para saltar)",
|
|
289
|
+
"Positie in procent (schrijven om te springen)",
|
|
290
|
+
"Position en pourcentage (\xE9crire pour sauter)",
|
|
291
|
+
"Posizione in percentuale (scrivere per saltare)",
|
|
292
|
+
"Posici\xF3n en porcentaje (escribir para saltar)",
|
|
293
|
+
"Pozycja w procentach (zapisz, aby przeskoczy\u0107)",
|
|
294
|
+
"\u041F\u043E\u0437\u0438\u0446\u0456\u044F \u0443 \u0432\u0456\u0434\u0441\u043E\u0442\u043A\u0430\u0445 (\u0437\u0430\u043F\u0438\u0448\u0456\u0442\u044C \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0443)",
|
|
295
|
+
"\u4F4D\u7F6E\u767E\u5206\u6BD4\uFF08\u5199\u5165\u4EE5\u8DF3\u8F6C\uFF09"
|
|
296
|
+
),
|
|
297
|
+
t(
|
|
298
|
+
"Volume",
|
|
299
|
+
"Lautst\xE4rke",
|
|
300
|
+
"\u0413\u0440\u043E\u043C\u043A\u043E\u0441\u0442\u044C",
|
|
301
|
+
"Volume",
|
|
302
|
+
"Volume",
|
|
303
|
+
"Volume",
|
|
304
|
+
"Volume",
|
|
305
|
+
"Volumen",
|
|
306
|
+
"G\u0142o\u015Bno\u015B\u0107",
|
|
307
|
+
"\u0413\u0443\u0447\u043D\u0456\u0441\u0442\u044C",
|
|
308
|
+
"\u97F3\u91CF"
|
|
309
|
+
),
|
|
310
|
+
t(
|
|
311
|
+
"Muted",
|
|
312
|
+
"Stumm",
|
|
313
|
+
"\u0411\u0435\u0437 \u0437\u0432\u0443\u043A\u0430",
|
|
314
|
+
"Sem som",
|
|
315
|
+
"Gedempt",
|
|
316
|
+
"Muet",
|
|
317
|
+
"Muto",
|
|
318
|
+
"Silenciado",
|
|
319
|
+
"Wyciszony",
|
|
320
|
+
"\u0411\u0435\u0437 \u0437\u0432\u0443\u043A\u0443",
|
|
321
|
+
"\u9759\u97F3"
|
|
322
|
+
),
|
|
323
|
+
t(
|
|
324
|
+
"Repeat",
|
|
325
|
+
"Wiederholen",
|
|
326
|
+
"\u041F\u043E\u0432\u0442\u043E\u0440",
|
|
327
|
+
"Repetir",
|
|
328
|
+
"Herhalen",
|
|
329
|
+
"R\xE9p\xE9ter",
|
|
330
|
+
"Ripeti",
|
|
331
|
+
"Repetir",
|
|
332
|
+
"Powtarzanie",
|
|
333
|
+
"\u041F\u043E\u0432\u0442\u043E\u0440",
|
|
334
|
+
"\u91CD\u590D"
|
|
335
|
+
),
|
|
336
|
+
// commands
|
|
337
|
+
t(
|
|
338
|
+
"Play",
|
|
339
|
+
"Abspielen",
|
|
340
|
+
"\u0412\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0441\u0442\u0438",
|
|
341
|
+
"Reproduzir",
|
|
342
|
+
"Afspelen",
|
|
343
|
+
"Lecture",
|
|
344
|
+
"Riproduci",
|
|
345
|
+
"Reproducir",
|
|
346
|
+
"Odtw\xF3rz",
|
|
347
|
+
"\u0412\u0456\u0434\u0442\u0432\u043E\u0440\u0438\u0442\u0438",
|
|
348
|
+
"\u64AD\u653E"
|
|
349
|
+
),
|
|
350
|
+
t("Pause", "Pause", "\u041F\u0430\u0443\u0437\u0430", "Pausa", "Pauze", "Pause", "Pausa", "Pausa", "Pauza", "\u041F\u0430\u0443\u0437\u0430", "\u6682\u505C"),
|
|
351
|
+
t(
|
|
352
|
+
"Play / pause",
|
|
353
|
+
"Abspielen / Pause",
|
|
354
|
+
"\u0412\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0434\u0435\u043D\u0438\u0435 / \u043F\u0430\u0443\u0437\u0430",
|
|
355
|
+
"Reproduzir / pausa",
|
|
356
|
+
"Afspelen / pauze",
|
|
357
|
+
"Lecture / pause",
|
|
358
|
+
"Riproduci / pausa",
|
|
359
|
+
"Reproducir / pausa",
|
|
360
|
+
"Odtw\xF3rz / pauza",
|
|
361
|
+
"\u0412\u0456\u0434\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F / \u043F\u0430\u0443\u0437\u0430",
|
|
362
|
+
"\u64AD\u653E / \u6682\u505C"
|
|
363
|
+
),
|
|
364
|
+
t("Stop", "Stopp", "\u0421\u0442\u043E\u043F", "Parar", "Stoppen", "Arr\xEAt", "Stop", "Detener", "Zatrzymaj", "\u0421\u0442\u043E\u043F", "\u505C\u6B62"),
|
|
365
|
+
t(
|
|
366
|
+
"Next",
|
|
367
|
+
"Weiter",
|
|
368
|
+
"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439",
|
|
369
|
+
"Pr\xF3ximo",
|
|
370
|
+
"Volgende",
|
|
371
|
+
"Suivant",
|
|
372
|
+
"Successivo",
|
|
373
|
+
"Siguiente",
|
|
374
|
+
"Nast\u0119pny",
|
|
375
|
+
"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0438\u0439",
|
|
376
|
+
"\u4E0B\u4E00\u4E2A"
|
|
377
|
+
),
|
|
378
|
+
t(
|
|
379
|
+
"Previous",
|
|
380
|
+
"Zur\xFCck",
|
|
381
|
+
"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439",
|
|
382
|
+
"Anterior",
|
|
383
|
+
"Vorige",
|
|
384
|
+
"Pr\xE9c\xE9dent",
|
|
385
|
+
"Precedente",
|
|
386
|
+
"Anterior",
|
|
387
|
+
"Poprzedni",
|
|
388
|
+
"\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456\u0439",
|
|
389
|
+
"\u4E0A\u4E00\u4E2A"
|
|
390
|
+
),
|
|
391
|
+
t(
|
|
392
|
+
"Skip forward",
|
|
393
|
+
"Vorspulen",
|
|
394
|
+
"\u041F\u0435\u0440\u0435\u043C\u043E\u0442\u0430\u0442\u044C \u0432\u043F\u0435\u0440\u0451\u0434",
|
|
395
|
+
"Avan\xE7ar",
|
|
396
|
+
"Vooruitspoelen",
|
|
397
|
+
"Avance rapide",
|
|
398
|
+
"Avanti veloce",
|
|
399
|
+
"Avanzar",
|
|
400
|
+
"Przewi\u0144 do przodu",
|
|
401
|
+
"\u041F\u0435\u0440\u0435\u043C\u043E\u0442\u0430\u0442\u0438 \u0432\u043F\u0435\u0440\u0435\u0434",
|
|
402
|
+
"\u5FEB\u8FDB"
|
|
403
|
+
),
|
|
404
|
+
t(
|
|
405
|
+
"Skip back",
|
|
406
|
+
"Zur\xFCckspulen",
|
|
407
|
+
"\u041F\u0435\u0440\u0435\u043C\u043E\u0442\u0430\u0442\u044C \u043D\u0430\u0437\u0430\u0434",
|
|
408
|
+
"Retroceder",
|
|
409
|
+
"Terugspoelen",
|
|
410
|
+
"Retour rapide",
|
|
411
|
+
"Indietro veloce",
|
|
412
|
+
"Retroceder",
|
|
413
|
+
"Przewi\u0144 do ty\u0142u",
|
|
414
|
+
"\u041F\u0435\u0440\u0435\u043C\u043E\u0442\u0430\u0442\u0438 \u043D\u0430\u0437\u0430\u0434",
|
|
415
|
+
"\u5FEB\u9000"
|
|
416
|
+
),
|
|
417
|
+
t(
|
|
418
|
+
"Volume up",
|
|
419
|
+
"Lauter",
|
|
420
|
+
"\u0413\u0440\u043E\u043C\u0447\u0435",
|
|
421
|
+
"Aumentar volume",
|
|
422
|
+
"Volume omhoog",
|
|
423
|
+
"Volume +",
|
|
424
|
+
"Volume su",
|
|
425
|
+
"Subir volumen",
|
|
426
|
+
"G\u0142o\u015Bniej",
|
|
427
|
+
"\u0413\u0443\u0447\u043D\u0456\u0448\u0435",
|
|
428
|
+
"\u97F3\u91CF\u52A0"
|
|
429
|
+
),
|
|
430
|
+
t(
|
|
431
|
+
"Volume down",
|
|
432
|
+
"Leiser",
|
|
433
|
+
"\u0422\u0438\u0448\u0435",
|
|
434
|
+
"Diminuir volume",
|
|
435
|
+
"Volume omlaag",
|
|
436
|
+
"Volume -",
|
|
437
|
+
"Volume gi\xF9",
|
|
438
|
+
"Bajar volumen",
|
|
439
|
+
"Ciszej",
|
|
440
|
+
"\u0422\u0438\u0445\u0456\u0448\u0435",
|
|
441
|
+
"\u97F3\u91CF\u51CF"
|
|
442
|
+
),
|
|
443
|
+
t(
|
|
444
|
+
"Mute on/off",
|
|
445
|
+
"Stumm an/aus",
|
|
446
|
+
"\u0417\u0432\u0443\u043A \u0432\u043A\u043B/\u0432\u044B\u043A\u043B",
|
|
447
|
+
"Mudo lig/desl",
|
|
448
|
+
"Dempen aan/uit",
|
|
449
|
+
"Muet on/off",
|
|
450
|
+
"Muto on/off",
|
|
451
|
+
"Silencio s\xED/no",
|
|
452
|
+
"Wycisz w\u0142./wy\u0142.",
|
|
453
|
+
"\u0411\u0435\u0437 \u0437\u0432\u0443\u043A\u0443 \u0443\u0432\u0456\u043C\u043A./\u0432\u0438\u043C\u043A.",
|
|
454
|
+
"\u9759\u97F3\u5F00/\u5173"
|
|
455
|
+
),
|
|
456
|
+
t(
|
|
457
|
+
"Play a film, episode or song by its title (or item id)",
|
|
458
|
+
"Film, Folge oder Lied \xFCber den Titel (oder die ID) abspielen",
|
|
459
|
+
"\u0412\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0444\u0438\u043B\u044C\u043C, \u044D\u043F\u0438\u0437\u043E\u0434 \u0438\u043B\u0438 \u043F\u0435\u0441\u043D\u044E \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044E (\u0438\u043B\u0438 ID)",
|
|
460
|
+
"Reproduzir um filme, epis\xF3dio ou m\xFAsica pelo t\xEDtulo (ou ID)",
|
|
461
|
+
"Een film, aflevering of nummer afspelen op titel (of id)",
|
|
462
|
+
"Lire un film, un \xE9pisode ou une chanson par son titre (ou son ID)",
|
|
463
|
+
"Riproduci un film, un episodio o un brano per titolo (o ID)",
|
|
464
|
+
"Reproducir una pel\xEDcula, episodio o canci\xF3n por su t\xEDtulo (o ID)",
|
|
465
|
+
"Odtw\xF3rz film, odcinek lub utw\xF3r wed\u0142ug tytu\u0142u (lub ID)",
|
|
466
|
+
"\u0412\u0456\u0434\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u0444\u0456\u043B\u044C\u043C, \u0435\u043F\u0456\u0437\u043E\u0434 \u0430\u0431\u043E \u043F\u0456\u0441\u043D\u044E \u0437\u0430 \u043D\u0430\u0437\u0432\u043E\u044E (\u0430\u0431\u043E ID)",
|
|
467
|
+
"\u6309\u6807\u9898\uFF08\u6216 ID\uFF09\u64AD\u653E\u7535\u5F71\u3001\u5267\u96C6\u6216\u6B4C\u66F2"
|
|
468
|
+
),
|
|
469
|
+
t(
|
|
470
|
+
"Show message on the screen",
|
|
471
|
+
"Meldung auf dem Bildschirm anzeigen",
|
|
472
|
+
"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0430 \u044D\u043A\u0440\u0430\u043D\u0435",
|
|
473
|
+
"Mostrar mensagem na tela",
|
|
474
|
+
"Bericht op het scherm tonen",
|
|
475
|
+
"Afficher un message \xE0 l'\xE9cran",
|
|
476
|
+
"Mostra messaggio sullo schermo",
|
|
477
|
+
"Mostrar mensaje en la pantalla",
|
|
478
|
+
"Poka\u017C wiadomo\u015B\u0107 na ekranie",
|
|
479
|
+
"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u043F\u043E\u0432\u0456\u0434\u043E\u043C\u043B\u0435\u043D\u043D\u044F \u043D\u0430 \u0435\u043A\u0440\u0430\u043D\u0456",
|
|
480
|
+
"\u5728\u5C4F\u5E55\u4E0A\u663E\u793A\u6D88\u606F"
|
|
481
|
+
),
|
|
482
|
+
t(
|
|
483
|
+
'Send command (e.g. GoHome or {"Name":"SetVolume","Arguments":{"Volume":"50"}})',
|
|
484
|
+
'Befehl senden (z. B. GoHome oder {"Name":"SetVolume","Arguments":{"Volume":"50"}})',
|
|
485
|
+
'\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 (\u043D\u0430\u043F\u0440. GoHome \u0438\u043B\u0438 {"Name":"SetVolume","Arguments":{"Volume":"50"}})',
|
|
486
|
+
'Enviar comando (ex. GoHome ou {"Name":"SetVolume","Arguments":{"Volume":"50"}})',
|
|
487
|
+
'Opdracht sturen (bijv. GoHome of {"Name":"SetVolume","Arguments":{"Volume":"50"}})',
|
|
488
|
+
'Envoyer une commande (ex. GoHome ou {"Name":"SetVolume","Arguments":{"Volume":"50"}})',
|
|
489
|
+
'Invia comando (ad es. GoHome o {"Name":"SetVolume","Arguments":{"Volume":"50"}})',
|
|
490
|
+
'Enviar comando (p. ej. GoHome o {"Name":"SetVolume","Arguments":{"Volume":"50"}})',
|
|
491
|
+
'Wy\u015Blij polecenie (np. GoHome lub {"Name":"SetVolume","Arguments":{"Volume":"50"}})',
|
|
492
|
+
'\u041D\u0430\u0434\u0456\u0441\u043B\u0430\u0442\u0438 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 (\u043D\u0430\u043F\u0440. GoHome \u0430\u0431\u043E {"Name":"SetVolume","Arguments":{"Volume":"50"}})',
|
|
493
|
+
'\u53D1\u9001\u547D\u4EE4\uFF08\u4F8B\u5982 GoHome \u6216 {"Name":"SetVolume","Arguments":{"Volume":"50"}}\uFF09'
|
|
494
|
+
),
|
|
495
|
+
// server
|
|
496
|
+
t(
|
|
497
|
+
"Server name",
|
|
498
|
+
"Servername",
|
|
499
|
+
"\u0418\u043C\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u0430",
|
|
500
|
+
"Nome do servidor",
|
|
501
|
+
"Servernaam",
|
|
502
|
+
"Nom du serveur",
|
|
503
|
+
"Nome del server",
|
|
504
|
+
"Nombre del servidor",
|
|
505
|
+
"Nazwa serwera",
|
|
506
|
+
"\u041D\u0430\u0437\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430",
|
|
507
|
+
"\u670D\u52A1\u5668\u540D\u79F0"
|
|
508
|
+
),
|
|
509
|
+
t(
|
|
510
|
+
"Server version",
|
|
511
|
+
"Server-Version",
|
|
512
|
+
"\u0412\u0435\u0440\u0441\u0438\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u0430",
|
|
513
|
+
"Vers\xE3o do servidor",
|
|
514
|
+
"Serverversie",
|
|
515
|
+
"Version du serveur",
|
|
516
|
+
"Versione del server",
|
|
517
|
+
"Versi\xF3n del servidor",
|
|
518
|
+
"Wersja serwera",
|
|
519
|
+
"\u0412\u0435\u0440\u0441\u0456\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u0430",
|
|
520
|
+
"\u670D\u52A1\u5668\u7248\u672C"
|
|
521
|
+
),
|
|
522
|
+
t(
|
|
523
|
+
"Update available",
|
|
524
|
+
"Update verf\xFCgbar",
|
|
525
|
+
"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435",
|
|
526
|
+
"Atualiza\xE7\xE3o dispon\xEDvel",
|
|
527
|
+
"Update beschikbaar",
|
|
528
|
+
"Mise \xE0 jour disponible",
|
|
529
|
+
"Aggiornamento disponibile",
|
|
530
|
+
"Actualizaci\xF3n disponible",
|
|
531
|
+
"Dost\u0119pna aktualizacja",
|
|
532
|
+
"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u0435 \u043E\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u044F",
|
|
533
|
+
"\u6709\u53EF\u7528\u66F4\u65B0"
|
|
534
|
+
),
|
|
535
|
+
t(
|
|
536
|
+
"Restart required",
|
|
537
|
+
"Neustart erforderlich",
|
|
538
|
+
"\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u043A",
|
|
539
|
+
"Rein\xEDcio necess\xE1rio",
|
|
540
|
+
"Herstart vereist",
|
|
541
|
+
"Red\xE9marrage requis",
|
|
542
|
+
"Riavvio necessario",
|
|
543
|
+
"Reinicio necesario",
|
|
544
|
+
"Wymagany restart",
|
|
545
|
+
"\u041F\u043E\u0442\u0440\u0456\u0431\u0435\u043D \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u043A",
|
|
546
|
+
"\u9700\u8981\u91CD\u542F"
|
|
547
|
+
),
|
|
548
|
+
t(
|
|
549
|
+
"Connected devices",
|
|
550
|
+
"Verbundene Ger\xE4te",
|
|
551
|
+
"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u044B\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430",
|
|
552
|
+
"Dispositivos conectados",
|
|
553
|
+
"Verbonden apparaten",
|
|
554
|
+
"Appareils connect\xE9s",
|
|
555
|
+
"Dispositivi connessi",
|
|
556
|
+
"Dispositivos conectados",
|
|
557
|
+
"Po\u0142\u0105czone urz\u0105dzenia",
|
|
558
|
+
"\u041F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0456 \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u0457",
|
|
559
|
+
"\u5DF2\u8FDE\u63A5\u8BBE\u5907"
|
|
560
|
+
),
|
|
561
|
+
t(
|
|
562
|
+
"Devices playing",
|
|
563
|
+
"Abspielende Ger\xE4te",
|
|
564
|
+
"\u0412\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u044F\u0449\u0438\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430",
|
|
565
|
+
"Dispositivos reproduzindo",
|
|
566
|
+
"Afspelende apparaten",
|
|
567
|
+
"Appareils en lecture",
|
|
568
|
+
"Dispositivi in riproduzione",
|
|
569
|
+
"Dispositivos reproduciendo",
|
|
570
|
+
"Odtwarzaj\u0105ce urz\u0105dzenia",
|
|
571
|
+
"\u041F\u0440\u0438\u0441\u0442\u0440\u043E\u0457, \u0449\u043E \u0432\u0456\u0434\u0442\u0432\u043E\u0440\u044E\u044E\u0442\u044C",
|
|
572
|
+
"\u6B63\u5728\u64AD\u653E\u7684\u8BBE\u5907"
|
|
573
|
+
),
|
|
574
|
+
t(
|
|
575
|
+
"Scan all libraries",
|
|
576
|
+
"Alle Bibliotheken einlesen",
|
|
577
|
+
"\u0421\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0438",
|
|
578
|
+
"Analisar todas as bibliotecas",
|
|
579
|
+
"Alle bibliotheken scannen",
|
|
580
|
+
"Analyser toutes les biblioth\xE8ques",
|
|
581
|
+
"Scansiona tutte le librerie",
|
|
582
|
+
"Escanear todas las bibliotecas",
|
|
583
|
+
"Skanuj wszystkie biblioteki",
|
|
584
|
+
"\u0421\u043A\u0430\u043D\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0456 \u0431\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0438",
|
|
585
|
+
"\u626B\u63CF\u6240\u6709\u5A92\u4F53\u5E93"
|
|
586
|
+
)
|
|
587
|
+
];
|
|
588
|
+
const NAMES = new Map(LIST.map((n) => [n.en, n]));
|
|
589
|
+
function tr(en) {
|
|
590
|
+
var _a;
|
|
591
|
+
return (_a = NAMES.get(en)) != null ? _a : en;
|
|
592
|
+
}
|
|
593
|
+
const TRANSLATED_NAMES = new Set(NAMES.keys());
|
|
594
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
595
|
+
0 && (module.exports = {
|
|
596
|
+
TRANSLATED_NAMES,
|
|
597
|
+
tr
|
|
598
|
+
});
|
|
599
|
+
//# sourceMappingURL=names.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/lib/names.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Translations of all object names (common.name) in the 11 admin languages.\n * Keyed by the English name used in objects.ts / main.ts.\n */\n\n// @KI_HINWEIS: The ioBroker object check (E6001) requires translated names for all adapter objects.\n// Kept as data only, so objects.ts stays readable and a new name only needs one entry here.\n\n/** One translated name. */\nexport type TranslatedName = ioBroker.Translated & { en: string };\n\nconst t = (\n en: string,\n de: string,\n ru: string,\n pt: string,\n nl: string,\n fr: string,\n it: string,\n es: string,\n pl: string,\n uk: string,\n zh: string,\n): TranslatedName => ({ en, de, ru, pt, nl, fr, it, es, pl, uk, 'zh-cn': zh });\n\nconst LIST: TranslatedName[] = [\n // channels\n t(\n 'Information',\n 'Informationen',\n '\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F',\n 'Informa\u00E7\u00F5es',\n 'Informatie',\n 'Informations',\n 'Informazioni',\n 'Informaci\u00F3n',\n 'Informacje',\n '\u0406\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u044F',\n '\u4FE1\u606F',\n ),\n t('Media', 'Medien', '\u041C\u0435\u0434\u0438\u0430', 'M\u00EDdia', 'Media', 'M\u00E9dia', 'Media', 'Medios', 'Multimedia', '\u041C\u0435\u0434\u0456\u0430', '\u5A92\u4F53'),\n t(\n 'Commands',\n 'Befehle',\n '\u041A\u043E\u043C\u0430\u043D\u0434\u044B',\n 'Comandos',\n 'Opdrachten',\n 'Commandes',\n 'Comandi',\n 'Comandos',\n 'Polecenia',\n '\u041A\u043E\u043C\u0430\u043D\u0434\u0438',\n '\u547D\u4EE4',\n ),\n t(\n 'Jellyfin server',\n 'Jellyfin-Server',\n '\u0421\u0435\u0440\u0432\u0435\u0440 Jellyfin',\n 'Servidor Jellyfin',\n 'Jellyfin-server',\n 'Serveur Jellyfin',\n 'Server Jellyfin',\n 'Servidor Jellyfin',\n 'Serwer Jellyfin',\n '\u0421\u0435\u0440\u0432\u0435\u0440 Jellyfin',\n 'Jellyfin \u670D\u52A1\u5668',\n ),\n t(\n 'Connected to Jellyfin',\n 'Mit Jellyfin verbunden',\n '\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A Jellyfin',\n 'Conectado ao Jellyfin',\n 'Verbonden met Jellyfin',\n 'Connect\u00E9 \u00E0 Jellyfin',\n 'Connesso a Jellyfin',\n 'Conectado a Jellyfin',\n 'Po\u0142\u0105czono z Jellyfin',\n '\u041F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u0434\u043E Jellyfin',\n '\u5DF2\u8FDE\u63A5\u5230 Jellyfin',\n ),\n // info\n t(\n 'Device name',\n 'Ger\u00E4tename',\n '\u0418\u043C\u044F \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430',\n 'Nome do dispositivo',\n 'Apparaatnaam',\n \"Nom de l'appareil\",\n 'Nome del dispositivo',\n 'Nombre del dispositivo',\n 'Nazwa urz\u0105dzenia',\n '\u041D\u0430\u0437\u0432\u0430 \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u044E',\n '\u8BBE\u5907\u540D\u79F0',\n ),\n t(\n 'App',\n 'App',\n '\u041F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435',\n 'Aplicativo',\n 'App',\n 'Application',\n 'App',\n 'Aplicaci\u00F3n',\n 'Aplikacja',\n '\u0417\u0430\u0441\u0442\u043E\u0441\u0443\u043D\u043E\u043A',\n '\u5E94\u7528',\n ),\n t(\n 'App version',\n 'App-Version',\n '\u0412\u0435\u0440\u0441\u0438\u044F \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F',\n 'Vers\u00E3o do aplicativo',\n 'App-versie',\n \"Version de l'application\",\n \"Versione dell'app\",\n 'Versi\u00F3n de la aplicaci\u00F3n',\n 'Wersja aplikacji',\n '\u0412\u0435\u0440\u0441\u0456\u044F \u0437\u0430\u0441\u0442\u043E\u0441\u0443\u043D\u043A\u0443',\n '\u5E94\u7528\u7248\u672C',\n ),\n t(\n 'User',\n 'Benutzer',\n '\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C',\n 'Usu\u00E1rio',\n 'Gebruiker',\n 'Utilisateur',\n 'Utente',\n 'Usuario',\n 'U\u017Cytkownik',\n '\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447',\n '\u7528\u6237',\n ),\n t(\n 'Connected to the server',\n 'Mit dem Server verbunden',\n '\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A \u0441\u0435\u0440\u0432\u0435\u0440\u0443',\n 'Conectado ao servidor',\n 'Verbonden met de server',\n 'Connect\u00E9 au serveur',\n 'Connesso al server',\n 'Conectado al servidor',\n 'Po\u0142\u0105czono z serwerem',\n '\u041F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u0434\u043E \u0441\u0435\u0440\u0432\u0435\u0440\u0430',\n '\u5DF2\u8FDE\u63A5\u5230\u670D\u52A1\u5668',\n ),\n t(\n 'Can be controlled remotely',\n 'Fernsteuerbar',\n '\u041C\u043E\u0436\u043D\u043E \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u0443\u0434\u0430\u043B\u0451\u043D\u043D\u043E',\n 'Pode ser controlado remotamente',\n 'Op afstand bedienbaar',\n 'Contr\u00F4lable \u00E0 distance',\n 'Controllabile da remoto',\n 'Se puede controlar a distancia',\n 'Mo\u017Cna sterowa\u0107 zdalnie',\n '\u041C\u043E\u0436\u043D\u0430 \u043A\u0435\u0440\u0443\u0432\u0430\u0442\u0438 \u0434\u0438\u0441\u0442\u0430\u043D\u0446\u0456\u0439\u043D\u043E',\n '\u53EF\u8FDC\u7A0B\u63A7\u5236',\n ),\n t(\n 'Last activity',\n 'Letzte Aktivit\u00E4t',\n '\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C',\n '\u00DAltima atividade',\n 'Laatste activiteit',\n 'Derni\u00E8re activit\u00E9',\n 'Ultima attivit\u00E0',\n '\u00DAltima actividad',\n 'Ostatnia aktywno\u015B\u0107',\n '\u041E\u0441\u0442\u0430\u043D\u043D\u044F \u0430\u043A\u0442\u0438\u0432\u043D\u0456\u0441\u0442\u044C',\n '\u6700\u540E\u6D3B\u52A8',\n ),\n // media\n t(\n 'Playback state',\n 'Wiedergabestatus',\n '\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0432\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0434\u0435\u043D\u0438\u044F',\n 'Estado da reprodu\u00E7\u00E3o',\n 'Afspeelstatus',\n '\u00C9tat de lecture',\n 'Stato di riproduzione',\n 'Estado de reproducci\u00F3n',\n 'Stan odtwarzania',\n '\u0421\u0442\u0430\u043D \u0432\u0456\u0434\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F',\n '\u64AD\u653E\u72B6\u6001',\n ),\n t('Title', 'Titel', '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435', 'T\u00EDtulo', 'Titel', 'Titre', 'Titolo', 'T\u00EDtulo', 'Tytu\u0142', '\u041D\u0430\u0437\u0432\u0430', '\u6807\u9898'),\n t(\n 'Media type',\n 'Medientyp',\n '\u0422\u0438\u043F \u043C\u0435\u0434\u0438\u0430',\n 'Tipo de m\u00EDdia',\n 'Mediatype',\n 'Type de m\u00E9dia',\n 'Tipo di media',\n 'Tipo de medio',\n 'Typ multimedi\u00F3w',\n '\u0422\u0438\u043F \u043C\u0435\u0434\u0456\u0430',\n '\u5A92\u4F53\u7C7B\u578B',\n ),\n t('Series', 'Serie', '\u0421\u0435\u0440\u0438\u0430\u043B', 'S\u00E9rie', 'Serie', 'S\u00E9rie', 'Serie', 'Serie', 'Serial', '\u0421\u0435\u0440\u0456\u0430\u043B', '\u5267\u96C6'),\n t('Season', 'Staffel', '\u0421\u0435\u0437\u043E\u043D', 'Temporada', 'Seizoen', 'Saison', 'Stagione', 'Temporada', 'Sezon', '\u0421\u0435\u0437\u043E\u043D', '\u5B63'),\n t(\n 'Episode',\n 'Folge',\n '\u042D\u043F\u0438\u0437\u043E\u0434',\n 'Epis\u00F3dio',\n 'Aflevering',\n '\u00C9pisode',\n 'Episodio',\n 'Episodio',\n 'Odcinek',\n '\u0415\u043F\u0456\u0437\u043E\u0434',\n '\u96C6',\n ),\n t(\n 'Artist',\n 'Interpret',\n '\u0418\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C',\n 'Artista',\n 'Artiest',\n 'Artiste',\n 'Artista',\n 'Artista',\n 'Wykonawca',\n '\u0412\u0438\u043A\u043E\u043D\u0430\u0432\u0435\u0446\u044C',\n '\u827A\u672F\u5BB6',\n ),\n t('Album', 'Album', '\u0410\u043B\u044C\u0431\u043E\u043C', '\u00C1lbum', 'Album', 'Album', 'Album', '\u00C1lbum', 'Album', '\u0410\u043B\u044C\u0431\u043E\u043C', '\u4E13\u8F91'),\n t('Genre', 'Genre', '\u0416\u0430\u043D\u0440', 'G\u00EAnero', 'Genre', 'Genre', 'Genere', 'G\u00E9nero', 'Gatunek', '\u0416\u0430\u043D\u0440', '\u7C7B\u578B'),\n t('Year', 'Jahr', '\u0413\u043E\u0434', 'Ano', 'Jaar', 'Ann\u00E9e', 'Anno', 'A\u00F1o', 'Rok', '\u0420\u0456\u043A', '\u5E74\u4EFD'),\n t(\n 'Jellyfin id of the item',\n 'Jellyfin-ID des Eintrags',\n 'Jellyfin-ID \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430',\n 'ID Jellyfin do item',\n 'Jellyfin-id van het item',\n \"ID Jellyfin de l'\u00E9l\u00E9ment\",\n \"ID Jellyfin dell'elemento\",\n 'ID de Jellyfin del elemento',\n 'Identyfikator Jellyfin elementu',\n 'Jellyfin-ID \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430',\n '\u9879\u76EE\u7684 Jellyfin ID',\n ),\n t(\n 'Cover URL',\n 'Cover-Adresse',\n 'URL \u043E\u0431\u043B\u043E\u0436\u043A\u0438',\n 'URL da capa',\n 'Cover-URL',\n 'URL de la pochette',\n 'URL della copertina',\n 'URL de la car\u00E1tula',\n 'Adres URL ok\u0142adki',\n 'URL \u043E\u0431\u043A\u043B\u0430\u0434\u0438\u043D\u043A\u0438',\n '\u5C01\u9762\u7F51\u5740',\n ),\n t(\n 'Duration',\n 'Dauer',\n '\u0414\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C',\n 'Dura\u00E7\u00E3o',\n 'Duur',\n 'Dur\u00E9e',\n 'Durata',\n 'Duraci\u00F3n',\n 'Czas trwania',\n '\u0422\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C',\n '\u65F6\u957F',\n ),\n t(\n 'Position',\n 'Position',\n '\u041F\u043E\u0437\u0438\u0446\u0438\u044F',\n 'Posi\u00E7\u00E3o',\n 'Positie',\n 'Position',\n 'Posizione',\n 'Posici\u00F3n',\n 'Pozycja',\n '\u041F\u043E\u0437\u0438\u0446\u0456\u044F',\n '\u4F4D\u7F6E',\n ),\n t(\n 'Position in percent (write to jump)',\n 'Position in Prozent (schreiben zum Springen)',\n '\u041F\u043E\u0437\u0438\u0446\u0438\u044F \u0432 \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u0430\u0445 (\u0437\u0430\u043F\u0438\u0448\u0438\u0442\u0435 \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430)',\n 'Posi\u00E7\u00E3o em percentagem (escrever para saltar)',\n 'Positie in procent (schrijven om te springen)',\n 'Position en pourcentage (\u00E9crire pour sauter)',\n 'Posizione in percentuale (scrivere per saltare)',\n 'Posici\u00F3n en porcentaje (escribir para saltar)',\n 'Pozycja w procentach (zapisz, aby przeskoczy\u0107)',\n '\u041F\u043E\u0437\u0438\u0446\u0456\u044F \u0443 \u0432\u0456\u0434\u0441\u043E\u0442\u043A\u0430\u0445 (\u0437\u0430\u043F\u0438\u0448\u0456\u0442\u044C \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0443)',\n '\u4F4D\u7F6E\u767E\u5206\u6BD4\uFF08\u5199\u5165\u4EE5\u8DF3\u8F6C\uFF09',\n ),\n t(\n 'Volume',\n 'Lautst\u00E4rke',\n '\u0413\u0440\u043E\u043C\u043A\u043E\u0441\u0442\u044C',\n 'Volume',\n 'Volume',\n 'Volume',\n 'Volume',\n 'Volumen',\n 'G\u0142o\u015Bno\u015B\u0107',\n '\u0413\u0443\u0447\u043D\u0456\u0441\u0442\u044C',\n '\u97F3\u91CF',\n ),\n t(\n 'Muted',\n 'Stumm',\n '\u0411\u0435\u0437 \u0437\u0432\u0443\u043A\u0430',\n 'Sem som',\n 'Gedempt',\n 'Muet',\n 'Muto',\n 'Silenciado',\n 'Wyciszony',\n '\u0411\u0435\u0437 \u0437\u0432\u0443\u043A\u0443',\n '\u9759\u97F3',\n ),\n t(\n 'Repeat',\n 'Wiederholen',\n '\u041F\u043E\u0432\u0442\u043E\u0440',\n 'Repetir',\n 'Herhalen',\n 'R\u00E9p\u00E9ter',\n 'Ripeti',\n 'Repetir',\n 'Powtarzanie',\n '\u041F\u043E\u0432\u0442\u043E\u0440',\n '\u91CD\u590D',\n ),\n // commands\n t(\n 'Play',\n 'Abspielen',\n '\u0412\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0441\u0442\u0438',\n 'Reproduzir',\n 'Afspelen',\n 'Lecture',\n 'Riproduci',\n 'Reproducir',\n 'Odtw\u00F3rz',\n '\u0412\u0456\u0434\u0442\u0432\u043E\u0440\u0438\u0442\u0438',\n '\u64AD\u653E',\n ),\n t('Pause', 'Pause', '\u041F\u0430\u0443\u0437\u0430', 'Pausa', 'Pauze', 'Pause', 'Pausa', 'Pausa', 'Pauza', '\u041F\u0430\u0443\u0437\u0430', '\u6682\u505C'),\n t(\n 'Play / pause',\n 'Abspielen / Pause',\n '\u0412\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0434\u0435\u043D\u0438\u0435 / \u043F\u0430\u0443\u0437\u0430',\n 'Reproduzir / pausa',\n 'Afspelen / pauze',\n 'Lecture / pause',\n 'Riproduci / pausa',\n 'Reproducir / pausa',\n 'Odtw\u00F3rz / pauza',\n '\u0412\u0456\u0434\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F / \u043F\u0430\u0443\u0437\u0430',\n '\u64AD\u653E / \u6682\u505C',\n ),\n t('Stop', 'Stopp', '\u0421\u0442\u043E\u043F', 'Parar', 'Stoppen', 'Arr\u00EAt', 'Stop', 'Detener', 'Zatrzymaj', '\u0421\u0442\u043E\u043F', '\u505C\u6B62'),\n t(\n 'Next',\n 'Weiter',\n '\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439',\n 'Pr\u00F3ximo',\n 'Volgende',\n 'Suivant',\n 'Successivo',\n 'Siguiente',\n 'Nast\u0119pny',\n '\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0438\u0439',\n '\u4E0B\u4E00\u4E2A',\n ),\n t(\n 'Previous',\n 'Zur\u00FCck',\n '\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439',\n 'Anterior',\n 'Vorige',\n 'Pr\u00E9c\u00E9dent',\n 'Precedente',\n 'Anterior',\n 'Poprzedni',\n '\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456\u0439',\n '\u4E0A\u4E00\u4E2A',\n ),\n t(\n 'Skip forward',\n 'Vorspulen',\n '\u041F\u0435\u0440\u0435\u043C\u043E\u0442\u0430\u0442\u044C \u0432\u043F\u0435\u0440\u0451\u0434',\n 'Avan\u00E7ar',\n 'Vooruitspoelen',\n 'Avance rapide',\n 'Avanti veloce',\n 'Avanzar',\n 'Przewi\u0144 do przodu',\n '\u041F\u0435\u0440\u0435\u043C\u043E\u0442\u0430\u0442\u0438 \u0432\u043F\u0435\u0440\u0435\u0434',\n '\u5FEB\u8FDB',\n ),\n t(\n 'Skip back',\n 'Zur\u00FCckspulen',\n '\u041F\u0435\u0440\u0435\u043C\u043E\u0442\u0430\u0442\u044C \u043D\u0430\u0437\u0430\u0434',\n 'Retroceder',\n 'Terugspoelen',\n 'Retour rapide',\n 'Indietro veloce',\n 'Retroceder',\n 'Przewi\u0144 do ty\u0142u',\n '\u041F\u0435\u0440\u0435\u043C\u043E\u0442\u0430\u0442\u0438 \u043D\u0430\u0437\u0430\u0434',\n '\u5FEB\u9000',\n ),\n t(\n 'Volume up',\n 'Lauter',\n '\u0413\u0440\u043E\u043C\u0447\u0435',\n 'Aumentar volume',\n 'Volume omhoog',\n 'Volume +',\n 'Volume su',\n 'Subir volumen',\n 'G\u0142o\u015Bniej',\n '\u0413\u0443\u0447\u043D\u0456\u0448\u0435',\n '\u97F3\u91CF\u52A0',\n ),\n t(\n 'Volume down',\n 'Leiser',\n '\u0422\u0438\u0448\u0435',\n 'Diminuir volume',\n 'Volume omlaag',\n 'Volume -',\n 'Volume gi\u00F9',\n 'Bajar volumen',\n 'Ciszej',\n '\u0422\u0438\u0445\u0456\u0448\u0435',\n '\u97F3\u91CF\u51CF',\n ),\n t(\n 'Mute on/off',\n 'Stumm an/aus',\n '\u0417\u0432\u0443\u043A \u0432\u043A\u043B/\u0432\u044B\u043A\u043B',\n 'Mudo lig/desl',\n 'Dempen aan/uit',\n 'Muet on/off',\n 'Muto on/off',\n 'Silencio s\u00ED/no',\n 'Wycisz w\u0142./wy\u0142.',\n '\u0411\u0435\u0437 \u0437\u0432\u0443\u043A\u0443 \u0443\u0432\u0456\u043C\u043A./\u0432\u0438\u043C\u043A.',\n '\u9759\u97F3\u5F00/\u5173',\n ),\n t(\n 'Play a film, episode or song by its title (or item id)',\n 'Film, Folge oder Lied \u00FCber den Titel (oder die ID) abspielen',\n '\u0412\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0444\u0438\u043B\u044C\u043C, \u044D\u043F\u0438\u0437\u043E\u0434 \u0438\u043B\u0438 \u043F\u0435\u0441\u043D\u044E \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044E (\u0438\u043B\u0438 ID)',\n 'Reproduzir um filme, epis\u00F3dio ou m\u00FAsica pelo t\u00EDtulo (ou ID)',\n 'Een film, aflevering of nummer afspelen op titel (of id)',\n 'Lire un film, un \u00E9pisode ou une chanson par son titre (ou son ID)',\n 'Riproduci un film, un episodio o un brano per titolo (o ID)',\n 'Reproducir una pel\u00EDcula, episodio o canci\u00F3n por su t\u00EDtulo (o ID)',\n 'Odtw\u00F3rz film, odcinek lub utw\u00F3r wed\u0142ug tytu\u0142u (lub ID)',\n '\u0412\u0456\u0434\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u0444\u0456\u043B\u044C\u043C, \u0435\u043F\u0456\u0437\u043E\u0434 \u0430\u0431\u043E \u043F\u0456\u0441\u043D\u044E \u0437\u0430 \u043D\u0430\u0437\u0432\u043E\u044E (\u0430\u0431\u043E ID)',\n '\u6309\u6807\u9898\uFF08\u6216 ID\uFF09\u64AD\u653E\u7535\u5F71\u3001\u5267\u96C6\u6216\u6B4C\u66F2',\n ),\n t(\n 'Show message on the screen',\n 'Meldung auf dem Bildschirm anzeigen',\n '\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0430 \u044D\u043A\u0440\u0430\u043D\u0435',\n 'Mostrar mensagem na tela',\n 'Bericht op het scherm tonen',\n \"Afficher un message \u00E0 l'\u00E9cran\",\n 'Mostra messaggio sullo schermo',\n 'Mostrar mensaje en la pantalla',\n 'Poka\u017C wiadomo\u015B\u0107 na ekranie',\n '\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u043F\u043E\u0432\u0456\u0434\u043E\u043C\u043B\u0435\u043D\u043D\u044F \u043D\u0430 \u0435\u043A\u0440\u0430\u043D\u0456',\n '\u5728\u5C4F\u5E55\u4E0A\u663E\u793A\u6D88\u606F',\n ),\n t(\n 'Send command (e.g. GoHome or {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n 'Befehl senden (z. B. GoHome oder {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n '\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 (\u043D\u0430\u043F\u0440. GoHome \u0438\u043B\u0438 {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n 'Enviar comando (ex. GoHome ou {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n 'Opdracht sturen (bijv. GoHome of {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n 'Envoyer une commande (ex. GoHome ou {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n 'Invia comando (ad es. GoHome o {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n 'Enviar comando (p. ej. GoHome o {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n 'Wy\u015Blij polecenie (np. GoHome lub {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n '\u041D\u0430\u0434\u0456\u0441\u043B\u0430\u0442\u0438 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 (\u043D\u0430\u043F\u0440. GoHome \u0430\u0431\u043E {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n '\u53D1\u9001\u547D\u4EE4\uFF08\u4F8B\u5982 GoHome \u6216 {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}}\uFF09',\n ),\n // server\n t(\n 'Server name',\n 'Servername',\n '\u0418\u043C\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u0430',\n 'Nome do servidor',\n 'Servernaam',\n 'Nom du serveur',\n 'Nome del server',\n 'Nombre del servidor',\n 'Nazwa serwera',\n '\u041D\u0430\u0437\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430',\n '\u670D\u52A1\u5668\u540D\u79F0',\n ),\n t(\n 'Server version',\n 'Server-Version',\n '\u0412\u0435\u0440\u0441\u0438\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u0430',\n 'Vers\u00E3o do servidor',\n 'Serverversie',\n 'Version du serveur',\n 'Versione del server',\n 'Versi\u00F3n del servidor',\n 'Wersja serwera',\n '\u0412\u0435\u0440\u0441\u0456\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u0430',\n '\u670D\u52A1\u5668\u7248\u672C',\n ),\n t(\n 'Update available',\n 'Update verf\u00FCgbar',\n '\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435',\n 'Atualiza\u00E7\u00E3o dispon\u00EDvel',\n 'Update beschikbaar',\n 'Mise \u00E0 jour disponible',\n 'Aggiornamento disponibile',\n 'Actualizaci\u00F3n disponible',\n 'Dost\u0119pna aktualizacja',\n '\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u0435 \u043E\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u044F',\n '\u6709\u53EF\u7528\u66F4\u65B0',\n ),\n t(\n 'Restart required',\n 'Neustart erforderlich',\n '\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u043A',\n 'Rein\u00EDcio necess\u00E1rio',\n 'Herstart vereist',\n 'Red\u00E9marrage requis',\n 'Riavvio necessario',\n 'Reinicio necesario',\n 'Wymagany restart',\n '\u041F\u043E\u0442\u0440\u0456\u0431\u0435\u043D \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u043A',\n '\u9700\u8981\u91CD\u542F',\n ),\n t(\n 'Connected devices',\n 'Verbundene Ger\u00E4te',\n '\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u044B\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430',\n 'Dispositivos conectados',\n 'Verbonden apparaten',\n 'Appareils connect\u00E9s',\n 'Dispositivi connessi',\n 'Dispositivos conectados',\n 'Po\u0142\u0105czone urz\u0105dzenia',\n '\u041F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0456 \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u0457',\n '\u5DF2\u8FDE\u63A5\u8BBE\u5907',\n ),\n t(\n 'Devices playing',\n 'Abspielende Ger\u00E4te',\n '\u0412\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u044F\u0449\u0438\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430',\n 'Dispositivos reproduzindo',\n 'Afspelende apparaten',\n 'Appareils en lecture',\n 'Dispositivi in riproduzione',\n 'Dispositivos reproduciendo',\n 'Odtwarzaj\u0105ce urz\u0105dzenia',\n '\u041F\u0440\u0438\u0441\u0442\u0440\u043E\u0457, \u0449\u043E \u0432\u0456\u0434\u0442\u0432\u043E\u0440\u044E\u044E\u0442\u044C',\n '\u6B63\u5728\u64AD\u653E\u7684\u8BBE\u5907',\n ),\n t(\n 'Scan all libraries',\n 'Alle Bibliotheken einlesen',\n '\u0421\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0438',\n 'Analisar todas as bibliotecas',\n 'Alle bibliotheken scannen',\n 'Analyser toutes les biblioth\u00E8ques',\n 'Scansiona tutte le librerie',\n 'Escanear todas las bibliotecas',\n 'Skanuj wszystkie biblioteki',\n '\u0421\u043A\u0430\u043D\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0456 \u0431\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0438',\n '\u626B\u63CF\u6240\u6709\u5A92\u4F53\u5E93',\n ),\n];\n\nconst NAMES = new Map(LIST.map(n => [n.en, n]));\n\n/**\n * Translated name for an English object name.\n *\n * @param en - English name as used in the object definitions\n * @returns all translations, or the English text if no entry exists\n */\nexport function tr(en: string): ioBroker.StringOrTranslated {\n return NAMES.get(en) ?? en;\n}\n\n/** English names that have a translation (used by the unit test). */\nexport const TRANSLATED_NAMES: ReadonlySet<string> = new Set(NAMES.keys());\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,MAAM,IAAI,CACN,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,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IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA;AAAA,EAEA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AACJ;AAEA,MAAM,QAAQ,IAAI,IAAI,KAAK,IAAI,OAAK,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAQvC,SAAS,GAAG,IAAyC;AAplB5D;AAqlBI,UAAO,WAAM,IAAI,EAAE,MAAZ,YAAiB;AAC5B;AAGO,MAAM,mBAAwC,IAAI,IAAI,MAAM,KAAK,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/build/lib/objects.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(objects_exports, {
|
|
|
26
26
|
toCommon: () => toCommon
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(objects_exports);
|
|
29
|
+
var import_names = require("./names");
|
|
29
30
|
const DEVICE_CHANNELS = {
|
|
30
31
|
info: "Information",
|
|
31
32
|
media: "Media",
|
|
@@ -237,7 +238,7 @@ const SERVER_STATES = [
|
|
|
237
238
|
];
|
|
238
239
|
function toCommon(def) {
|
|
239
240
|
const common = {
|
|
240
|
-
name: def.name,
|
|
241
|
+
name: (0, import_names.tr)(def.name),
|
|
241
242
|
type: def.type,
|
|
242
243
|
role: def.role,
|
|
243
244
|
read: def.read,
|
package/build/lib/objects.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/lib/objects.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Object definitions for one Jellyfin client (device) and the server channel.\n * Roles follow https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/stateroles.md\n */\n\n/** Definition of one state below a device (`<device>.<id>`). */\nexport interface StateDef {\n /** id relative to the device (or namespace for server states) */\n id: string;\n /** English object name */\n name: string;\n /** common.type */\n type: ioBroker.CommonType;\n /** common.role (official state roles) */\n role: string;\n /** common.read */\n read: boolean;\n /** common.write */\n write: boolean;\n /** common.unit */\n unit?: string;\n /** common.min */\n min?: number;\n /** common.max */\n max?: number;\n /** common.states */\n states?: Record<string, string>;\n /** common.def */\n def?: ioBroker.StateValue;\n}\n\n/** Channels below each device. */\nexport const DEVICE_CHANNELS: Record<string, string> = {\n info: 'Information',\n media: 'Media',\n command: 'Commands',\n};\n\n/** Media state values (role `media.state`). */\nexport const MEDIA_STATES: Record<string, string> = { play: 'play', pause: 'pause', stop: 'stop' };\n\n/** Repeat modes, value = Jellyfin RepeatMode. */\nexport const REPEAT_STATES: Record<string, string> = {\n RepeatNone: 'off',\n RepeatAll: 'all',\n RepeatOne: 'one',\n};\n\nconst button = (id: string, name: string, role: string): StateDef => ({\n id,\n name,\n type: 'boolean',\n role,\n read: false,\n write: true,\n});\n\n/** All states of one device. */\nexport const DEVICE_STATES: StateDef[] = [\n // info\n { id: 'info.name', name: 'Device name', type: 'string', role: 'info.name', read: true, write: false },\n { id: 'info.client', name: 'App', type: 'string', role: 'media.player.type', read: true, write: false },\n { id: 'info.version', name: 'App version', type: 'string', role: 'info.firmware', read: true, write: false },\n { id: 'info.user', name: 'User', type: 'string', role: 'text', read: true, write: false },\n {\n id: 'info.reachable',\n name: 'Connected to the server',\n type: 'boolean',\n role: 'indicator.reachable',\n read: true,\n write: false,\n def: false,\n },\n {\n id: 'info.remoteControl',\n name: 'Can be controlled remotely',\n type: 'boolean',\n role: 'indicator',\n read: true,\n write: false,\n def: false,\n },\n { id: 'info.lastActivity', name: 'Last activity', type: 'number', role: 'date', read: true, write: false },\n\n // media (read)\n {\n id: 'media.state',\n name: 'Playback state',\n type: 'string',\n role: 'media.state',\n read: true,\n write: false,\n states: MEDIA_STATES,\n def: 'stop',\n },\n { id: 'media.title', name: 'Title', type: 'string', role: 'media.title', read: true, write: false, def: '' },\n { id: 'media.type', name: 'Media type', type: 'string', role: 'text', read: true, write: false, def: '' },\n { id: 'media.series', name: 'Series', type: 'string', role: 'text', read: true, write: false, def: '' },\n { id: 'media.season', name: 'Season', type: 'string', role: 'media.season', read: true, write: false, def: '' },\n { id: 'media.episode', name: 'Episode', type: 'string', role: 'media.episode', read: true, write: false, def: '' },\n { id: 'media.artist', name: 'Artist', type: 'string', role: 'media.artist', read: true, write: false, def: '' },\n { id: 'media.album', name: 'Album', type: 'string', role: 'media.album', read: true, write: false, def: '' },\n { id: 'media.genre', name: 'Genre', type: 'string', role: 'media.genre', read: true, write: false, def: '' },\n { id: 'media.year', name: 'Year', type: 'string', role: 'media.date', read: true, write: false, def: '' },\n {\n id: 'media.itemId',\n name: 'Jellyfin id of the item',\n type: 'string',\n role: 'text',\n read: true,\n write: false,\n def: '',\n },\n { id: 'media.cover', name: 'Cover URL', type: 'string', role: 'media.cover', read: true, write: false, def: '' },\n {\n id: 'media.duration',\n name: 'Duration',\n type: 'number',\n role: 'media.duration',\n read: true,\n write: false,\n unit: 's',\n def: 0,\n },\n {\n id: 'media.elapsed',\n name: 'Position',\n type: 'number',\n role: 'media.elapsed',\n read: true,\n write: false,\n unit: 's',\n def: 0,\n },\n\n // media (read/write)\n {\n id: 'media.seek',\n name: 'Position in percent (write to jump)',\n type: 'number',\n role: 'media.seek',\n read: true,\n write: true,\n unit: '%',\n min: 0,\n max: 100,\n def: 0,\n },\n {\n id: 'media.volume',\n name: 'Volume',\n type: 'number',\n role: 'level.volume',\n read: true,\n write: true,\n unit: '%',\n min: 0,\n max: 100,\n },\n { id: 'media.mute', name: 'Muted', type: 'boolean', role: 'media.mute', read: true, write: true },\n {\n id: 'media.repeat',\n name: 'Repeat',\n type: 'string',\n role: 'state',\n read: true,\n write: true,\n states: REPEAT_STATES,\n },\n\n // commands\n button('command.play', 'Play', 'button.play'),\n button('command.pause', 'Pause', 'button.pause'),\n button('command.playPause', 'Play / pause', 'button'),\n button('command.stop', 'Stop', 'button.stop'),\n button('command.next', 'Next', 'button.next'),\n button('command.previous', 'Previous', 'button.prev'),\n button('command.forward', 'Skip forward', 'button.forward'),\n button('command.rewind', 'Skip back', 'button.reverse'),\n button('command.volumeUp', 'Volume up', 'button.volume.up'),\n button('command.volumeDown', 'Volume down', 'button.volume.down'),\n button('command.toggleMute', 'Mute on/off', 'button'),\n {\n id: 'command.playTitle',\n name: 'Play a film, episode or song by its title (or item id)',\n type: 'string',\n role: 'text',\n read: true,\n write: true,\n def: '',\n },\n {\n id: 'command.message',\n name: 'Show message on the screen',\n type: 'string',\n role: 'text',\n read: true,\n write: true,\n def: '',\n },\n {\n id: 'command.generalCommand',\n name: 'Send command (e.g. GoHome or {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n type: 'string',\n role: 'text',\n read: true,\n write: true,\n def: '',\n },\n];\n\n/** States of the `server` channel. */\nexport const SERVER_STATES: StateDef[] = [\n { id: 'server.name', name: 'Server name', type: 'string', role: 'info.name', read: true, write: false },\n { id: 'server.version', name: 'Server version', type: 'string', role: 'info.firmware', read: true, write: false },\n {\n id: 'server.updateAvailable',\n name: 'Update available',\n type: 'boolean',\n role: 'indicator',\n read: true,\n write: false,\n def: false,\n },\n {\n id: 'server.restartPending',\n name: 'Restart required',\n type: 'boolean',\n role: 'indicator',\n read: true,\n write: false,\n def: false,\n },\n {\n id: 'server.activeDevices',\n name: 'Connected devices',\n type: 'number',\n role: 'value',\n read: true,\n write: false,\n def: 0,\n },\n {\n id: 'server.playingDevices',\n name: 'Devices playing',\n type: 'number',\n role: 'value',\n read: true,\n write: false,\n def: 0,\n },\n button('server.refreshLibrary', 'Scan all libraries', 'button'),\n];\n\n/**\n * Converts a {@link StateDef} into `common` of an ioBroker state object.\n *\n * @param def - state definition\n */\nexport function toCommon(def: StateDef): ioBroker.StateCommon {\n const common: ioBroker.StateCommon = {\n name: def.name,\n type: def.type,\n role: def.role,\n read: def.read,\n write: def.write,\n };\n if (def.unit) {\n common.unit = def.unit;\n }\n if (def.min !== undefined) {\n common.min = def.min;\n }\n if (def.max !== undefined) {\n common.max = def.max;\n }\n if (def.states) {\n common.states = def.states;\n }\n if (def.def !== undefined) {\n common.def = def.def;\n }\n return common;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["/**\n * Object definitions for one Jellyfin client (device) and the server channel.\n * Roles follow https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/stateroles.md\n */\n\nimport { tr } from './names';\n\n/** Definition of one state below a device (`<device>.<id>`). */\nexport interface StateDef {\n /** id relative to the device (or namespace for server states) */\n id: string;\n /** English object name */\n name: string;\n /** common.type */\n type: ioBroker.CommonType;\n /** common.role (official state roles) */\n role: string;\n /** common.read */\n read: boolean;\n /** common.write */\n write: boolean;\n /** common.unit */\n unit?: string;\n /** common.min */\n min?: number;\n /** common.max */\n max?: number;\n /** common.states */\n states?: Record<string, string>;\n /** common.def */\n def?: ioBroker.StateValue;\n}\n\n/** Channels below each device. */\nexport const DEVICE_CHANNELS: Record<string, string> = {\n info: 'Information',\n media: 'Media',\n command: 'Commands',\n};\n\n/** Media state values (role `media.state`). */\nexport const MEDIA_STATES: Record<string, string> = { play: 'play', pause: 'pause', stop: 'stop' };\n\n/** Repeat modes, value = Jellyfin RepeatMode. */\nexport const REPEAT_STATES: Record<string, string> = {\n RepeatNone: 'off',\n RepeatAll: 'all',\n RepeatOne: 'one',\n};\n\nconst button = (id: string, name: string, role: string): StateDef => ({\n id,\n name,\n type: 'boolean',\n role,\n read: false,\n write: true,\n});\n\n/** All states of one device. */\nexport const DEVICE_STATES: StateDef[] = [\n // info\n { id: 'info.name', name: 'Device name', type: 'string', role: 'info.name', read: true, write: false },\n { id: 'info.client', name: 'App', type: 'string', role: 'media.player.type', read: true, write: false },\n { id: 'info.version', name: 'App version', type: 'string', role: 'info.firmware', read: true, write: false },\n { id: 'info.user', name: 'User', type: 'string', role: 'text', read: true, write: false },\n {\n id: 'info.reachable',\n name: 'Connected to the server',\n type: 'boolean',\n role: 'indicator.reachable',\n read: true,\n write: false,\n def: false,\n },\n {\n id: 'info.remoteControl',\n name: 'Can be controlled remotely',\n type: 'boolean',\n role: 'indicator',\n read: true,\n write: false,\n def: false,\n },\n { id: 'info.lastActivity', name: 'Last activity', type: 'number', role: 'date', read: true, write: false },\n\n // media (read)\n {\n id: 'media.state',\n name: 'Playback state',\n type: 'string',\n role: 'media.state',\n read: true,\n write: false,\n states: MEDIA_STATES,\n def: 'stop',\n },\n { id: 'media.title', name: 'Title', type: 'string', role: 'media.title', read: true, write: false, def: '' },\n { id: 'media.type', name: 'Media type', type: 'string', role: 'text', read: true, write: false, def: '' },\n { id: 'media.series', name: 'Series', type: 'string', role: 'text', read: true, write: false, def: '' },\n { id: 'media.season', name: 'Season', type: 'string', role: 'media.season', read: true, write: false, def: '' },\n { id: 'media.episode', name: 'Episode', type: 'string', role: 'media.episode', read: true, write: false, def: '' },\n { id: 'media.artist', name: 'Artist', type: 'string', role: 'media.artist', read: true, write: false, def: '' },\n { id: 'media.album', name: 'Album', type: 'string', role: 'media.album', read: true, write: false, def: '' },\n { id: 'media.genre', name: 'Genre', type: 'string', role: 'media.genre', read: true, write: false, def: '' },\n { id: 'media.year', name: 'Year', type: 'string', role: 'media.date', read: true, write: false, def: '' },\n {\n id: 'media.itemId',\n name: 'Jellyfin id of the item',\n type: 'string',\n role: 'text',\n read: true,\n write: false,\n def: '',\n },\n { id: 'media.cover', name: 'Cover URL', type: 'string', role: 'media.cover', read: true, write: false, def: '' },\n {\n id: 'media.duration',\n name: 'Duration',\n type: 'number',\n role: 'media.duration',\n read: true,\n write: false,\n unit: 's',\n def: 0,\n },\n {\n id: 'media.elapsed',\n name: 'Position',\n type: 'number',\n role: 'media.elapsed',\n read: true,\n write: false,\n unit: 's',\n def: 0,\n },\n\n // media (read/write)\n {\n id: 'media.seek',\n name: 'Position in percent (write to jump)',\n type: 'number',\n role: 'media.seek',\n read: true,\n write: true,\n unit: '%',\n min: 0,\n max: 100,\n def: 0,\n },\n {\n id: 'media.volume',\n name: 'Volume',\n type: 'number',\n role: 'level.volume',\n read: true,\n write: true,\n unit: '%',\n min: 0,\n max: 100,\n },\n { id: 'media.mute', name: 'Muted', type: 'boolean', role: 'media.mute', read: true, write: true },\n {\n id: 'media.repeat',\n name: 'Repeat',\n type: 'string',\n role: 'state',\n read: true,\n write: true,\n states: REPEAT_STATES,\n },\n\n // commands\n button('command.play', 'Play', 'button.play'),\n button('command.pause', 'Pause', 'button.pause'),\n button('command.playPause', 'Play / pause', 'button'),\n button('command.stop', 'Stop', 'button.stop'),\n button('command.next', 'Next', 'button.next'),\n button('command.previous', 'Previous', 'button.prev'),\n button('command.forward', 'Skip forward', 'button.forward'),\n button('command.rewind', 'Skip back', 'button.reverse'),\n button('command.volumeUp', 'Volume up', 'button.volume.up'),\n button('command.volumeDown', 'Volume down', 'button.volume.down'),\n button('command.toggleMute', 'Mute on/off', 'button'),\n {\n id: 'command.playTitle',\n name: 'Play a film, episode or song by its title (or item id)',\n type: 'string',\n role: 'text',\n read: true,\n write: true,\n def: '',\n },\n {\n id: 'command.message',\n name: 'Show message on the screen',\n type: 'string',\n role: 'text',\n read: true,\n write: true,\n def: '',\n },\n {\n id: 'command.generalCommand',\n name: 'Send command (e.g. GoHome or {\"Name\":\"SetVolume\",\"Arguments\":{\"Volume\":\"50\"}})',\n type: 'string',\n role: 'text',\n read: true,\n write: true,\n def: '',\n },\n];\n\n/** States of the `server` channel. */\nexport const SERVER_STATES: StateDef[] = [\n { id: 'server.name', name: 'Server name', type: 'string', role: 'info.name', read: true, write: false },\n { id: 'server.version', name: 'Server version', type: 'string', role: 'info.firmware', read: true, write: false },\n {\n id: 'server.updateAvailable',\n name: 'Update available',\n type: 'boolean',\n role: 'indicator',\n read: true,\n write: false,\n def: false,\n },\n {\n id: 'server.restartPending',\n name: 'Restart required',\n type: 'boolean',\n role: 'indicator',\n read: true,\n write: false,\n def: false,\n },\n {\n id: 'server.activeDevices',\n name: 'Connected devices',\n type: 'number',\n role: 'value',\n read: true,\n write: false,\n def: 0,\n },\n {\n id: 'server.playingDevices',\n name: 'Devices playing',\n type: 'number',\n role: 'value',\n read: true,\n write: false,\n def: 0,\n },\n button('server.refreshLibrary', 'Scan all libraries', 'button'),\n];\n\n/**\n * Converts a {@link StateDef} into `common` of an ioBroker state object.\n *\n * @param def - state definition\n */\nexport function toCommon(def: StateDef): ioBroker.StateCommon {\n const common: ioBroker.StateCommon = {\n name: tr(def.name),\n type: def.type,\n role: def.role,\n read: def.read,\n write: def.write,\n };\n if (def.unit) {\n common.unit = def.unit;\n }\n if (def.min !== undefined) {\n common.min = def.min;\n }\n if (def.max !== undefined) {\n common.max = def.max;\n }\n if (def.states) {\n common.states = def.states;\n }\n if (def.def !== undefined) {\n common.def = def.def;\n }\n return common;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AK;AAAA,EACT;AAAA,EACA;AAAA,IACI,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,EACT;AAAA,EACA,OAAO,yBAAyB,sBAAsB,QAAQ;AAClE;AAOO,SAAS,SAAS,KAAqC;AAC1D,QAAM,SAA+B;AAAA,IACjC,UAAM,iBAAG,IAAI,IAAI;AAAA,IACjB,MAAM,IAAI;AAAA,IACV,MAAM,IAAI;AAAA,IACV,MAAM,IAAI;AAAA,IACV,OAAO,IAAI;AAAA,EACf;AACA,MAAI,IAAI,MAAM;AACV,WAAO,OAAO,IAAI;AAAA,EACtB;AACA,MAAI,IAAI,QAAQ,QAAW;AACvB,WAAO,MAAM,IAAI;AAAA,EACrB;AACA,MAAI,IAAI,QAAQ,QAAW;AACvB,WAAO,MAAM,IAAI;AAAA,EACrB;AACA,MAAI,IAAI,QAAQ;AACZ,WAAO,SAAS,IAAI;AAAA,EACxB;AACA,MAAI,IAAI,QAAQ,QAAW;AACvB,WAAO,MAAM,IAAI;AAAA,EACrB;AACA,SAAO;AACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/main.js
CHANGED
|
@@ -25,6 +25,7 @@ var utils = __toESM(require("@iobroker/adapter-core"));
|
|
|
25
25
|
var import_api = require("./lib/api");
|
|
26
26
|
var import_devices = require("./lib/devices");
|
|
27
27
|
var import_objects = require("./lib/objects");
|
|
28
|
+
var import_names = require("./lib/names");
|
|
28
29
|
var import_commands = require("./lib/commands");
|
|
29
30
|
var import_session = require("./lib/session");
|
|
30
31
|
const OWN_DEVICE_PREFIX = "ioBroker-";
|
|
@@ -396,7 +397,7 @@ class Jellyfin extends utils.Adapter {
|
|
|
396
397
|
});
|
|
397
398
|
if (!this.preparedDevices.has(id)) {
|
|
398
399
|
for (const [ch, chName] of Object.entries(import_objects.DEVICE_CHANNELS)) {
|
|
399
|
-
await this.extendObject(`${id}.${ch}`, { type: "channel", common: { name: chName }, native: {} });
|
|
400
|
+
await this.extendObject(`${id}.${ch}`, { type: "channel", common: { name: (0, import_names.tr)(chName) }, native: {} });
|
|
400
401
|
}
|
|
401
402
|
for (const def of import_objects.DEVICE_STATES) {
|
|
402
403
|
await this.extendObject(`${id}.${def.id}`, { type: "state", common: (0, import_objects.toCommon)(def), native: {} });
|
|
@@ -448,7 +449,9 @@ class Jellyfin extends utils.Adapter {
|
|
|
448
449
|
}
|
|
449
450
|
/** Creates the `server` channel. */
|
|
450
451
|
async createServerObjects() {
|
|
451
|
-
await this.extendObject("
|
|
452
|
+
await this.extendObject("info", { common: { name: (0, import_names.tr)("Information") } });
|
|
453
|
+
await this.extendObject("info.connection", { common: { name: (0, import_names.tr)("Connected to Jellyfin") } });
|
|
454
|
+
await this.extendObject("server", { type: "channel", common: { name: (0, import_names.tr)("Jellyfin server") }, native: {} });
|
|
452
455
|
for (const def of import_objects.SERVER_STATES) {
|
|
453
456
|
await this.extendObject(def.id, { type: "state", common: (0, import_objects.toCommon)(def), native: {} });
|
|
454
457
|
}
|
package/build/main.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * ioBroker.jellyfin \u2013 monitor and control Jellyfin clients\n * Copyright (c) 2026 Schimi <github@world-mg.de>, MIT License\n */\nimport * as utils from '@iobroker/adapter-core';\nimport { JellyfinApi, JellyfinHttpError, normalizeBaseUrl } from './lib/api';\nimport { displayName, groupSessions } from './lib/devices';\nimport { DEVICE_CHANNELS, DEVICE_STATES, REPEAT_STATES, SERVER_STATES, toCommon } from './lib/objects';\nimport { parseGeneralCommand, parseMessage, type MessagePayload } from './lib/commands';\nimport { checkCommand, reportsAudio, sessionValues, type CommandKind } from './lib/session';\nimport type { ItemInfo, PlaystateCommand, RepeatMode, SessionInfo, SocketMessage, SystemInfo } from './lib/types';\n\n/** DeviceId prefix of all ioBroker connections (`ioBroker-jellyfin.0`, \u2026); filtered out of the device list. */\nconst OWN_DEVICE_PREFIX = 'ioBroker-';\n/** Minimum supported Jellyfin major version. */\nconst MIN_SERVER_MAJOR = 12;\n/** First and maximum reconnect delay. */\nconst RECONNECT_MIN_MS = 5_000;\nconst RECONNECT_MAX_MS = 60_000;\n/** Server info (update available, restart pending) is refreshed in this interval. */\nconst SERVER_INFO_INTERVAL_MS = 10 * 60_000;\n\n/** Playstate buttons: state id below the device \u2192 Jellyfin command. */\nconst PLAYSTATE_BUTTONS: Record<string, PlaystateCommand> = {\n 'command.play': 'Unpause',\n 'command.pause': 'Pause',\n 'command.playPause': 'PlayPause',\n 'command.stop': 'Stop',\n 'command.next': 'NextTrack',\n 'command.previous': 'PreviousTrack',\n 'command.forward': 'FastForward',\n 'command.rewind': 'Rewind',\n};\n\n/** General command buttons: state id below the device \u2192 GeneralCommandType. */\nconst GENERAL_BUTTONS: Record<string, string> = {\n 'command.volumeUp': 'VolumeUp',\n 'command.volumeDown': 'VolumeDown',\n 'command.toggleMute': 'ToggleMute',\n};\n\nclass Jellyfin extends utils.Adapter {\n private api: JellyfinApi | null = null;\n private socket: WebSocket | null = null;\n private keepAliveTimer: ioBroker.Interval | undefined;\n private reconnectTimer: ioBroker.Timeout | undefined;\n private serverInfoTimer: ioBroker.Interval | undefined;\n private reconnectDelay = RECONNECT_MIN_MS;\n private stopping = false;\n private connectedOnce = false;\n private lastConnectError = '';\n private sessionIntervalMs = 5_000;\n private coverHeight = 300;\n private onlyRemote = false;\n /** Id of the Jellyfin server (from /System/Info) */\n private serverId = '';\n\n /** Current session per device object id. */\n private sessions = new Map<string, SessionInfo>();\n /** Devices whose objects exist (from the database or created in this run). */\n private knownDevices = new Set<string>();\n /** Devices whose objects were created/updated in this run, value = device name written. */\n private preparedDevices = new Map<string, string>();\n /** Devices currently marked as not connected (avoids rewriting the offline values every push). */\n private offlineDevices = new Set<string>();\n /** Last written value per state id (relative), we are the only writer of ack values. */\n private valueCache = new Map<string, ioBroker.StateValue>();\n /** Sessions waiting for processing (only the latest push is kept). */\n private pendingSessions: SessionInfo[] | null = null;\n private processing = false;\n\n public constructor(options: Partial<utils.AdapterOptions> = {}) {\n super({ ...options, name: 'jellyfin' });\n this.on('ready', this.onReady.bind(this));\n this.on('stateChange', this.onStateChange.bind(this));\n this.on('message', this.onMessage.bind(this));\n this.on('unload', this.onUnload.bind(this));\n }\n\n /** Own device id; our WebSocket connection shows up as a session with this id and is filtered out. */\n private get ownDeviceId(): string {\n return `ioBroker-${this.namespace}`;\n }\n\n private async onReady(): Promise<void> {\n await this.setState('info.connection', false, true);\n\n const baseUrl = normalizeBaseUrl(this.config.url);\n if (!baseUrl) {\n this.log.error('Please enter the address of your Jellyfin server in the instance settings.');\n return;\n }\n const apiKey = (this.config.apiKey ?? '').trim();\n if (!apiKey) {\n this.log.error('Please enter an API key in the instance settings (Jellyfin dashboard \u2192 API keys).');\n return;\n }\n this.sessionIntervalMs = clamp(Number(this.config.updateInterval) || 5, 2, 60) * 1000;\n this.coverHeight = clamp(Number(this.config.coverHeight ?? 300), 0, 2000);\n this.onlyRemote = this.config.onlyRemoteControllable === true;\n\n this.api = new JellyfinApi({\n baseUrl,\n apiKey,\n deviceId: this.ownDeviceId,\n version: this.version ?? '0.0.0',\n timeoutMs: clamp(Number(this.config.requestTimeout) || 10, 2, 60) * 1000,\n });\n\n await this.createServerObjects();\n for (const dev of await this.getDevicesAsync()) {\n this.knownDevices.add(dev._id.slice(this.namespace.length + 1));\n }\n\n for (const pattern of ['*.command.*', '*.media.seek', '*.media.volume', '*.media.mute', '*.media.repeat']) {\n this.subscribeStates(pattern);\n }\n this.subscribeStates('server.refreshLibrary');\n\n this.serverInfoTimer = this.setInterval(() => void this.refreshServerInfo(false), SERVER_INFO_INTERVAL_MS);\n await this.connect();\n }\n\n // ---------------------------------------------------------------- connection\n\n /** Checks the server via REST, loads the sessions once and opens the WebSocket. */\n private async connect(): Promise<void> {\n this.reconnectTimer = undefined;\n if (this.stopping || !this.api) {\n return;\n }\n if (!(await this.refreshServerInfo(true))) {\n this.scheduleReconnect();\n return;\n }\n try {\n this.queueSessions(await this.api.getSessions());\n } catch (e) {\n this.log.debug(`Initial session list failed: ${(e as Error).message}`);\n }\n this.openSocket();\n }\n\n /**\n * Reads /System/Info and writes the server states.\n *\n * @param logErrors - log connection errors (only the first occurrence of each error)\n * @returns true if the server answered\n */\n private async refreshServerInfo(logErrors: boolean): Promise<boolean> {\n if (!this.api) {\n return false;\n }\n let info: SystemInfo;\n try {\n info = await this.api.getSystemInfo();\n } catch (e) {\n if (logErrors) {\n this.logConnectError(e);\n }\n return false;\n }\n this.serverId = info.Id ?? this.serverId;\n await this.writeValue('server.name', info.ServerName ?? '');\n await this.writeValue('server.version', info.Version ?? '');\n await this.writeValue('server.updateAvailable', info.HasUpdateAvailable === true);\n await this.writeValue('server.restartPending', info.HasPendingRestart === true);\n const major = parseInt(info.Version ?? '', 10);\n if (logErrors && !Number.isNaN(major) && major < MIN_SERVER_MAJOR) {\n this.log.warn(\n `Jellyfin ${info.Version} is not supported. Please update the server to version ${MIN_SERVER_MAJOR} or newer.`,\n );\n }\n return true;\n }\n\n /**\n * Logs a connection error once (repeated identical errors only on debug level).\n *\n * @param e - error\n */\n private logConnectError(e: unknown): void {\n let text: string;\n if (e instanceof JellyfinHttpError && (e.status === 401 || e.status === 403)) {\n text = 'The Jellyfin server rejected the API key. Please check the key in the instance settings.';\n } else if (e instanceof JellyfinHttpError && e.status === 404) {\n text =\n 'Jellyfin was not found at this address. Please check the server address (incl. port and base path).';\n } else {\n text = `Cannot reach the Jellyfin server: ${(e as Error).message}`;\n }\n if (text !== this.lastConnectError) {\n this.lastConnectError = text;\n this.log.error(text);\n } else {\n this.log.debug(text);\n }\n }\n\n /** Opens the WebSocket. Reconnects are scheduled from the close handler only. */\n private openSocket(): void {\n if (!this.api || this.stopping) {\n return;\n }\n let ws: WebSocket;\n try {\n ws = new WebSocket(this.api.socketUrl);\n } catch (e) {\n this.logConnectError(e);\n this.scheduleReconnect();\n return;\n }\n this.socket = ws;\n ws.onopen = () => {\n this.reconnectDelay = RECONNECT_MIN_MS;\n this.lastConnectError = '';\n // \"initial delay, interval\" in ms \u2013 the server then pushes the session list in this interval\n ws.send(JSON.stringify({ MessageType: 'SessionsStart', Data: `0,${this.sessionIntervalMs}` }));\n void this.setState('info.connection', true, true);\n if (!this.connectedOnce) {\n this.log.info(`Connected to Jellyfin at ${this.api?.baseUrl}`);\n this.connectedOnce = true;\n } else {\n this.log.info('Connection to Jellyfin restored');\n }\n };\n ws.onmessage = ev => this.onSocketMessage(ev.data);\n ws.onerror = () => {\n // WHATWG WebSocket: an error is always followed by a close event\n this.log.debug('WebSocket error');\n };\n ws.onclose = ev => {\n if (this.socket !== ws) {\n return;\n }\n this.socket = null;\n this.stopKeepAlive();\n void this.setState('info.connection', false, true);\n if (this.stopping) {\n return;\n }\n this.log.info(`Connection to Jellyfin closed (code ${ev.code}), reconnecting \u2026`);\n this.markAllOffline();\n this.scheduleReconnect();\n };\n }\n\n private scheduleReconnect(): void {\n if (this.stopping || this.reconnectTimer) {\n return;\n }\n const delay = this.reconnectDelay;\n this.reconnectDelay = Math.min(delay * 2, RECONNECT_MAX_MS);\n this.reconnectTimer = this.setTimeout(() => void this.connect(), delay);\n }\n\n /**\n * Handles one WebSocket message.\n *\n * @param raw - message text\n */\n private onSocketMessage(raw: unknown): void {\n let msg: SocketMessage;\n try {\n msg = JSON.parse(String(raw)) as SocketMessage;\n } catch {\n this.log.debug('Ignoring invalid WebSocket message');\n return;\n }\n switch (msg?.MessageType) {\n case 'ForceKeepAlive':\n this.startKeepAlive(Number(msg.Data) || 60);\n break;\n case 'KeepAlive':\n break;\n case 'Sessions':\n if (Array.isArray(msg.Data)) {\n this.queueSessions(msg.Data as SessionInfo[]);\n }\n break;\n case 'RestartRequired':\n void this.refreshServerInfo(false);\n break;\n case 'ServerRestarting':\n case 'ServerShuttingDown':\n this.log.info(`Jellyfin server: ${msg.MessageType}`);\n break;\n default:\n this.log.silly(`Unhandled WebSocket message ${msg?.MessageType}`);\n }\n }\n\n /**\n * The server asks for a KeepAlive within `seconds`; we answer at half the interval.\n *\n * @param seconds - timeout announced by the server\n */\n private startKeepAlive(seconds: number): void {\n this.stopKeepAlive();\n this.sendSocket({ MessageType: 'KeepAlive' });\n this.keepAliveTimer = this.setInterval(\n () => this.sendSocket({ MessageType: 'KeepAlive' }),\n Math.max(5, seconds / 2) * 1000,\n );\n }\n\n private stopKeepAlive(): void {\n if (this.keepAliveTimer) {\n this.clearInterval(this.keepAliveTimer);\n this.keepAliveTimer = undefined;\n }\n }\n\n /**\n * Sends a message if the socket is open.\n *\n * @param msg - message\n */\n private sendSocket(msg: SocketMessage): void {\n if (this.socket?.readyState === WebSocket.OPEN) {\n this.socket.send(JSON.stringify(msg));\n }\n }\n\n // ---------------------------------------------------------------- sessions\n\n /**\n * Queues a session list; while one list is processed only the newest one is kept.\n *\n * @param list - sessions from REST or WebSocket\n */\n private queueSessions(list: SessionInfo[]): void {\n this.pendingSessions = list;\n if (!this.processing) {\n void this.processSessions();\n }\n }\n\n private async processSessions(): Promise<void> {\n this.processing = true;\n try {\n while (this.pendingSessions && !this.stopping) {\n const list = this.pendingSessions;\n this.pendingSessions = null;\n await this.handleSessions(list);\n }\n } catch (e) {\n this.log.warn(`Processing sessions failed: ${(e as Error).message}`);\n } finally {\n this.processing = false;\n }\n }\n\n /**\n * Writes all sessions to their device objects and marks missing devices as not connected.\n *\n * @param list - sessions\n */\n private async handleSessions(list: SessionInfo[]): Promise<void> {\n const own = list.filter(\n // @KI_HINWEIS: sessions of ioBroker itself (this and other jellyfin instances, test scripts) are no devices.\n // Jellyfin 12 registers our own WebSocket connection with DeviceId = server id (\"Jellyfin Server\",\n // client = name of the API key) \u2013 it is filtered out as well.\n s =>\n !!s?.DeviceId &&\n !!s.Id &&\n !s.DeviceId.startsWith(OWN_DEVICE_PREFIX) &&\n !(this.serverId !== '' && s.DeviceId === this.serverId),\n );\n const current = new Map<string, SessionInfo>();\n for (const dev of groupSessions(own, Date.now()).values()) {\n if (this.onlyRemote && !dev.members.some(m => m.SupportsRemoteControl) && !this.knownDevices.has(dev.id)) {\n continue;\n }\n current.set(dev.id, dev.view);\n }\n\n const opts = { baseUrl: this.api?.baseUrl ?? '', coverHeight: this.coverHeight };\n let playing = 0;\n // @KI_HINWEIS: set before the states are written \u2013 a device whose states are visible must also accept commands.\n this.sessions = current;\n for (const [id, s] of current) {\n await this.prepareDevice(id, s);\n this.offlineDevices.delete(id);\n if (s.NowPlayingItem) {\n playing++;\n }\n for (const [key, val] of Object.entries(sessionValues(s, opts))) {\n await this.writeValue(`${id}.${key}`, val);\n }\n }\n\n for (const id of this.knownDevices) {\n if (!current.has(id)) {\n await this.markOffline(id);\n }\n }\n await this.writeValue('server.activeDevices', current.size);\n await this.writeValue('server.playingDevices', playing);\n }\n\n /**\n * Creates or updates the objects of a device once per adapter run (and when its name changes).\n *\n * @param id - device object id\n * @param s - session\n */\n private async prepareDevice(id: string, s: SessionInfo): Promise<void> {\n const name = [displayName(s), s.Client].filter(Boolean).join(' \u2013 ') || s.DeviceId;\n if (this.preparedDevices.get(id) === name) {\n return;\n }\n await this.extendObject(id, {\n type: 'device',\n common: { name, statusStates: { onlineId: `${this.namespace}.${id}.info.reachable` } },\n native: { deviceId: s.DeviceId },\n });\n if (!this.preparedDevices.has(id)) {\n for (const [ch, chName] of Object.entries(DEVICE_CHANNELS)) {\n await this.extendObject(`${id}.${ch}`, { type: 'channel', common: { name: chName }, native: {} });\n }\n for (const def of DEVICE_STATES) {\n await this.extendObject(`${id}.${def.id}`, { type: 'state', common: toCommon(def), native: {} });\n }\n if (!this.knownDevices.has(id)) {\n this.log.info(`New Jellyfin device: ${name}`);\n }\n }\n this.knownDevices.add(id);\n this.preparedDevices.set(id, name);\n }\n\n /**\n * Marks a device as not connected (once).\n *\n * @param id - device object id\n */\n private async markOffline(id: string): Promise<void> {\n if (this.offlineDevices.has(id)) {\n return;\n }\n this.offlineDevices.add(id);\n await this.writeValue(`${id}.info.reachable`, false);\n await this.writeValue(`${id}.info.remoteControl`, false);\n await this.writeValue(`${id}.media.state`, 'stop');\n }\n\n /** Marks all devices as not connected (connection to the server lost). */\n private markAllOffline(): void {\n this.sessions.clear();\n void (async () => {\n for (const id of this.knownDevices) {\n await this.markOffline(id);\n }\n })();\n }\n\n // @KI_HINWEIS: Jellyfin pushes the full session list every few seconds even without changes; the cache avoids\n // a database read (setStateChanged) for every unchanged state.\n /**\n * Writes an acknowledged value if it differs from the last written one.\n *\n * @param id - state id relative to the namespace\n * @param val - value\n */\n private async writeValue(id: string, val: ioBroker.StateValue): Promise<void> {\n if (this.valueCache.has(id) && this.valueCache.get(id) === val) {\n return;\n }\n this.valueCache.set(id, val);\n await this.setState(id, val, true);\n }\n\n /** Creates the `server` channel. */\n private async createServerObjects(): Promise<void> {\n await this.extendObject('server', { type: 'channel', common: { name: 'Jellyfin server' }, native: {} });\n for (const def of SERVER_STATES) {\n await this.extendObject(def.id, { type: 'state', common: toCommon(def), native: {} });\n }\n }\n\n /** Reloads the sessions via REST (e.g. after a command hit a session that no longer exists). */\n private async reloadSessions(): Promise<void> {\n try {\n if (this.api) {\n this.queueSessions(await this.api.getSessions());\n }\n } catch (e) {\n this.log.debug(`Reloading sessions failed: ${(e as Error).message}`);\n }\n }\n\n // ---------------------------------------------------------------- commands\n\n private async onStateChange(fullId: string, state: ioBroker.State | null | undefined): Promise<void> {\n const api = this.api;\n if (!state || state.ack || !api) {\n return;\n }\n const id = fullId.slice(this.namespace.length + 1);\n if (id === 'server.refreshLibrary') {\n await this.run(id, 'library scan', () => api.refreshLibrary(), state.val);\n return;\n }\n const dot = id.indexOf('.');\n if (dot < 0) {\n return;\n }\n const device = id.slice(0, dot);\n const key = id.slice(dot + 1);\n const s = this.sessions.get(device);\n\n if (key in PLAYSTATE_BUTTONS) {\n const cmd = PLAYSTATE_BUTTONS[key];\n if (this.allowed(device, s, cmd, { type: 'playstate' })) {\n await this.run(id, cmd, () => api.playstate(s.Id, cmd), true);\n }\n return;\n }\n if (key in GENERAL_BUTTONS) {\n const cmd = GENERAL_BUTTONS[key];\n if (this.allowed(device, s, cmd, { type: 'general', name: cmd })) {\n await this.run(id, cmd, () => api.generalCommand(s.Id, cmd), true);\n }\n return;\n }\n\n switch (key) {\n case 'media.seek': {\n const pct = Number(state.val);\n const ticks = s?.NowPlayingItem?.RunTimeTicks;\n let ok = false;\n if (!Number.isFinite(pct) || !ticks) {\n this.log.warn(\n `${this.deviceName(device, s)}: cannot jump, nothing with a known duration is playing`,\n );\n } else if (this.allowed(device, s, 'Seek', { type: 'playstate' })) {\n const target = (clamp(pct, 0, 100) / 100) * ticks;\n // value comes back with the next session report\n ok = await this.run(id, 'Seek', () => api.playstate(s.Id, 'Seek', target), undefined);\n }\n await this.afterValueCommand(id, ok);\n return;\n }\n case 'media.volume': {\n const vol = Math.round(clamp(Number(state.val), 0, 100));\n let ok = false;\n if (this.allowed(device, s, 'SetVolume', { type: 'general', name: 'SetVolume' })) {\n ok = await this.runAudio(id, s, 'SetVolume', vol, () =>\n api.generalCommand(s.Id, 'SetVolume', { Volume: String(vol) }),\n );\n }\n if (!ok) {\n await this.afterValueCommand(id, false);\n }\n return;\n }\n case 'media.mute': {\n const mute = state.val === true || state.val === 'true' || state.val === 1;\n const cmd = mute ? 'Mute' : 'Unmute';\n let ok = false;\n if (this.allowed(device, s, cmd, { type: 'general', name: cmd })) {\n ok = await this.runAudio(id, s, cmd, mute, () => api.generalCommand(s.Id, cmd));\n }\n if (!ok) {\n await this.afterValueCommand(id, false);\n }\n return;\n }\n case 'media.repeat': {\n const mode = String(state.val) as RepeatMode;\n let ok = false;\n if (!(mode in REPEAT_STATES)) {\n this.log.warn(`Invalid repeat mode \"${mode}\", allowed: ${Object.keys(REPEAT_STATES).join(', ')}`);\n } else if (this.allowed(device, s, 'SetRepeatMode', { type: 'general', name: 'SetRepeatMode' })) {\n ok = await this.run(id, 'SetRepeatMode', () => api.setRepeatMode(s.Id, mode), undefined);\n }\n await this.afterValueCommand(id, ok);\n return;\n }\n case 'command.playTitle': {\n const term = typeof state.val === 'string' ? state.val.trim() : '';\n if (!term) {\n return;\n }\n if (this.allowed(device, s, 'PlayNow', { type: 'playstate' })) {\n await this.run(\n id,\n 'PlayNow',\n async () => {\n const item = /^[0-9a-f]{32}$/i.test(term)\n ? { Id: term, Name: term }\n : await api.findItem(term, s.UserId);\n if (!item) {\n throw new Error(`nothing found for \"${term}\"`);\n }\n this.log.info(`${this.deviceName(device, s)}: playing \"${itemLabel(item)}\"`);\n await api.playNow(s.Id, [item.Id]);\n },\n state.val,\n );\n }\n return;\n }\n case 'command.message': {\n const msg = parseMessage(state.val);\n if (!msg) {\n return;\n }\n if (this.allowed(device, s, 'DisplayMessage', { type: 'general', name: 'DisplayMessage' })) {\n await this.run(\n id,\n 'DisplayMessage',\n () => api.sendMessage(s.Id, msg.text, msg.header, msg.timeoutMs),\n state.val,\n );\n }\n return;\n }\n case 'command.generalCommand': {\n const cmd = parseGeneralCommand(state.val);\n if (!cmd) {\n this.log.warn(`${this.deviceName(device, s)}: invalid command \"${String(state.val)}\"`);\n return;\n }\n if (this.allowed(device, s, cmd.name, { type: 'general', name: cmd.name })) {\n await this.run(id, cmd.name, () => api.generalCommand(s.Id, cmd.name, cmd.args), state.val);\n }\n return;\n }\n default:\n return;\n }\n }\n\n /**\n * Checks a command and logs why it is not sent.\n *\n * @param device - device object id\n * @param s - current session\n * @param label - command name for the log\n * @param kind - command kind\n */\n private allowed(device: string, s: SessionInfo | undefined, label: string, kind: CommandKind): s is SessionInfo {\n const reason = checkCommand(s, kind);\n if (reason) {\n this.log.warn(`${this.deviceName(device, s)}: ${label} not sent \u2013 ${reason}`);\n return false;\n }\n return true;\n }\n\n /**\n * Sends a command; on success the state is acknowledged with `ackValue` (undefined = wait for the report).\n *\n * @param id - state id relative to the namespace\n * @param label - command name for the log\n * @param fn - request\n * @param ackValue - value to acknowledge\n */\n private async run(\n id: string,\n label: string,\n fn: () => Promise<void>,\n ackValue: ioBroker.StateValue | undefined,\n ): Promise<boolean> {\n try {\n await fn();\n } catch (e) {\n if (e instanceof JellyfinHttpError && e.status === 404) {\n this.log.warn(`${label}: the device is no longer connected to the server`);\n await this.reloadSessions();\n } else if (e instanceof JellyfinHttpError && e.status === 400) {\n this.log.warn(`${label}: rejected by the server (unknown command or invalid value)`);\n } else {\n this.log.warn(`${label} failed: ${(e as Error).message}`);\n }\n return false;\n }\n this.log.debug(`${label} sent (${id})`);\n if (ackValue !== undefined) {\n await this.setState(id, ackValue, true);\n }\n return true;\n }\n\n /**\n * Volume/mute: clients that report their audio status confirm the value with the next session report,\n * all others (Android TV app) get the commanded value acknowledged directly.\n *\n * @param id - state id relative to the namespace\n * @param s - session\n * @param label - command name for the log\n * @param value - commanded value\n * @param fn - request\n * @returns true if the command was sent\n */\n private async runAudio(\n id: string,\n s: SessionInfo,\n label: string,\n value: ioBroker.StateValue,\n fn: () => Promise<void>,\n ): Promise<boolean> {\n const reported = reportsAudio(s);\n if (!(await this.run(id, label, fn, reported ? undefined : value))) {\n return false;\n }\n if (reported) {\n this.valueCache.delete(id);\n } else {\n this.valueCache.set(id, value);\n }\n return true;\n }\n\n /**\n * After a command on a value state: on success the next session report writes the real value (cache cleared),\n * otherwise the state jumps back to the last acknowledged value instead of keeping the rejected one (ack=false).\n *\n * @param id - state id relative to the namespace\n * @param ok - command was sent successfully\n */\n private async afterValueCommand(id: string, ok: boolean): Promise<void> {\n if (ok) {\n this.valueCache.delete(id);\n return;\n }\n const last = this.valueCache.get(id);\n await this.setState(id, last === undefined ? null : last, true);\n }\n\n /**\n * Readable device name for log messages.\n *\n * @param device - device object id\n * @param s - session\n */\n private deviceName(device: string, s: SessionInfo | undefined): string {\n return s?.DeviceName || this.preparedDevices.get(device) || device;\n }\n\n // ---------------------------------------------------------------- sendTo\n\n /**\n * `sendTo('jellyfin.0', 'message', { text, header?, timeoutMs?, device? })`\n * \u2013 shows a message on one device (object id or name) or on all devices that support messages.\n *\n * @param obj - message\n */\n private async onMessage(obj: ioBroker.Message): Promise<void> {\n if (!obj || obj.command !== 'message') {\n return;\n }\n const payload = (typeof obj.message === 'string' ? { text: obj.message } : obj.message) as Partial<\n MessagePayload & { device: string }\n >;\n const msg = parseMessage(payload);\n let sent = 0;\n const errors: string[] = [];\n if (!msg || !this.api) {\n errors.push(!msg ? 'text is missing' : 'adapter is not connected');\n } else {\n const filter = typeof payload?.device === 'string' ? payload.device.trim().toLowerCase() : '';\n for (const [id, s] of this.sessions) {\n const match =\n !filter ||\n id.toLowerCase() === filter ||\n (s.DeviceName ?? '').toLowerCase().includes(filter) ||\n (this.preparedDevices.get(id) ?? '').toLowerCase().includes(filter);\n if (!match || checkCommand(s, { type: 'general', name: 'DisplayMessage' })) {\n continue;\n }\n try {\n await this.api.sendMessage(s.Id, msg.text, msg.header, msg.timeoutMs);\n sent++;\n } catch (e) {\n errors.push(`${this.deviceName(id, s)}: ${(e as Error).message}`);\n }\n }\n if (!sent && !errors.length) {\n errors.push('no connected device accepts messages');\n }\n }\n if (errors.length) {\n this.log.warn(`sendTo message: ${errors.join('; ')}`);\n }\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, { sent, errors }, obj.callback);\n }\n }\n\n // ---------------------------------------------------------------- unload\n\n private onUnload(callback: () => void): void {\n try {\n this.stopping = true;\n this.stopKeepAlive();\n if (this.reconnectTimer) {\n this.clearTimeout(this.reconnectTimer);\n }\n if (this.serverInfoTimer) {\n this.clearInterval(this.serverInfoTimer);\n }\n if (this.socket) {\n this.sendSocket({ MessageType: 'SessionsStop' });\n this.socket.close();\n this.socket = null;\n }\n void this.setState('info.connection', false, true);\n } finally {\n callback();\n }\n }\n}\n\n/**\n * Limits a number to a range.\n *\n * @param v - value\n * @param min - minimum\n * @param max - maximum\n */\nfunction clamp(v: number, min: number, max: number): number {\n return Number.isFinite(v) ? Math.min(max, Math.max(min, v)) : min;\n}\n\n/**\n * Readable name of a search result for the log, e.g. `Series S01E02 \u2013 Title` or `Title (2004)`.\n *\n * @param i - item\n */\nfunction itemLabel(i: ItemInfo): string {\n if (i.Type === 'Episode' && i.SeriesName) {\n const se = `S${String(i.ParentIndexNumber ?? 0).padStart(2, '0')}E${String(i.IndexNumber ?? 0).padStart(2, '0')}`;\n return `${i.SeriesName} ${se} \u2013 ${i.Name ?? ''}`;\n }\n return i.ProductionYear ? `${i.Name ?? i.Id} (${i.ProductionYear})` : (i.Name ?? i.Id);\n}\n\nif (require.main !== module) {\n // Export the constructor in compact mode\n module.exports = (options: Partial<utils.AdapterOptions> | undefined) => new Jellyfin(options);\n} else {\n // otherwise start the instance directly\n (() => new Jellyfin())();\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAIA,YAAuB;AACvB,iBAAiE;AACjE,qBAA2C;AAC3C,qBAAuF;AACvF,sBAAuE;AACvE,qBAA4E;AAI5E,MAAM,oBAAoB;AAE1B,MAAM,mBAAmB;AAEzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AAEzB,MAAM,0BAA0B,KAAK;AAGrC,MAAM,oBAAsD;AAAA,EACxD,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,kBAAkB;AACtB;AAGA,MAAM,kBAA0C;AAAA,EAC5C,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EACtB,sBAAsB;AAC1B;AAEA,MAAM,iBAAiB,MAAM,QAAQ;AAAA,EACzB,MAA0B;AAAA,EAC1B,SAA2B;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,cAAc;AA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E,YAAM,OAAE,SAAF,YAAU,EAAE;AAAA,EAClD;AACA,SAAO,EAAE,iBAAiB,IAAG,OAAE,SAAF,YAAU,EAAE,EAAE,KAAK,EAAE,cAAc,OAAO,OAAE,SAAF,YAAU,EAAE;AACvF;AAEA,IAAI,QAAQ,SAAS,QAAQ;AAEzB,SAAO,UAAU,CAAC,YAAuD,IAAI,SAAS,OAAO;AACjG,OAAO;AAEH,GAAC,MAAM,IAAI,SAAS,GAAG;AAC3B;",
|
|
4
|
+
"sourcesContent": ["/*\n * ioBroker.jellyfin \u2013 monitor and control Jellyfin clients\n * Copyright (c) 2026 Schimi <github@world-mg.de>, MIT License\n */\nimport * as utils from '@iobroker/adapter-core';\nimport { JellyfinApi, JellyfinHttpError, normalizeBaseUrl } from './lib/api';\nimport { displayName, groupSessions } from './lib/devices';\nimport { DEVICE_CHANNELS, DEVICE_STATES, REPEAT_STATES, SERVER_STATES, toCommon } from './lib/objects';\nimport { tr } from './lib/names';\nimport { parseGeneralCommand, parseMessage, type MessagePayload } from './lib/commands';\nimport { checkCommand, reportsAudio, sessionValues, type CommandKind } from './lib/session';\nimport type { ItemInfo, PlaystateCommand, RepeatMode, SessionInfo, SocketMessage, SystemInfo } from './lib/types';\n\n/** DeviceId prefix of all ioBroker connections (`ioBroker-jellyfin.0`, \u2026); filtered out of the device list. */\nconst OWN_DEVICE_PREFIX = 'ioBroker-';\n/** Minimum supported Jellyfin major version. */\nconst MIN_SERVER_MAJOR = 12;\n/** First and maximum reconnect delay. */\nconst RECONNECT_MIN_MS = 5_000;\nconst RECONNECT_MAX_MS = 60_000;\n/** Server info (update available, restart pending) is refreshed in this interval. */\nconst SERVER_INFO_INTERVAL_MS = 10 * 60_000;\n\n/** Playstate buttons: state id below the device \u2192 Jellyfin command. */\nconst PLAYSTATE_BUTTONS: Record<string, PlaystateCommand> = {\n 'command.play': 'Unpause',\n 'command.pause': 'Pause',\n 'command.playPause': 'PlayPause',\n 'command.stop': 'Stop',\n 'command.next': 'NextTrack',\n 'command.previous': 'PreviousTrack',\n 'command.forward': 'FastForward',\n 'command.rewind': 'Rewind',\n};\n\n/** General command buttons: state id below the device \u2192 GeneralCommandType. */\nconst GENERAL_BUTTONS: Record<string, string> = {\n 'command.volumeUp': 'VolumeUp',\n 'command.volumeDown': 'VolumeDown',\n 'command.toggleMute': 'ToggleMute',\n};\n\nclass Jellyfin extends utils.Adapter {\n private api: JellyfinApi | null = null;\n private socket: WebSocket | null = null;\n private keepAliveTimer: ioBroker.Interval | undefined;\n private reconnectTimer: ioBroker.Timeout | undefined;\n private serverInfoTimer: ioBroker.Interval | undefined;\n private reconnectDelay = RECONNECT_MIN_MS;\n private stopping = false;\n private connectedOnce = false;\n private lastConnectError = '';\n private sessionIntervalMs = 5_000;\n private coverHeight = 300;\n private onlyRemote = false;\n /** Id of the Jellyfin server (from /System/Info) */\n private serverId = '';\n\n /** Current session per device object id. */\n private sessions = new Map<string, SessionInfo>();\n /** Devices whose objects exist (from the database or created in this run). */\n private knownDevices = new Set<string>();\n /** Devices whose objects were created/updated in this run, value = device name written. */\n private preparedDevices = new Map<string, string>();\n /** Devices currently marked as not connected (avoids rewriting the offline values every push). */\n private offlineDevices = new Set<string>();\n /** Last written value per state id (relative), we are the only writer of ack values. */\n private valueCache = new Map<string, ioBroker.StateValue>();\n /** Sessions waiting for processing (only the latest push is kept). */\n private pendingSessions: SessionInfo[] | null = null;\n private processing = false;\n\n public constructor(options: Partial<utils.AdapterOptions> = {}) {\n super({ ...options, name: 'jellyfin' });\n this.on('ready', this.onReady.bind(this));\n this.on('stateChange', this.onStateChange.bind(this));\n this.on('message', this.onMessage.bind(this));\n this.on('unload', this.onUnload.bind(this));\n }\n\n /** Own device id; our WebSocket connection shows up as a session with this id and is filtered out. */\n private get ownDeviceId(): string {\n return `ioBroker-${this.namespace}`;\n }\n\n private async onReady(): Promise<void> {\n await this.setState('info.connection', false, true);\n\n const baseUrl = normalizeBaseUrl(this.config.url);\n if (!baseUrl) {\n this.log.error('Please enter the address of your Jellyfin server in the instance settings.');\n return;\n }\n const apiKey = (this.config.apiKey ?? '').trim();\n if (!apiKey) {\n this.log.error('Please enter an API key in the instance settings (Jellyfin dashboard \u2192 API keys).');\n return;\n }\n this.sessionIntervalMs = clamp(Number(this.config.updateInterval) || 5, 2, 60) * 1000;\n this.coverHeight = clamp(Number(this.config.coverHeight ?? 300), 0, 2000);\n this.onlyRemote = this.config.onlyRemoteControllable === true;\n\n this.api = new JellyfinApi({\n baseUrl,\n apiKey,\n deviceId: this.ownDeviceId,\n version: this.version ?? '0.0.0',\n timeoutMs: clamp(Number(this.config.requestTimeout) || 10, 2, 60) * 1000,\n });\n\n await this.createServerObjects();\n for (const dev of await this.getDevicesAsync()) {\n this.knownDevices.add(dev._id.slice(this.namespace.length + 1));\n }\n\n for (const pattern of ['*.command.*', '*.media.seek', '*.media.volume', '*.media.mute', '*.media.repeat']) {\n this.subscribeStates(pattern);\n }\n this.subscribeStates('server.refreshLibrary');\n\n this.serverInfoTimer = this.setInterval(() => void this.refreshServerInfo(false), SERVER_INFO_INTERVAL_MS);\n await this.connect();\n }\n\n // ---------------------------------------------------------------- connection\n\n /** Checks the server via REST, loads the sessions once and opens the WebSocket. */\n private async connect(): Promise<void> {\n this.reconnectTimer = undefined;\n if (this.stopping || !this.api) {\n return;\n }\n if (!(await this.refreshServerInfo(true))) {\n this.scheduleReconnect();\n return;\n }\n try {\n this.queueSessions(await this.api.getSessions());\n } catch (e) {\n this.log.debug(`Initial session list failed: ${(e as Error).message}`);\n }\n this.openSocket();\n }\n\n /**\n * Reads /System/Info and writes the server states.\n *\n * @param logErrors - log connection errors (only the first occurrence of each error)\n * @returns true if the server answered\n */\n private async refreshServerInfo(logErrors: boolean): Promise<boolean> {\n if (!this.api) {\n return false;\n }\n let info: SystemInfo;\n try {\n info = await this.api.getSystemInfo();\n } catch (e) {\n if (logErrors) {\n this.logConnectError(e);\n }\n return false;\n }\n this.serverId = info.Id ?? this.serverId;\n await this.writeValue('server.name', info.ServerName ?? '');\n await this.writeValue('server.version', info.Version ?? '');\n await this.writeValue('server.updateAvailable', info.HasUpdateAvailable === true);\n await this.writeValue('server.restartPending', info.HasPendingRestart === true);\n const major = parseInt(info.Version ?? '', 10);\n if (logErrors && !Number.isNaN(major) && major < MIN_SERVER_MAJOR) {\n this.log.warn(\n `Jellyfin ${info.Version} is not supported. Please update the server to version ${MIN_SERVER_MAJOR} or newer.`,\n );\n }\n return true;\n }\n\n /**\n * Logs a connection error once (repeated identical errors only on debug level).\n *\n * @param e - error\n */\n private logConnectError(e: unknown): void {\n let text: string;\n if (e instanceof JellyfinHttpError && (e.status === 401 || e.status === 403)) {\n text = 'The Jellyfin server rejected the API key. Please check the key in the instance settings.';\n } else if (e instanceof JellyfinHttpError && e.status === 404) {\n text =\n 'Jellyfin was not found at this address. Please check the server address (incl. port and base path).';\n } else {\n text = `Cannot reach the Jellyfin server: ${(e as Error).message}`;\n }\n if (text !== this.lastConnectError) {\n this.lastConnectError = text;\n this.log.error(text);\n } else {\n this.log.debug(text);\n }\n }\n\n /** Opens the WebSocket. Reconnects are scheduled from the close handler only. */\n private openSocket(): void {\n if (!this.api || this.stopping) {\n return;\n }\n let ws: WebSocket;\n try {\n ws = new WebSocket(this.api.socketUrl);\n } catch (e) {\n this.logConnectError(e);\n this.scheduleReconnect();\n return;\n }\n this.socket = ws;\n ws.onopen = () => {\n this.reconnectDelay = RECONNECT_MIN_MS;\n this.lastConnectError = '';\n // \"initial delay, interval\" in ms \u2013 the server then pushes the session list in this interval\n ws.send(JSON.stringify({ MessageType: 'SessionsStart', Data: `0,${this.sessionIntervalMs}` }));\n void this.setState('info.connection', true, true);\n if (!this.connectedOnce) {\n this.log.info(`Connected to Jellyfin at ${this.api?.baseUrl}`);\n this.connectedOnce = true;\n } else {\n this.log.info('Connection to Jellyfin restored');\n }\n };\n ws.onmessage = ev => this.onSocketMessage(ev.data);\n ws.onerror = () => {\n // WHATWG WebSocket: an error is always followed by a close event\n this.log.debug('WebSocket error');\n };\n ws.onclose = ev => {\n if (this.socket !== ws) {\n return;\n }\n this.socket = null;\n this.stopKeepAlive();\n void this.setState('info.connection', false, true);\n if (this.stopping) {\n return;\n }\n this.log.info(`Connection to Jellyfin closed (code ${ev.code}), reconnecting \u2026`);\n this.markAllOffline();\n this.scheduleReconnect();\n };\n }\n\n private scheduleReconnect(): void {\n if (this.stopping || this.reconnectTimer) {\n return;\n }\n const delay = this.reconnectDelay;\n this.reconnectDelay = Math.min(delay * 2, RECONNECT_MAX_MS);\n this.reconnectTimer = this.setTimeout(() => void this.connect(), delay);\n }\n\n /**\n * Handles one WebSocket message.\n *\n * @param raw - message text\n */\n private onSocketMessage(raw: unknown): void {\n let msg: SocketMessage;\n try {\n msg = JSON.parse(String(raw)) as SocketMessage;\n } catch {\n this.log.debug('Ignoring invalid WebSocket message');\n return;\n }\n switch (msg?.MessageType) {\n case 'ForceKeepAlive':\n this.startKeepAlive(Number(msg.Data) || 60);\n break;\n case 'KeepAlive':\n break;\n case 'Sessions':\n if (Array.isArray(msg.Data)) {\n this.queueSessions(msg.Data as SessionInfo[]);\n }\n break;\n case 'RestartRequired':\n void this.refreshServerInfo(false);\n break;\n case 'ServerRestarting':\n case 'ServerShuttingDown':\n this.log.info(`Jellyfin server: ${msg.MessageType}`);\n break;\n default:\n this.log.silly(`Unhandled WebSocket message ${msg?.MessageType}`);\n }\n }\n\n /**\n * The server asks for a KeepAlive within `seconds`; we answer at half the interval.\n *\n * @param seconds - timeout announced by the server\n */\n private startKeepAlive(seconds: number): void {\n this.stopKeepAlive();\n this.sendSocket({ MessageType: 'KeepAlive' });\n this.keepAliveTimer = this.setInterval(\n () => this.sendSocket({ MessageType: 'KeepAlive' }),\n Math.max(5, seconds / 2) * 1000,\n );\n }\n\n private stopKeepAlive(): void {\n if (this.keepAliveTimer) {\n this.clearInterval(this.keepAliveTimer);\n this.keepAliveTimer = undefined;\n }\n }\n\n /**\n * Sends a message if the socket is open.\n *\n * @param msg - message\n */\n private sendSocket(msg: SocketMessage): void {\n if (this.socket?.readyState === WebSocket.OPEN) {\n this.socket.send(JSON.stringify(msg));\n }\n }\n\n // ---------------------------------------------------------------- sessions\n\n /**\n * Queues a session list; while one list is processed only the newest one is kept.\n *\n * @param list - sessions from REST or WebSocket\n */\n private queueSessions(list: SessionInfo[]): void {\n this.pendingSessions = list;\n if (!this.processing) {\n void this.processSessions();\n }\n }\n\n private async processSessions(): Promise<void> {\n this.processing = true;\n try {\n while (this.pendingSessions && !this.stopping) {\n const list = this.pendingSessions;\n this.pendingSessions = null;\n await this.handleSessions(list);\n }\n } catch (e) {\n this.log.warn(`Processing sessions failed: ${(e as Error).message}`);\n } finally {\n this.processing = false;\n }\n }\n\n /**\n * Writes all sessions to their device objects and marks missing devices as not connected.\n *\n * @param list - sessions\n */\n private async handleSessions(list: SessionInfo[]): Promise<void> {\n const own = list.filter(\n // @KI_HINWEIS: sessions of ioBroker itself (this and other jellyfin instances, test scripts) are no devices.\n // Jellyfin 12 registers our own WebSocket connection with DeviceId = server id (\"Jellyfin Server\",\n // client = name of the API key) \u2013 it is filtered out as well.\n s =>\n !!s?.DeviceId &&\n !!s.Id &&\n !s.DeviceId.startsWith(OWN_DEVICE_PREFIX) &&\n !(this.serverId !== '' && s.DeviceId === this.serverId),\n );\n const current = new Map<string, SessionInfo>();\n for (const dev of groupSessions(own, Date.now()).values()) {\n if (this.onlyRemote && !dev.members.some(m => m.SupportsRemoteControl) && !this.knownDevices.has(dev.id)) {\n continue;\n }\n current.set(dev.id, dev.view);\n }\n\n const opts = { baseUrl: this.api?.baseUrl ?? '', coverHeight: this.coverHeight };\n let playing = 0;\n // @KI_HINWEIS: set before the states are written \u2013 a device whose states are visible must also accept commands.\n this.sessions = current;\n for (const [id, s] of current) {\n await this.prepareDevice(id, s);\n this.offlineDevices.delete(id);\n if (s.NowPlayingItem) {\n playing++;\n }\n for (const [key, val] of Object.entries(sessionValues(s, opts))) {\n await this.writeValue(`${id}.${key}`, val);\n }\n }\n\n for (const id of this.knownDevices) {\n if (!current.has(id)) {\n await this.markOffline(id);\n }\n }\n await this.writeValue('server.activeDevices', current.size);\n await this.writeValue('server.playingDevices', playing);\n }\n\n /**\n * Creates or updates the objects of a device once per adapter run (and when its name changes).\n *\n * @param id - device object id\n * @param s - session\n */\n private async prepareDevice(id: string, s: SessionInfo): Promise<void> {\n const name = [displayName(s), s.Client].filter(Boolean).join(' \u2013 ') || s.DeviceId;\n if (this.preparedDevices.get(id) === name) {\n return;\n }\n await this.extendObject(id, {\n type: 'device',\n common: { name, statusStates: { onlineId: `${this.namespace}.${id}.info.reachable` } },\n native: { deviceId: s.DeviceId },\n });\n if (!this.preparedDevices.has(id)) {\n for (const [ch, chName] of Object.entries(DEVICE_CHANNELS)) {\n await this.extendObject(`${id}.${ch}`, { type: 'channel', common: { name: tr(chName) }, native: {} });\n }\n for (const def of DEVICE_STATES) {\n await this.extendObject(`${id}.${def.id}`, { type: 'state', common: toCommon(def), native: {} });\n }\n if (!this.knownDevices.has(id)) {\n this.log.info(`New Jellyfin device: ${name}`);\n }\n }\n this.knownDevices.add(id);\n this.preparedDevices.set(id, name);\n }\n\n /**\n * Marks a device as not connected (once).\n *\n * @param id - device object id\n */\n private async markOffline(id: string): Promise<void> {\n if (this.offlineDevices.has(id)) {\n return;\n }\n this.offlineDevices.add(id);\n await this.writeValue(`${id}.info.reachable`, false);\n await this.writeValue(`${id}.info.remoteControl`, false);\n await this.writeValue(`${id}.media.state`, 'stop');\n }\n\n /** Marks all devices as not connected (connection to the server lost). */\n private markAllOffline(): void {\n this.sessions.clear();\n void (async () => {\n for (const id of this.knownDevices) {\n await this.markOffline(id);\n }\n })();\n }\n\n // @KI_HINWEIS: Jellyfin pushes the full session list every few seconds even without changes; the cache avoids\n // a database read (setStateChanged) for every unchanged state.\n /**\n * Writes an acknowledged value if it differs from the last written one.\n *\n * @param id - state id relative to the namespace\n * @param val - value\n */\n private async writeValue(id: string, val: ioBroker.StateValue): Promise<void> {\n if (this.valueCache.has(id) && this.valueCache.get(id) === val) {\n return;\n }\n this.valueCache.set(id, val);\n await this.setState(id, val, true);\n }\n\n /** Creates the `server` channel. */\n private async createServerObjects(): Promise<void> {\n // @KI_HINWEIS: js-controller keeps the names of existing instanceObjects on upgrade,\n // so instances installed before 0.1.2 would keep the English-only names.\n await this.extendObject('info', { common: { name: tr('Information') } });\n await this.extendObject('info.connection', { common: { name: tr('Connected to Jellyfin') } });\n await this.extendObject('server', { type: 'channel', common: { name: tr('Jellyfin server') }, native: {} });\n for (const def of SERVER_STATES) {\n await this.extendObject(def.id, { type: 'state', common: toCommon(def), native: {} });\n }\n }\n\n /** Reloads the sessions via REST (e.g. after a command hit a session that no longer exists). */\n private async reloadSessions(): Promise<void> {\n try {\n if (this.api) {\n this.queueSessions(await this.api.getSessions());\n }\n } catch (e) {\n this.log.debug(`Reloading sessions failed: ${(e as Error).message}`);\n }\n }\n\n // ---------------------------------------------------------------- commands\n\n private async onStateChange(fullId: string, state: ioBroker.State | null | undefined): Promise<void> {\n const api = this.api;\n if (!state || state.ack || !api) {\n return;\n }\n const id = fullId.slice(this.namespace.length + 1);\n if (id === 'server.refreshLibrary') {\n await this.run(id, 'library scan', () => api.refreshLibrary(), state.val);\n return;\n }\n const dot = id.indexOf('.');\n if (dot < 0) {\n return;\n }\n const device = id.slice(0, dot);\n const key = id.slice(dot + 1);\n const s = this.sessions.get(device);\n\n if (key in PLAYSTATE_BUTTONS) {\n const cmd = PLAYSTATE_BUTTONS[key];\n if (this.allowed(device, s, cmd, { type: 'playstate' })) {\n await this.run(id, cmd, () => api.playstate(s.Id, cmd), true);\n }\n return;\n }\n if (key in GENERAL_BUTTONS) {\n const cmd = GENERAL_BUTTONS[key];\n if (this.allowed(device, s, cmd, { type: 'general', name: cmd })) {\n await this.run(id, cmd, () => api.generalCommand(s.Id, cmd), true);\n }\n return;\n }\n\n switch (key) {\n case 'media.seek': {\n const pct = Number(state.val);\n const ticks = s?.NowPlayingItem?.RunTimeTicks;\n let ok = false;\n if (!Number.isFinite(pct) || !ticks) {\n this.log.warn(\n `${this.deviceName(device, s)}: cannot jump, nothing with a known duration is playing`,\n );\n } else if (this.allowed(device, s, 'Seek', { type: 'playstate' })) {\n const target = (clamp(pct, 0, 100) / 100) * ticks;\n // value comes back with the next session report\n ok = await this.run(id, 'Seek', () => api.playstate(s.Id, 'Seek', target), undefined);\n }\n await this.afterValueCommand(id, ok);\n return;\n }\n case 'media.volume': {\n const vol = Math.round(clamp(Number(state.val), 0, 100));\n let ok = false;\n if (this.allowed(device, s, 'SetVolume', { type: 'general', name: 'SetVolume' })) {\n ok = await this.runAudio(id, s, 'SetVolume', vol, () =>\n api.generalCommand(s.Id, 'SetVolume', { Volume: String(vol) }),\n );\n }\n if (!ok) {\n await this.afterValueCommand(id, false);\n }\n return;\n }\n case 'media.mute': {\n const mute = state.val === true || state.val === 'true' || state.val === 1;\n const cmd = mute ? 'Mute' : 'Unmute';\n let ok = false;\n if (this.allowed(device, s, cmd, { type: 'general', name: cmd })) {\n ok = await this.runAudio(id, s, cmd, mute, () => api.generalCommand(s.Id, cmd));\n }\n if (!ok) {\n await this.afterValueCommand(id, false);\n }\n return;\n }\n case 'media.repeat': {\n const mode = String(state.val) as RepeatMode;\n let ok = false;\n if (!(mode in REPEAT_STATES)) {\n this.log.warn(`Invalid repeat mode \"${mode}\", allowed: ${Object.keys(REPEAT_STATES).join(', ')}`);\n } else if (this.allowed(device, s, 'SetRepeatMode', { type: 'general', name: 'SetRepeatMode' })) {\n ok = await this.run(id, 'SetRepeatMode', () => api.setRepeatMode(s.Id, mode), undefined);\n }\n await this.afterValueCommand(id, ok);\n return;\n }\n case 'command.playTitle': {\n const term = typeof state.val === 'string' ? state.val.trim() : '';\n if (!term) {\n return;\n }\n if (this.allowed(device, s, 'PlayNow', { type: 'playstate' })) {\n await this.run(\n id,\n 'PlayNow',\n async () => {\n const item = /^[0-9a-f]{32}$/i.test(term)\n ? { Id: term, Name: term }\n : await api.findItem(term, s.UserId);\n if (!item) {\n throw new Error(`nothing found for \"${term}\"`);\n }\n this.log.info(`${this.deviceName(device, s)}: playing \"${itemLabel(item)}\"`);\n await api.playNow(s.Id, [item.Id]);\n },\n state.val,\n );\n }\n return;\n }\n case 'command.message': {\n const msg = parseMessage(state.val);\n if (!msg) {\n return;\n }\n if (this.allowed(device, s, 'DisplayMessage', { type: 'general', name: 'DisplayMessage' })) {\n await this.run(\n id,\n 'DisplayMessage',\n () => api.sendMessage(s.Id, msg.text, msg.header, msg.timeoutMs),\n state.val,\n );\n }\n return;\n }\n case 'command.generalCommand': {\n const cmd = parseGeneralCommand(state.val);\n if (!cmd) {\n this.log.warn(`${this.deviceName(device, s)}: invalid command \"${String(state.val)}\"`);\n return;\n }\n if (this.allowed(device, s, cmd.name, { type: 'general', name: cmd.name })) {\n await this.run(id, cmd.name, () => api.generalCommand(s.Id, cmd.name, cmd.args), state.val);\n }\n return;\n }\n default:\n return;\n }\n }\n\n /**\n * Checks a command and logs why it is not sent.\n *\n * @param device - device object id\n * @param s - current session\n * @param label - command name for the log\n * @param kind - command kind\n */\n private allowed(device: string, s: SessionInfo | undefined, label: string, kind: CommandKind): s is SessionInfo {\n const reason = checkCommand(s, kind);\n if (reason) {\n this.log.warn(`${this.deviceName(device, s)}: ${label} not sent \u2013 ${reason}`);\n return false;\n }\n return true;\n }\n\n /**\n * Sends a command; on success the state is acknowledged with `ackValue` (undefined = wait for the report).\n *\n * @param id - state id relative to the namespace\n * @param label - command name for the log\n * @param fn - request\n * @param ackValue - value to acknowledge\n */\n private async run(\n id: string,\n label: string,\n fn: () => Promise<void>,\n ackValue: ioBroker.StateValue | undefined,\n ): Promise<boolean> {\n try {\n await fn();\n } catch (e) {\n if (e instanceof JellyfinHttpError && e.status === 404) {\n this.log.warn(`${label}: the device is no longer connected to the server`);\n await this.reloadSessions();\n } else if (e instanceof JellyfinHttpError && e.status === 400) {\n this.log.warn(`${label}: rejected by the server (unknown command or invalid value)`);\n } else {\n this.log.warn(`${label} failed: ${(e as Error).message}`);\n }\n return false;\n }\n this.log.debug(`${label} sent (${id})`);\n if (ackValue !== undefined) {\n await this.setState(id, ackValue, true);\n }\n return true;\n }\n\n /**\n * Volume/mute: clients that report their audio status confirm the value with the next session report,\n * all others (Android TV app) get the commanded value acknowledged directly.\n *\n * @param id - state id relative to the namespace\n * @param s - session\n * @param label - command name for the log\n * @param value - commanded value\n * @param fn - request\n * @returns true if the command was sent\n */\n private async runAudio(\n id: string,\n s: SessionInfo,\n label: string,\n value: ioBroker.StateValue,\n fn: () => Promise<void>,\n ): Promise<boolean> {\n const reported = reportsAudio(s);\n if (!(await this.run(id, label, fn, reported ? undefined : value))) {\n return false;\n }\n if (reported) {\n this.valueCache.delete(id);\n } else {\n this.valueCache.set(id, value);\n }\n return true;\n }\n\n /**\n * After a command on a value state: on success the next session report writes the real value (cache cleared),\n * otherwise the state jumps back to the last acknowledged value instead of keeping the rejected one (ack=false).\n *\n * @param id - state id relative to the namespace\n * @param ok - command was sent successfully\n */\n private async afterValueCommand(id: string, ok: boolean): Promise<void> {\n if (ok) {\n this.valueCache.delete(id);\n return;\n }\n const last = this.valueCache.get(id);\n await this.setState(id, last === undefined ? null : last, true);\n }\n\n /**\n * Readable device name for log messages.\n *\n * @param device - device object id\n * @param s - session\n */\n private deviceName(device: string, s: SessionInfo | undefined): string {\n return s?.DeviceName || this.preparedDevices.get(device) || device;\n }\n\n // ---------------------------------------------------------------- sendTo\n\n /**\n * `sendTo('jellyfin.0', 'message', { text, header?, timeoutMs?, device? })`\n * \u2013 shows a message on one device (object id or name) or on all devices that support messages.\n *\n * @param obj - message\n */\n private async onMessage(obj: ioBroker.Message): Promise<void> {\n if (!obj || obj.command !== 'message') {\n return;\n }\n const payload = (typeof obj.message === 'string' ? { text: obj.message } : obj.message) as Partial<\n MessagePayload & { device: string }\n >;\n const msg = parseMessage(payload);\n let sent = 0;\n const errors: string[] = [];\n if (!msg || !this.api) {\n errors.push(!msg ? 'text is missing' : 'adapter is not connected');\n } else {\n const filter = typeof payload?.device === 'string' ? payload.device.trim().toLowerCase() : '';\n for (const [id, s] of this.sessions) {\n const match =\n !filter ||\n id.toLowerCase() === filter ||\n (s.DeviceName ?? '').toLowerCase().includes(filter) ||\n (this.preparedDevices.get(id) ?? '').toLowerCase().includes(filter);\n if (!match || checkCommand(s, { type: 'general', name: 'DisplayMessage' })) {\n continue;\n }\n try {\n await this.api.sendMessage(s.Id, msg.text, msg.header, msg.timeoutMs);\n sent++;\n } catch (e) {\n errors.push(`${this.deviceName(id, s)}: ${(e as Error).message}`);\n }\n }\n if (!sent && !errors.length) {\n errors.push('no connected device accepts messages');\n }\n }\n if (errors.length) {\n this.log.warn(`sendTo message: ${errors.join('; ')}`);\n }\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, { sent, errors }, obj.callback);\n }\n }\n\n // ---------------------------------------------------------------- unload\n\n private onUnload(callback: () => void): void {\n try {\n this.stopping = true;\n this.stopKeepAlive();\n if (this.reconnectTimer) {\n this.clearTimeout(this.reconnectTimer);\n }\n if (this.serverInfoTimer) {\n this.clearInterval(this.serverInfoTimer);\n }\n if (this.socket) {\n this.sendSocket({ MessageType: 'SessionsStop' });\n this.socket.close();\n this.socket = null;\n }\n void this.setState('info.connection', false, true);\n } finally {\n callback();\n }\n }\n}\n\n/**\n * Limits a number to a range.\n *\n * @param v - value\n * @param min - minimum\n * @param max - maximum\n */\nfunction clamp(v: number, min: number, max: number): number {\n return Number.isFinite(v) ? Math.min(max, Math.max(min, v)) : min;\n}\n\n/**\n * Readable name of a search result for the log, e.g. `Series S01E02 \u2013 Title` or `Title (2004)`.\n *\n * @param i - item\n */\nfunction itemLabel(i: ItemInfo): string {\n if (i.Type === 'Episode' && i.SeriesName) {\n const se = `S${String(i.ParentIndexNumber ?? 0).padStart(2, '0')}E${String(i.IndexNumber ?? 0).padStart(2, '0')}`;\n return `${i.SeriesName} ${se} \u2013 ${i.Name ?? ''}`;\n }\n return i.ProductionYear ? `${i.Name ?? i.Id} (${i.ProductionYear})` : (i.Name ?? i.Id);\n}\n\nif (require.main !== module) {\n // Export the constructor in compact mode\n module.exports = (options: Partial<utils.AdapterOptions> | undefined) => new Jellyfin(options);\n} else {\n // otherwise start the instance directly\n (() => new Jellyfin())();\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAIA,YAAuB;AACvB,iBAAiE;AACjE,qBAA2C;AAC3C,qBAAuF;AACvF,mBAAmB;AACnB,sBAAuE;AACvE,qBAA4E;AAI5E,MAAM,oBAAoB;AAE1B,MAAM,mBAAmB;AAEzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AAEzB,MAAM,0BAA0B,KAAK;AAGrC,MAAM,oBAAsD;AAAA,EACxD,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,kBAAkB;AACtB;AAGA,MAAM,kBAA0C;AAAA,EAC5C,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EACtB,sBAAsB;AAC1B;AAEA,MAAM,iBAAiB,MAAM,QAAQ;AAAA,EACzB,MAA0B;AAAA,EAC1B,SAA2B;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,aAAa;AAAA;AAAA,EAEb,WAAW;AAAA;AAAA,EAGX,WAAW,oBAAI,IAAyB;AAAA;AAAA,EAExC,eAAe,oBAAI,IAAY;AAAA;AAAA,EAE/B,kBAAkB,oBAAI,IAAoB;AAAA;AAAA,EAE1C,iBAAiB,oBAAI,IAAY;AAAA;AAAA,EAEjC,aAAa,oBAAI,IAAiC;AAAA;AAAA,EAElD,kBAAwC;AAAA,EACxC,aAAa;AAAA,EAEd,YAAY,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U,EAAE,EAAE,KAAK,EAAE,cAAc,OAAO,OAAE,SAAF,YAAU,EAAE;AACvF;AAEA,IAAI,QAAQ,SAAS,QAAQ;AAEzB,SAAO,UAAU,CAAC,YAAuD,IAAI,SAAS,OAAO;AACjG,OAAO;AAEH,GAAC,MAAM,IAAI,SAAS,GAAG;AAC3B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "jellyfin",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.1.3": {
|
|
7
|
+
"en": "Existing installations also get the translated names of `info` and `info.connection`",
|
|
8
|
+
"de": "Bestehende Anlagen haben auch die übersetzten Namen `info` und `info.connection`",
|
|
9
|
+
"ru": "Существующие установки также получают переведенные названия `info` и `info.connection`",
|
|
10
|
+
"pt": "Instalações existentes também traduzem os nomes `info` e `info.connection`",
|
|
11
|
+
"nl": "Bestaande installaties krijgen ook de vertaalde namen `info` en `info.connection`",
|
|
12
|
+
"fr": "Les installations existantes ont également les noms traduits « info » et « info.connection »",
|
|
13
|
+
"it": "Le installazioni esistenti hanno anche i nomi tradotti di `info` e `info.connection`",
|
|
14
|
+
"es": "Las instalaciones existentes también tienen los nombres traducidos de «info» e «info.connection»",
|
|
15
|
+
"pl": "Istniejące instalacje otrzymują również przetłumaczone nazwy `info` i `info.connection`",
|
|
16
|
+
"uk": "Існуючі установки також отримують перекладені назви `info` і `info.connection`",
|
|
17
|
+
"zh-cn": "现有安装还会获得 “info” 和 “info.connection” 的翻译名称"
|
|
18
|
+
},
|
|
19
|
+
"0.1.2": {
|
|
20
|
+
"en": "Object names are now translated into all 11 admin languages",
|
|
21
|
+
"de": "Objektnamen sind nun in alle 11 Admin-Sprachen übersetzt",
|
|
22
|
+
"ru": "Имена объектов теперь переведены на все 11 языков администрирования",
|
|
23
|
+
"pt": "Agora, os nomes dos objetos são traduzidos em 11 idiomas",
|
|
24
|
+
"nl": "Objectnamen zijn nu vertaald in alle 11 admin-talen",
|
|
25
|
+
"fr": "Les noms des objets sont désormais traduits dans les 11 langues",
|
|
26
|
+
"it": "I nomi degli oggetti sono ora tradotti in 11 lingue",
|
|
27
|
+
"es": "Los nombres de los objetos ya están traducidos a los 11 idiomas de administración",
|
|
28
|
+
"pl": "Nazwy obiektów są teraz przetłumaczone na wszystkie 11 języków administratora",
|
|
29
|
+
"uk": "Назви об'єктів тепер перекладено на всі 11 мов адміністратора",
|
|
30
|
+
"zh-cn": "对象名称现在已翻译成所有 11 种管理语言"
|
|
31
|
+
},
|
|
6
32
|
"0.1.1": {
|
|
7
33
|
"en": "Releases are now published by GitHub Actions (trusted publishing with provenance)\nRemoved the news entry of the unpublished version 0.0.1",
|
|
8
34
|
"de": "Releases werden jetzt von GitHub Actions veröffentlicht (Provenance)\nNewseintrag der unveröffentlichten Version 0.0.1 entfernt",
|
|
@@ -118,7 +144,19 @@
|
|
|
118
144
|
"_id": "info",
|
|
119
145
|
"type": "channel",
|
|
120
146
|
"common": {
|
|
121
|
-
"name":
|
|
147
|
+
"name": {
|
|
148
|
+
"en": "Information",
|
|
149
|
+
"de": "Informationen",
|
|
150
|
+
"ru": "Информация",
|
|
151
|
+
"pt": "Informações",
|
|
152
|
+
"nl": "Informatie",
|
|
153
|
+
"fr": "Informations",
|
|
154
|
+
"it": "Informazioni",
|
|
155
|
+
"es": "Información",
|
|
156
|
+
"pl": "Informacje",
|
|
157
|
+
"uk": "Інформація",
|
|
158
|
+
"zh-cn": "信息"
|
|
159
|
+
}
|
|
122
160
|
},
|
|
123
161
|
"native": {}
|
|
124
162
|
},
|
|
@@ -127,7 +165,19 @@
|
|
|
127
165
|
"type": "state",
|
|
128
166
|
"common": {
|
|
129
167
|
"role": "indicator.connected",
|
|
130
|
-
"name":
|
|
168
|
+
"name": {
|
|
169
|
+
"en": "Connected to Jellyfin",
|
|
170
|
+
"de": "Mit Jellyfin verbunden",
|
|
171
|
+
"ru": "Подключено к Jellyfin",
|
|
172
|
+
"pt": "Conectado ao Jellyfin",
|
|
173
|
+
"nl": "Verbonden met Jellyfin",
|
|
174
|
+
"fr": "Connecté à Jellyfin",
|
|
175
|
+
"it": "Connesso a Jellyfin",
|
|
176
|
+
"es": "Conectado a Jellyfin",
|
|
177
|
+
"pl": "Połączono z Jellyfin",
|
|
178
|
+
"uk": "Підключено до Jellyfin",
|
|
179
|
+
"zh-cn": "已连接到 Jellyfin"
|
|
180
|
+
},
|
|
131
181
|
"type": "boolean",
|
|
132
182
|
"read": true,
|
|
133
183
|
"write": false,
|