Include only local content in nodeinfo stats, added downloads count

This commit is contained in:
Eliot Berriot 2020-02-14 10:21:48 +01:00
parent 8d59d8f27a
commit f146c0ae91
No known key found for this signature in database
GPG key ID: 6B501DFD73514E14
5 changed files with 16 additions and 6 deletions

View file

@ -87,6 +87,7 @@ def get():
data["metadata"]["usage"] = {
"favorites": {"tracks": {"total": statistics["track_favorites"]}},
"listenings": {"total": statistics["listenings"]},
"downloads": {"total": statistics["downloads"]},
}
if not auth_required:
data["metadata"]["knownNodesListUrl"] = federation_utils.full_url(