@muhammedaksam/easiarr 0.7.5 → 0.7.7
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 +1 -1
- package/src/apps/registry.ts +1 -0
- package/src/config/homepage-config.ts +49 -36
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muhammedaksam/easiarr",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
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
|
@@ -148,6 +148,7 @@ export const APPS: Record<AppId, AppDefinition> = {
|
|
|
148
148
|
generateIfMissing: true,
|
|
149
149
|
},
|
|
150
150
|
prowlarrCategoryIds: [7030], // Comics
|
|
151
|
+
homepage: { icon: "mylar.png" },
|
|
151
152
|
// Note: Mylar3 is NOT an *arr app - has different API format (?cmd=<endpoint>)
|
|
152
153
|
// Root folder is configured via Web UI settings, not API
|
|
153
154
|
},
|
|
@@ -86,6 +86,19 @@ export async function generateServicesYaml(config: EasiarrConfig): Promise<strin
|
|
|
86
86
|
service.widget.key = apiKey
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
// Add widget-specific credentials from env
|
|
90
|
+
if (appDef.id === "qbittorrent") {
|
|
91
|
+
const username = env["USERNAME_QBITTORRENT"]
|
|
92
|
+
const password = env["PASSWORD_QBITTORRENT"]
|
|
93
|
+
if (username) service.widget.username = username
|
|
94
|
+
if (password) service.widget.password = password
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (appDef.id === "portainer") {
|
|
98
|
+
// Default to environment 1 (local)
|
|
99
|
+
service.widget.env = env["PORTAINER_ENV"] ?? "1"
|
|
100
|
+
}
|
|
101
|
+
|
|
89
102
|
// Add any custom widget fields
|
|
90
103
|
if (appDef.homepage.widgetFields) {
|
|
91
104
|
Object.assign(service.widget, appDef.homepage.widgetFields)
|
|
@@ -107,31 +120,31 @@ export async function generateServicesYaml(config: EasiarrConfig): Promise<strin
|
|
|
107
120
|
yaml += `- Easiarr:\n`
|
|
108
121
|
// Installed version from local easiarr-status container
|
|
109
122
|
yaml += ` - Installed:\n`
|
|
110
|
-
yaml += `
|
|
111
|
-
yaml += `
|
|
112
|
-
yaml += `
|
|
113
|
-
yaml += `
|
|
114
|
-
yaml += `
|
|
115
|
-
yaml += `
|
|
116
|
-
yaml += `
|
|
117
|
-
yaml += `
|
|
118
|
-
yaml += `
|
|
119
|
-
yaml += `
|
|
123
|
+
yaml += ` href: https://github.com/muhammedaksam/easiarr\n`
|
|
124
|
+
yaml += ` icon: mdi-docker\n`
|
|
125
|
+
yaml += ` description: Your current version\n`
|
|
126
|
+
yaml += ` widget:\n`
|
|
127
|
+
yaml += ` type: customapi\n`
|
|
128
|
+
yaml += ` url: http://easiarr-status:8080/config.json\n`
|
|
129
|
+
yaml += ` refreshInterval: 3600000\n` // 1 hour
|
|
130
|
+
yaml += ` mappings:\n`
|
|
131
|
+
yaml += ` - field: version\n`
|
|
132
|
+
yaml += ` label: Version\n`
|
|
120
133
|
// Latest version from GitHub API
|
|
121
134
|
yaml += ` - Latest:\n`
|
|
122
|
-
yaml += `
|
|
123
|
-
yaml += `
|
|
124
|
-
yaml += `
|
|
125
|
-
yaml += `
|
|
126
|
-
yaml += `
|
|
127
|
-
yaml += `
|
|
128
|
-
yaml += `
|
|
129
|
-
yaml += `
|
|
130
|
-
yaml += `
|
|
131
|
-
yaml += `
|
|
132
|
-
yaml += `
|
|
133
|
-
yaml += `
|
|
134
|
-
yaml += `
|
|
135
|
+
yaml += ` href: https://github.com/muhammedaksam/easiarr/releases\n`
|
|
136
|
+
yaml += ` icon: mdi-github\n`
|
|
137
|
+
yaml += ` description: Check for updates\n`
|
|
138
|
+
yaml += ` widget:\n`
|
|
139
|
+
yaml += ` type: customapi\n`
|
|
140
|
+
yaml += ` url: https://api.github.com/repos/muhammedaksam/easiarr/releases/latest\n`
|
|
141
|
+
yaml += ` refreshInterval: 86400000\n` // 24 hours
|
|
142
|
+
yaml += ` mappings:\n`
|
|
143
|
+
yaml += ` - field: tag_name\n`
|
|
144
|
+
yaml += ` label: Version\n`
|
|
145
|
+
yaml += ` - field: published_at\n`
|
|
146
|
+
yaml += ` label: Released\n`
|
|
147
|
+
yaml += ` format: relativeDate\n`
|
|
135
148
|
yaml += `\n`
|
|
136
149
|
|
|
137
150
|
// Use CATEGORY_ORDER for consistent ordering
|
|
@@ -144,27 +157,27 @@ export async function generateServicesYaml(config: EasiarrConfig): Promise<strin
|
|
|
144
157
|
|
|
145
158
|
for (const { name, service } of services) {
|
|
146
159
|
yaml += ` - ${name}:\n`
|
|
147
|
-
yaml += `
|
|
160
|
+
yaml += ` href: ${service.href}\n`
|
|
148
161
|
|
|
149
162
|
if (service.icon) {
|
|
150
|
-
yaml += `
|
|
163
|
+
yaml += ` icon: ${service.icon}\n`
|
|
151
164
|
}
|
|
152
165
|
|
|
153
166
|
if (service.description) {
|
|
154
|
-
yaml += `
|
|
167
|
+
yaml += ` description: ${service.description}\n`
|
|
155
168
|
}
|
|
156
169
|
|
|
157
170
|
if (service.ping) {
|
|
158
|
-
yaml += `
|
|
171
|
+
yaml += ` ping: ${service.ping}\n`
|
|
159
172
|
}
|
|
160
173
|
|
|
161
174
|
if (service.widget) {
|
|
162
|
-
yaml += `
|
|
163
|
-
yaml += `
|
|
164
|
-
yaml += `
|
|
175
|
+
yaml += ` widget:\n`
|
|
176
|
+
yaml += ` type: ${service.widget.type}\n`
|
|
177
|
+
yaml += ` url: ${service.widget.url}\n`
|
|
165
178
|
|
|
166
179
|
if (service.widget.key) {
|
|
167
|
-
yaml += `
|
|
180
|
+
yaml += ` key: ${service.widget.key}\n`
|
|
168
181
|
}
|
|
169
182
|
|
|
170
183
|
// Add any other widget fields
|
|
@@ -174,17 +187,17 @@ export async function generateServicesYaml(config: EasiarrConfig): Promise<strin
|
|
|
174
187
|
if (key === "mappings") {
|
|
175
188
|
const mappings = typeof value === "string" ? JSON.parse(value) : value
|
|
176
189
|
if (Array.isArray(mappings)) {
|
|
177
|
-
yaml += `
|
|
190
|
+
yaml += ` mappings:\n`
|
|
178
191
|
for (const mapping of mappings) {
|
|
179
|
-
yaml += `
|
|
180
|
-
yaml += `
|
|
192
|
+
yaml += ` - field: ${mapping.field}\n`
|
|
193
|
+
yaml += ` label: ${mapping.label}\n`
|
|
181
194
|
if (mapping.format) {
|
|
182
|
-
yaml += `
|
|
195
|
+
yaml += ` format: ${mapping.format}\n`
|
|
183
196
|
}
|
|
184
197
|
}
|
|
185
198
|
}
|
|
186
199
|
} else {
|
|
187
|
-
yaml += `
|
|
200
|
+
yaml += ` ${key}: ${value}\n`
|
|
188
201
|
}
|
|
189
202
|
}
|
|
190
203
|
}
|