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

@ -27,6 +27,7 @@ def test_nodeinfo_dump(preferences, mocker, avatar):
"track_favorites": 5,
"music_duration": 6,
"listenings": 7,
"downloads": 42,
}
mocker.patch("funkwhale_api.instance.stats.get", return_value=stats)
@ -61,6 +62,7 @@ def test_nodeinfo_dump(preferences, mocker, avatar):
"usage": {
"favorites": {"tracks": {"total": stats["track_favorites"]}},
"listenings": {"total": stats["listenings"]},
"downloads": {"total": stats["downloads"]},
},
"supportedUploadExtensions": music_utils.SUPPORTED_EXTENSIONS,
"allowList": {"enabled": False, "domains": None},