@muhammedaksam/easiarr 0.4.1 → 0.4.2
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.4.
|
|
3
|
+
"version": "0.4.2",
|
|
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",
|
|
@@ -178,21 +178,33 @@ export class QBittorrentClient {
|
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
180
|
* Configure qBittorrent for TRaSH Guide compliance
|
|
181
|
-
* Sets proper save paths and creates categories based on enabled apps
|
|
181
|
+
* Sets proper save paths and creates categories based on enabled *arr apps
|
|
182
182
|
* @param categories - Array of {name, savePath} for each enabled *arr app
|
|
183
|
+
* @param auth - Optional credentials to enforce (update username/password)
|
|
183
184
|
*/
|
|
184
|
-
async configureTRaSHCompliant(
|
|
185
|
+
async configureTRaSHCompliant(
|
|
186
|
+
categories: QBittorrentCategory[] = [],
|
|
187
|
+
auth?: { user: string; pass: string }
|
|
188
|
+
): Promise<void> {
|
|
185
189
|
debugLog("qBittorrent", "Configuring TRaSH-compliant settings")
|
|
186
190
|
|
|
187
191
|
// 1. Set global preferences
|
|
188
192
|
debugLog("qBittorrent", "Setting save_path to /data/torrents")
|
|
189
|
-
|
|
193
|
+
const prefs: Record<string, unknown> = {
|
|
190
194
|
save_path: "/data/torrents",
|
|
191
195
|
temp_path_enabled: false,
|
|
192
196
|
auto_tmm_enabled: true,
|
|
193
197
|
category_changed_tmm_enabled: true,
|
|
194
198
|
save_path_changed_tmm_enabled: true,
|
|
195
|
-
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if (auth) {
|
|
202
|
+
debugLog("qBittorrent", "Setting WebUI username/password")
|
|
203
|
+
prefs.web_ui_username = auth.user
|
|
204
|
+
prefs.web_ui_password = auth.pass
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
await this.setPreferences(prefs)
|
|
196
208
|
|
|
197
209
|
// 2. Create categories for each enabled media type
|
|
198
210
|
for (const cat of categories) {
|
|
@@ -319,7 +319,7 @@ export class FullAutoSetup extends BoxRenderable {
|
|
|
319
319
|
savePath: `/data/torrents/${cat.name}`,
|
|
320
320
|
}))
|
|
321
321
|
|
|
322
|
-
await client.configureTRaSHCompliant(categories)
|
|
322
|
+
await client.configureTRaSHCompliant(categories, { user, pass })
|
|
323
323
|
this.updateStep("qBittorrent", "success")
|
|
324
324
|
} catch (e) {
|
|
325
325
|
this.updateStep("qBittorrent", "error", `${e}`)
|
|
@@ -162,7 +162,7 @@ export class QBittorrentSetup extends BoxRenderable {
|
|
|
162
162
|
savePath: `/data/torrents/${cat.name}`,
|
|
163
163
|
}))
|
|
164
164
|
|
|
165
|
-
await client.configureTRaSHCompliant(categories)
|
|
165
|
+
await client.configureTRaSHCompliant(categories, { user: this.user, pass: this.pass })
|
|
166
166
|
|
|
167
167
|
const catNames = categories.map((c) => c.name).join(", ") || "none"
|
|
168
168
|
this.statusMessage = `✅ Done!\n\n save_path: /data/torrents\n Categories: ${catNames}\n\n Press Enter to continue.`
|