Subscription management and bandwidth accounting

This commit is contained in:
2021-11-22 21:34:14 +01:00
parent 1c75f68812
commit 206dc5e906
10 changed files with 216 additions and 156 deletions

View File

@@ -50,7 +50,7 @@ let update_stats = (id) => {
if (file.size === 0) {
downloads = j.downloads
} else {
downloads = Math.round(j.bandwidth / file.size)
downloads = Math.round((j.bandwidth + j.bandwidth_paid) / file.size)
}
}
socket.onerror = err => {