@muhammedaksam/easiarr 0.7.3 → 0.7.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muhammedaksam/easiarr",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "TUI tool for generating docker-compose files for the *arr media ecosystem with 41 apps, TRaSH Guides best practices, VPN routing, and Traefik reverse proxy support",
|
|
5
5
|
"module": "src/index.ts",
|
|
6
6
|
"type": "module",
|
package/src/apps/registry.ts
CHANGED
|
@@ -591,7 +591,7 @@ export const APPS: Record<AppId, AppDefinition> = {
|
|
|
591
591
|
image: "halverneus/static-file-server:latest",
|
|
592
592
|
puid: 0,
|
|
593
593
|
pgid: 0,
|
|
594
|
-
volumes: (
|
|
594
|
+
volumes: () => ["${HOME}/.easiarr/config.json:/web/config.json:ro"],
|
|
595
595
|
environment: {
|
|
596
596
|
FOLDER: "/web",
|
|
597
597
|
CORS: "true",
|
|
@@ -600,7 +600,7 @@ export const APPS: Record<AppId, AppDefinition> = {
|
|
|
600
600
|
icon: "mdi-docker",
|
|
601
601
|
widget: "customapi",
|
|
602
602
|
widgetFields: {
|
|
603
|
-
url: "http://easiarr-status:8080
|
|
603
|
+
url: "http://easiarr-status:8080/config.json",
|
|
604
604
|
mappings: JSON.stringify([{ field: "version", label: "Installed" }]),
|
|
605
605
|
},
|
|
606
606
|
},
|
|
@@ -112,7 +112,7 @@ export async function generateServicesYaml(config: EasiarrConfig): Promise<strin
|
|
|
112
112
|
yaml += ` description: Your current version\n`
|
|
113
113
|
yaml += ` widget:\n`
|
|
114
114
|
yaml += ` type: customapi\n`
|
|
115
|
-
yaml += ` url: http://easiarr-status:8080
|
|
115
|
+
yaml += ` url: http://easiarr-status:8080/config.json\n`
|
|
116
116
|
yaml += ` refreshInterval: 3600000\n` // 1 hour
|
|
117
117
|
yaml += ` mappings:\n`
|
|
118
118
|
yaml += ` - field: version\n`
|
|
@@ -170,7 +170,22 @@ export async function generateServicesYaml(config: EasiarrConfig): Promise<strin
|
|
|
170
170
|
// Add any other widget fields
|
|
171
171
|
for (const [key, value] of Object.entries(service.widget)) {
|
|
172
172
|
if (key !== "type" && key !== "url" && key !== "key") {
|
|
173
|
-
|
|
173
|
+
// Handle mappings array specially
|
|
174
|
+
if (key === "mappings") {
|
|
175
|
+
const mappings = typeof value === "string" ? JSON.parse(value) : value
|
|
176
|
+
if (Array.isArray(mappings)) {
|
|
177
|
+
yaml += ` mappings:\n`
|
|
178
|
+
for (const mapping of mappings) {
|
|
179
|
+
yaml += ` - field: ${mapping.field}\n`
|
|
180
|
+
yaml += ` label: ${mapping.label}\n`
|
|
181
|
+
if (mapping.format) {
|
|
182
|
+
yaml += ` format: ${mapping.format}\n`
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
} else {
|
|
187
|
+
yaml += ` ${key}: ${value}\n`
|
|
188
|
+
}
|
|
174
189
|
}
|
|
175
190
|
}
|
|
176
191
|
}
|