@muhammedaksam/easiarr 1.4.0 → 1.6.0
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/dist/index.js +29750 -0
- package/package.json +15 -15
- package/src/VersionInfo.ts +0 -12
- package/src/api/arr-api.ts +0 -521
- package/src/api/auto-setup-types.ts +0 -64
- package/src/api/base-api.ts +0 -216
- package/src/api/bazarr-api.ts +0 -297
- package/src/api/cloudflare-api.ts +0 -493
- package/src/api/custom-format-api.ts +0 -224
- package/src/api/grafana-api.ts +0 -230
- package/src/api/heimdall-api.ts +0 -141
- package/src/api/homarr-api.ts +0 -209
- package/src/api/huntarr-api.ts +0 -457
- package/src/api/index.ts +0 -9
- package/src/api/jellyfin-api.ts +0 -389
- package/src/api/jellyseerr-api.ts +0 -559
- package/src/api/maintainerr-api.ts +0 -461
- package/src/api/naming-config.ts +0 -101
- package/src/api/overseerr-api.ts +0 -392
- package/src/api/plex-api.ts +0 -308
- package/src/api/portainer-api.ts +0 -374
- package/src/api/profilarr-api.ts +0 -391
- package/src/api/prowlarr-api.ts +0 -488
- package/src/api/qbittorrent-api.ts +0 -300
- package/src/api/quality-profile-api.ts +0 -272
- package/src/api/tautulli-api.ts +0 -244
- package/src/api/uptime-kuma-api.ts +0 -343
- package/src/apps/categories.ts +0 -14
- package/src/apps/index.ts +0 -2
- package/src/apps/registry.ts +0 -1275
- package/src/compose/caddy-config.ts +0 -130
- package/src/compose/generator.ts +0 -287
- package/src/compose/index.ts +0 -7
- package/src/compose/templates.ts +0 -78
- package/src/compose/traefik-config.ts +0 -187
- package/src/config/bookmarks-generator.ts +0 -160
- package/src/config/defaults.ts +0 -37
- package/src/config/homepage-config.ts +0 -381
- package/src/config/index.ts +0 -6
- package/src/config/manager.ts +0 -150
- package/src/config/recyclarr-config.ts +0 -181
- package/src/config/schema.ts +0 -310
- package/src/config/slskd-config.ts +0 -86
- package/src/config/soularr-config.ts +0 -105
- package/src/config/trash-quality-definitions.ts +0 -213
- package/src/data/lidarr-custom-formats.ts +0 -127
- package/src/data/trash-profiles.ts +0 -333
- package/src/docker/client.ts +0 -312
- package/src/docker/index.ts +0 -18
- package/src/index.ts +0 -77
- package/src/setup/actions/arr-common.ts +0 -307
- package/src/setup/actions/dashboards.ts +0 -79
- package/src/setup/actions/download-clients.ts +0 -54
- package/src/setup/actions/jellyseerr.ts +0 -331
- package/src/setup/actions/media-servers.ts +0 -68
- package/src/setup/actions/monitoring.ts +0 -120
- package/src/setup/actions/prowlarr.ts +0 -137
- package/src/setup/actions/utilities.ts +0 -490
- package/src/setup/index.ts +0 -78
- package/src/setup/types.ts +0 -144
- package/src/structure/manager.ts +0 -129
- package/src/ui/App.ts +0 -111
- package/src/ui/components/ApplicationSelector.ts +0 -275
- package/src/ui/components/CredentialsForm.ts +0 -180
- package/src/ui/components/DownloadClientForm.ts +0 -114
- package/src/ui/components/FileEditor.ts +0 -91
- package/src/ui/components/FooterHint.ts +0 -119
- package/src/ui/components/PageLayout.ts +0 -160
- package/src/ui/components/UpdateNotification.ts +0 -102
- package/src/ui/index.ts +0 -7
- package/src/ui/screens/AdvancedSettings.ts +0 -188
- package/src/ui/screens/ApiKeyViewer.ts +0 -511
- package/src/ui/screens/AppConfigurator.ts +0 -543
- package/src/ui/screens/AppManager.ts +0 -284
- package/src/ui/screens/ContainerControl.ts +0 -581
- package/src/ui/screens/LogsViewer.ts +0 -478
- package/src/ui/screens/MainMenu.ts +0 -299
- package/src/ui/screens/MonitorDashboard.ts +0 -881
- package/src/ui/screens/SecretsEditor.ts +0 -216
- package/src/ui/screens/SettingsScreen.ts +0 -633
- package/src/ui/screens/index.ts +0 -22
- package/src/ui/screens/setup/BaseAppSetupScreen.ts +0 -375
- package/src/ui/screens/setup/CloudflaredSetup.ts +0 -460
- package/src/ui/screens/setup/FullAutoSetup.ts +0 -766
- package/src/ui/screens/setup/HomepageSetup.ts +0 -165
- package/src/ui/screens/setup/JellyfinSetup.ts +0 -328
- package/src/ui/screens/setup/JellyseerrSetup.ts +0 -242
- package/src/ui/screens/setup/ProwlarrSetup.ts +0 -500
- package/src/ui/screens/setup/QBittorrentSetup.ts +0 -221
- package/src/ui/screens/setup/QuickSetup.ts +0 -1169
- package/src/ui/screens/setup/RecyclarrSetup.ts +0 -270
- package/src/ui/screens/setup/TRaSHProfileSetup.ts +0 -381
- package/src/utils/arch.ts +0 -78
- package/src/utils/browser.ts +0 -27
- package/src/utils/categories.ts +0 -61
- package/src/utils/debug.ts +0 -84
- package/src/utils/env.ts +0 -138
- package/src/utils/index.ts +0 -8
- package/src/utils/logs.ts +0 -119
- package/src/utils/migrations/1765626338_rename_env_variables.ts +0 -102
- package/src/utils/migrations/1765707135_rename_easiarr_status.ts +0 -91
- package/src/utils/migrations/1765732722_remove_cloudflare_dns_api_token.ts +0 -45
- package/src/utils/migrations/1769515650_migrate_to_xdg.ts +0 -114
- package/src/utils/migrations.ts +0 -165
- package/src/utils/password.ts +0 -42
- package/src/utils/paths.ts +0 -33
- package/src/utils/unraid.ts +0 -103
- package/src/utils/update-checker.ts +0 -210
- package/src/utils/url-utils.ts +0 -38
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* qBittorrent Setup Screen
|
|
3
|
-
* Configure qBittorrent for TRaSH Guide compliance
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { KeyEvent, TextRenderable } from "@opentui/core"
|
|
7
|
-
|
|
8
|
-
import type { QBittorrentCategory } from "~/api/qbittorrent-api"
|
|
9
|
-
import type { MenuItem, SetupStep } from "~/ui/screens/setup/BaseAppSetupScreen"
|
|
10
|
-
import { QBittorrentClient } from "~/api/qbittorrent-api"
|
|
11
|
-
import { BaseAppSetupScreen } from "~/ui/screens/setup/BaseAppSetupScreen"
|
|
12
|
-
import { getCategoriesForApps } from "~/utils/categories"
|
|
13
|
-
import { debugLog } from "~/utils/debug"
|
|
14
|
-
|
|
15
|
-
// Extended step for input wizard
|
|
16
|
-
type QBitStep = SetupStep | "host" | "port" | "user" | "pass" | "configuring"
|
|
17
|
-
|
|
18
|
-
export class QBittorrentSetup extends BaseAppSetupScreen {
|
|
19
|
-
// Extended step (typed separately to avoid TS issues)
|
|
20
|
-
private wizardStep: QBitStep = "menu"
|
|
21
|
-
private host = "localhost"
|
|
22
|
-
private port = 8080
|
|
23
|
-
private user = "admin"
|
|
24
|
-
private pass = ""
|
|
25
|
-
private inputValue = ""
|
|
26
|
-
private statusMessage = ""
|
|
27
|
-
private statusColor = "#f1fa8c"
|
|
28
|
-
|
|
29
|
-
getTitle(): string {
|
|
30
|
-
return "qBittorrent Setup"
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
getStepInfo(): string {
|
|
34
|
-
return "Configure TRaSH-compliant paths and categories"
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
getMenuItems(): MenuItem[] {
|
|
38
|
-
return [
|
|
39
|
-
{
|
|
40
|
-
name: "🔧 Configure qBittorrent",
|
|
41
|
-
description: "Set save path and categories",
|
|
42
|
-
action: () => this.startWizard(),
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "⬅️ Back",
|
|
46
|
-
description: "Return to main menu",
|
|
47
|
-
action: () => this.cleanup(),
|
|
48
|
-
},
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// ============================================
|
|
53
|
-
// CUSTOM KEY HANDLING - Input wizard
|
|
54
|
-
// ============================================
|
|
55
|
-
|
|
56
|
-
protected handleCustomKeys(key: KeyEvent): boolean {
|
|
57
|
-
const inputSteps: QBitStep[] = ["host", "port", "user", "pass"]
|
|
58
|
-
|
|
59
|
-
// Handle input steps
|
|
60
|
-
if (inputSteps.includes(this.wizardStep)) {
|
|
61
|
-
if (key.name === "return") {
|
|
62
|
-
this.handleInputSubmit()
|
|
63
|
-
} else if (key.name === "backspace") {
|
|
64
|
-
this.inputValue = this.inputValue.slice(0, -1)
|
|
65
|
-
this.refreshContent()
|
|
66
|
-
} else if (key.sequence && key.sequence.length === 1 && !key.ctrl) {
|
|
67
|
-
this.inputValue += key.sequence
|
|
68
|
-
this.refreshContent()
|
|
69
|
-
} else if (key.name === "escape") {
|
|
70
|
-
this.wizardStep = "menu"
|
|
71
|
-
this.currentStep = "menu"
|
|
72
|
-
this.refreshContent()
|
|
73
|
-
}
|
|
74
|
-
return true
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Handle configuring/done steps
|
|
78
|
-
if (this.wizardStep === "configuring" || this.wizardStep === "done") {
|
|
79
|
-
if (key.name === "return" || key.name === "escape") {
|
|
80
|
-
this.wizardStep = "menu"
|
|
81
|
-
this.currentStep = "menu"
|
|
82
|
-
this.refreshContent()
|
|
83
|
-
}
|
|
84
|
-
return true
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return false // Default handling for menu
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// ============================================
|
|
91
|
-
// CUSTOM RENDERING - Wizard steps
|
|
92
|
-
// ============================================
|
|
93
|
-
|
|
94
|
-
protected renderCustomContent(): boolean {
|
|
95
|
-
const inputSteps: QBitStep[] = ["host", "port", "user", "pass"]
|
|
96
|
-
|
|
97
|
-
if (inputSteps.includes(this.wizardStep)) {
|
|
98
|
-
this.renderInput()
|
|
99
|
-
return true
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (this.wizardStep === "configuring" || this.wizardStep === "done") {
|
|
103
|
-
this.renderStatus()
|
|
104
|
-
return true
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return false // Default menu rendering
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
private renderInput(): void {
|
|
111
|
-
const labels: Record<string, string> = {
|
|
112
|
-
host: "Enter qBittorrent host (e.g., localhost or qbittorrent):",
|
|
113
|
-
port: "Enter qBittorrent WebUI port:",
|
|
114
|
-
user: "Enter qBittorrent username:",
|
|
115
|
-
pass: "Enter qBittorrent password:",
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
this.contentBox.add(
|
|
119
|
-
new TextRenderable(this.cliRenderer, {
|
|
120
|
-
content: `${labels[this.wizardStep]}\n\n`,
|
|
121
|
-
fg: "#8be9fd",
|
|
122
|
-
})
|
|
123
|
-
)
|
|
124
|
-
|
|
125
|
-
const displayValue =
|
|
126
|
-
this.wizardStep === "pass" ? "*".repeat(this.inputValue.length) : this.inputValue
|
|
127
|
-
this.contentBox.add(
|
|
128
|
-
new TextRenderable(this.cliRenderer, {
|
|
129
|
-
content: `> ${displayValue}_`,
|
|
130
|
-
fg: "#ffffff",
|
|
131
|
-
})
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
private renderStatus(): void {
|
|
136
|
-
this.contentBox.add(
|
|
137
|
-
new TextRenderable(this.cliRenderer, {
|
|
138
|
-
content: this.statusMessage,
|
|
139
|
-
fg: this.statusColor,
|
|
140
|
-
})
|
|
141
|
-
)
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// ============================================
|
|
145
|
-
// WIZARD LOGIC
|
|
146
|
-
// ============================================
|
|
147
|
-
|
|
148
|
-
private startWizard(): void {
|
|
149
|
-
this.wizardStep = "host"
|
|
150
|
-
this.inputValue = this.host
|
|
151
|
-
this.refreshContent()
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
private handleInputSubmit(): void {
|
|
155
|
-
if (this.wizardStep === "host") {
|
|
156
|
-
if (this.inputValue.trim()) this.host = this.inputValue.trim()
|
|
157
|
-
this.wizardStep = "port"
|
|
158
|
-
this.inputValue = String(this.port)
|
|
159
|
-
} else if (this.wizardStep === "port") {
|
|
160
|
-
const p = parseInt(this.inputValue)
|
|
161
|
-
if (!isNaN(p)) this.port = p
|
|
162
|
-
this.wizardStep = "user"
|
|
163
|
-
this.inputValue = this.user
|
|
164
|
-
} else if (this.wizardStep === "user") {
|
|
165
|
-
if (this.inputValue.trim()) this.user = this.inputValue.trim()
|
|
166
|
-
this.wizardStep = "pass"
|
|
167
|
-
this.inputValue = ""
|
|
168
|
-
} else if (this.wizardStep === "pass") {
|
|
169
|
-
this.pass = this.inputValue
|
|
170
|
-
this.wizardStep = "configuring"
|
|
171
|
-
this.configure()
|
|
172
|
-
return
|
|
173
|
-
}
|
|
174
|
-
this.refreshContent()
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
private async configure(): Promise<void> {
|
|
178
|
-
this.statusMessage = "⏳ Connecting to qBittorrent..."
|
|
179
|
-
this.statusColor = "#f1fa8c"
|
|
180
|
-
this.refreshContent()
|
|
181
|
-
|
|
182
|
-
try {
|
|
183
|
-
debugLog("qBittorrent", `Connecting to ${this.host}:${this.port}`)
|
|
184
|
-
const client = new QBittorrentClient(this.host, this.port, this.user, this.pass)
|
|
185
|
-
const loggedIn = await client.login()
|
|
186
|
-
|
|
187
|
-
if (!loggedIn) {
|
|
188
|
-
this.statusMessage = "❌ Login failed. Check credentials."
|
|
189
|
-
this.statusColor = "#ff5555"
|
|
190
|
-
this.wizardStep = "done"
|
|
191
|
-
this.refreshContent()
|
|
192
|
-
return
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
this.statusMessage = "✅ Logged in. Configuring..."
|
|
196
|
-
this.statusColor = "#50fa7b"
|
|
197
|
-
this.refreshContent()
|
|
198
|
-
|
|
199
|
-
// Get categories from enabled *arr apps
|
|
200
|
-
const enabledApps = this.config.apps.filter((a) => a.enabled).map((a) => a.id)
|
|
201
|
-
const categories: QBittorrentCategory[] = getCategoriesForApps(enabledApps).map((cat) => ({
|
|
202
|
-
name: cat.name,
|
|
203
|
-
savePath: `/data/torrents/${cat.name}`,
|
|
204
|
-
}))
|
|
205
|
-
|
|
206
|
-
await client.configureTRaSHCompliant(categories, { user: this.user, pass: this.pass })
|
|
207
|
-
|
|
208
|
-
const catNames = categories.map((c) => c.name).join(", ") || "none"
|
|
209
|
-
this.statusMessage = `✅ Done!\n\n save_path: /data/torrents\n Categories: ${catNames}\n\n Press Enter to continue.`
|
|
210
|
-
this.statusColor = "#50fa7b"
|
|
211
|
-
this.wizardStep = "done"
|
|
212
|
-
this.refreshContent()
|
|
213
|
-
} catch (e) {
|
|
214
|
-
debugLog("qBittorrent", `Error: ${e}`)
|
|
215
|
-
this.statusMessage = `❌ Error: ${e}`
|
|
216
|
-
this.statusColor = "#ff5555"
|
|
217
|
-
this.wizardStep = "done"
|
|
218
|
-
this.refreshContent()
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|