mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 19:42:10 +02:00
Include only local content in nodeinfo stats, added downloads count
This commit is contained in:
parent
8d59d8f27a
commit
f146c0ae91
5 changed files with 16 additions and 6 deletions
|
@ -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},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue