From 62bc76e8069e30ed283aa018e641846e6b65fa77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Sun, 31 May 2026 11:02:04 +0200 Subject: [PATCH] rename columns --- pytorrent/services/preferences.py | 6 +++--- pytorrent/templates/index.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pytorrent/services/preferences.py b/pytorrent/services/preferences.py index 6fd9944..f66624f 100644 --- a/pytorrent/services/preferences.py +++ b/pytorrent/services/preferences.py @@ -36,7 +36,7 @@ RECOMMENDED_TABLE_COLUMNS = { "status": True, "size": True, "progress": True, "down_rate": True, "up_rate": True, "eta": True, "seeds": True, "peers": True, "ratio": True, "path": True, "label": True, "ratio_group": False, "down_total": True, "to_download": True, "up_total": True, - "created": False, "priority": False, "state": False, "active": False, "complete": False, + "created": False, "last_activity": False, "priority": False, "state": False, "active": False, "complete": False, "hashing": False, "message": False, "hash": False, }, "mobileSortFilters": { @@ -48,7 +48,7 @@ RECOMMENDED_TABLE_COLUMNS = { "down_rate": 60, "up_rate": 55, "eta": 53, "seeds": 44, "peers": 49, "ratio": 47, "path": 135, "label": 67, "ratio_group": 87, "down_total": 82, "to_download": 89, "up_total": 44, "created": 150, - "priority": 80, "state": 70, "active": 70, "complete": 82, "hashing": 82, + "last_activity": 150, "priority": 80, "state": 70, "active": 70, "complete": 82, "hashing": 82, "message": 220, "hash": 280, }, } @@ -403,7 +403,7 @@ def save_profile_preferences(user_id: int, profile_id: int | None, data: dict) - direction = int(parsed.get("dir") or 1) except (TypeError, ValueError): direction = 1 - allowed_sort_keys = {"name", "status", "size", "progress", "down_rate", "up_rate", "eta", "seeds", "peers", "ratio", "path", "label", "ratio_group", "down_total", "to_download", "up_total", "created", "priority", "state", "active", "complete", "hashing", "message", "hash"} + allowed_sort_keys = {"name", "status", "size", "progress", "down_rate", "up_rate", "eta", "seeds", "peers", "ratio", "path", "label", "ratio_group", "down_total", "to_download", "up_total", "created", "last_activity", "priority", "state", "active", "complete", "hashing", "message", "hash"} sort_key = str(parsed.get("key") or "name") if sort_key not in allowed_sort_keys: sort_key = "name" diff --git a/pytorrent/templates/index.html b/pytorrent/templates/index.html index 3a6a551..935b516 100644 --- a/pytorrent/templates/index.html +++ b/pytorrent/templates/index.html @@ -98,7 +98,7 @@ NameStatusSizeProgress DLULETASeedsPeers - RatioPathLabelRatio groupDownloadedTo downloadUploadedAddedPriorityStateActiveCompleteHashingMessageHash + RatioPathLabelRatio groupDownloadedTo downloadUploadedCreatedLast activityPriorityStateActiveCompleteHashingMessageHash Waiting for data.