This commit is contained in:
2025-04-18 17:33:48 +02:00
parent 26fb8b1678
commit 57346dd811
10 changed files with 757 additions and 19 deletions

View File

@@ -98,7 +98,7 @@ class UserViewSet(mixins.RetrieveModelMixin,
stats = User.objects.filter(id=request.user.id).aggregate(
total_size=Sum("torrents__size"),
total_torrent=Count("torrents"),
total_shared_torrent=Count("torrents_shares")
total_shared_torrent=Count("torrents_shares", distinct=True),
)
disk_usage = shutil.disk_usage("/")