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
# =====================
qb = qbittorrentapi.Client(
if ENABLE_QBITTORRENT:
qb = qbittorrentapi.Client(
host=QBIT_HOST,
username=QBIT_USERNAME,
password=QBIT_PASSWORD
)
try:
)
try:
qb.auth_log_in()
except qbittorrentapi.LoginFailed:
print("Failed to log in to qBittorrent API")
print("✅ Logged in to qBittorrent")
except qbittorrentapi.LoginFailed:
print("❌ Failed to log in to qBittorrent API")
qb = None
else:
qb = None # qBittorrent disabled
# =====================
# DATABASE SETUP