Displays qBittorrent version in settings
Adds the qBittorrent version to the settings page for better system information and troubleshooting. Also: - Cleans up old log files. - Adds `.dockerignore` to exclude instance folder from docker builds. - Updates app version.
This commit is contained in:
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
instance/*
|
||||
7
app.py
7
app.py
@@ -184,6 +184,7 @@ login_manager.login_view = 'login'
|
||||
login_manager.init_app(app)
|
||||
logger = Logger(log_dir="instance/logs/", level="VERBOSE")
|
||||
qb_connected = False
|
||||
qb_version = ""
|
||||
|
||||
# ─── MODELS ────────────────────────────────────────────────────────────────────
|
||||
class User(db.Model, UserMixin):
|
||||
@@ -313,7 +314,7 @@ def poll_torrents():
|
||||
|
||||
# ─── QBITTORRENT CONNECTION ───────────────────────────────────────────────────────
|
||||
def connect_to_qb():
|
||||
global qb, qb_connected
|
||||
global qb, qb_connected, qb_version
|
||||
config = QBConfig.query.first()
|
||||
if not config:
|
||||
logger.error("QBConfig not found; cannot connect to qBittorrent.")
|
||||
@@ -326,6 +327,7 @@ def connect_to_qb():
|
||||
password=config.password
|
||||
)
|
||||
qb.auth_log_in()
|
||||
qb_version = qb.app_version()
|
||||
logger.info("Connected to qBittorrent.")
|
||||
qb_connected = True
|
||||
return True
|
||||
@@ -546,7 +548,8 @@ def settings():
|
||||
users=users,
|
||||
setting=setting,
|
||||
logs=logger.logs,
|
||||
qb_connected=qb_connected
|
||||
qb_connected=qb_connected,
|
||||
qb_version=qb_version
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
2025-06-04 15:34:21 [DEBUG] Checking for Updated...
|
||||
2025-06-04 15:34:21 [DEBUG] Updater: Current: 1.0.26 Latest: 1.0.25
|
||||
2025-06-04 15:34:21 [INFO] Starting...
|
||||
2025-06-04 15:34:21 [INFO] Creating DB
|
||||
2025-06-04 15:34:21 [WARNING] Note: If your app freezes here, delete qb.db and restart.
|
||||
2025-06-04 15:34:21 [INFO] Connecting to qBit
|
||||
2025-06-04 15:34:21 [ERROR] QBConfig not found; cannot connect to qBittorrent.
|
||||
2025-06-04 15:34:21 [INFO] Done...
|
||||
@@ -1,19 +0,0 @@
|
||||
2025-06-04 15:34:21 [DEBUG] Checking for Updated...
|
||||
2025-06-04 15:34:21 [DEBUG] Updater: Current: 1.0.26 Latest: 1.0.25
|
||||
2025-06-04 15:34:21 [INFO] Starting...
|
||||
2025-06-04 15:34:21 [INFO] Creating DB
|
||||
2025-06-04 15:34:21 [WARNING] Note: If your app freezes here, delete qb.db and restart.
|
||||
2025-06-04 15:34:21 [INFO] Connecting to qBit
|
||||
2025-06-04 15:34:21 [ERROR] QBConfig not found; cannot connect to qBittorrent.
|
||||
2025-06-04 15:34:21 [INFO] Done...
|
||||
2025-06-04 15:34:24 [DEBUG] Checking for Updated...
|
||||
2025-06-04 15:34:24 [DEBUG] Updater: Current: 1.0.26 Latest: 1.0.25
|
||||
2025-06-04 15:34:24 [INFO] Starting...
|
||||
2025-06-04 15:34:24 [INFO] Creating DB
|
||||
2025-06-04 15:34:24 [WARNING] Note: If your app freezes here, delete qb.db and restart.
|
||||
2025-06-04 15:34:24 [INFO] Connecting to qBit
|
||||
2025-06-04 15:34:24 [ERROR] QBConfig not found; cannot connect to qBittorrent.
|
||||
2025-06-04 15:34:24 [INFO] Done...
|
||||
2025-06-04 15:35:01 [INFO] Test connection succeeded for URL 'http://192.168.0.236:8080/', user 'admin'. qBittorrent version: v5.0.4
|
||||
2025-06-04 15:35:04 [INFO] Connected to qBittorrent.
|
||||
2025-06-04 15:35:04 [DEBUG] Rendering registration page.
|
||||
@@ -1,28 +0,0 @@
|
||||
2025-06-04 15:34:21 [DEBUG] Checking for Updated...
|
||||
2025-06-04 15:34:21 [DEBUG] Updater: Current: 1.0.26 Latest: 1.0.25
|
||||
2025-06-04 15:34:21 [INFO] Starting...
|
||||
2025-06-04 15:34:21 [INFO] Creating DB
|
||||
2025-06-04 15:34:21 [WARNING] Note: If your app freezes here, delete qb.db and restart.
|
||||
2025-06-04 15:34:21 [INFO] Connecting to qBit
|
||||
2025-06-04 15:34:21 [ERROR] QBConfig not found; cannot connect to qBittorrent.
|
||||
2025-06-04 15:34:21 [INFO] Done...
|
||||
2025-06-04 15:34:24 [DEBUG] Checking for Updated...
|
||||
2025-06-04 15:34:24 [DEBUG] Updater: Current: 1.0.26 Latest: 1.0.25
|
||||
2025-06-04 15:34:24 [INFO] Starting...
|
||||
2025-06-04 15:34:24 [INFO] Creating DB
|
||||
2025-06-04 15:34:24 [WARNING] Note: If your app freezes here, delete qb.db and restart.
|
||||
2025-06-04 15:34:24 [INFO] Connecting to qBit
|
||||
2025-06-04 15:34:24 [ERROR] QBConfig not found; cannot connect to qBittorrent.
|
||||
2025-06-04 15:34:24 [INFO] Done...
|
||||
2025-06-04 15:35:01 [INFO] Test connection succeeded for URL 'http://192.168.0.236:8080/', user 'admin'. qBittorrent version: v5.0.4
|
||||
2025-06-04 15:35:04 [INFO] Connected to qBittorrent.
|
||||
2025-06-04 15:35:04 [DEBUG] Rendering registration page.
|
||||
2025-06-04 15:35:31 [DEBUG] Checking for Updated...
|
||||
2025-06-04 15:35:31 [DEBUG] Updater: Current: 1.0.26 Latest: 1.0.25
|
||||
2025-06-04 15:35:31 [INFO] Starting...
|
||||
2025-06-04 15:35:31 [INFO] Creating DB
|
||||
2025-06-04 15:35:31 [WARNING] Note: If your app freezes here, delete qb.db and restart.
|
||||
2025-06-04 15:35:31 [INFO] Connecting to qBit
|
||||
2025-06-04 15:35:33 [INFO] Connected to qBittorrent.
|
||||
2025-06-04 15:35:33 [INFO] Done...
|
||||
2025-06-04 15:35:43 [WARNING] Failed login attempt for username 'admin'.
|
||||
@@ -266,6 +266,7 @@
|
||||
<strong>Version:</strong> {{ current_version }}<br>
|
||||
<strong>Users:</strong> {{ users | length }}<br>
|
||||
<strong>qBittorrent:</strong> {{ 'Connected' if qb_connected else 'Disconnected' }}
|
||||
<strong>qBittorrent Version:</strong> {{ qb_version }}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.26
|
||||
1.0.28
|
||||
Reference in New Issue
Block a user