mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-12-23 02:10:14 +00:00
add daily size download
This commit is contained in:
parent
9c26357f76
commit
04124e3dad
@ -170,7 +170,8 @@ class DownloadHist(AggBase):
|
||||
"order": {"_key": "desc"},
|
||||
},
|
||||
"aggs": {
|
||||
"total_videos": {"value_count": {"field": "youtube_id"}}
|
||||
"total_videos": {"value_count": {"field": "youtube_id"}},
|
||||
"media_size": {"sum": {"field": "media_size"}},
|
||||
},
|
||||
}
|
||||
},
|
||||
@ -186,6 +187,7 @@ class DownloadHist(AggBase):
|
||||
{
|
||||
"date": i.get("key_as_string"),
|
||||
"count": i.get("doc_count"),
|
||||
"media_size": i["media_size"].get("value"),
|
||||
}
|
||||
for i in buckets
|
||||
]
|
||||
|
@ -241,7 +241,9 @@ function buildDailyStat(dailyStat) {
|
||||
text = 'Video';
|
||||
}
|
||||
|
||||
message.innerText = `+${dailyStat.count} ${text}`;
|
||||
message.innerText =
|
||||
`+${dailyStat.count} ${text}
|
||||
${humanFileSize(dailyStat.media_size)}`;
|
||||
|
||||
tile.appendChild(message);
|
||||
return tile;
|
||||
|
Loading…
Reference in New Issue
Block a user