Fix qbit not disabling properly

This commit is contained in:
2025-09-10 19:33:06 -05:00
parent e5e22b584a
commit a050becc14

18
app.py
View File

@@ -81,15 +81,23 @@ bot = commands.Bot(command_prefix=PREFIX, intents=intents, help_command=None)
# QBITTORRENT SETUP # QBITTORRENT SETUP
# ===================== # =====================
qb = qbittorrentapi.Client( if ENABLE_QBITTORRENT:
qb = qbittorrentapi.Client(
host=QBIT_HOST, host=QBIT_HOST,
username=QBIT_USERNAME, username=QBIT_USERNAME,
password=QBIT_PASSWORD password=QBIT_PASSWORD
) )
try:
try:
qb.auth_log_in() qb.auth_log_in()
except qbittorrentapi.LoginFailed: print("✅ Logged in to qBittorrent")
print("Failed to log in to qBittorrent API") except qbittorrentapi.LoginFailed:
print("❌ Failed to log in to qBittorrent API")
qb = None
else:
qb = None # qBittorrent disabled
# ===================== # =====================
# DATABASE SETUP # DATABASE SETUP