For automatic cookie import use Tube Archivist Companionbrowser extension.
- For manual cookie import, place your cookie file named cookies.google.txt in cache/import before enabling. Instructions in the Wiki.
+ For manual cookie import, place your cookie file named cookies.google.txt in cache/import before enabling. Instructions in the Wiki.
{{ app_form.downloads_cookie_import }}
{% if config.downloads.cookie_import %}
@@ -174,7 +174,7 @@
Snapshots
Current system snapshot: {{ config.application.enable_snapshot }}
- Automatically create daily deduplicated snapshots of the index, stored in Elasticsearch. Read first before activating: Wiki.
+ Automatically create daily deduplicated snapshots of the index, stored in Elasticsearch. Read first before activating: Wiki.
{{ app_form.application_enable_snapshot }}
From 317942b7e182da48d5c61ac531f202f013dece9b Mon Sep 17 00:00:00 2001
From: Merlin <4706504+MerlinScheurer@users.noreply.github.com>
Date: Mon, 4 Sep 2023 12:51:06 +0200
Subject: [PATCH 02/25] Refac biggest channels to be 3 seperate tables with
ordering and right align (#536)
* Add right align to numbers on biggest channels in dashboard
* Refac biggest channels to be 3 seperate tables with ordering
* Fix aggs linting
---
tubearchivist/api/src/aggs.py | 3 +
tubearchivist/api/views.py | 4 +-
.../home/templates/home/settings.html | 50 +++++++++---
tubearchivist/static/css/style.css | 14 ++--
tubearchivist/static/stats.js | 76 ++++++++++++++-----
5 files changed, 110 insertions(+), 37 deletions(-)
diff --git a/tubearchivist/api/src/aggs.py b/tubearchivist/api/src/aggs.py
index aa35c39..5c9049f 100644
--- a/tubearchivist/api/src/aggs.py
+++ b/tubearchivist/api/src/aggs.py
@@ -196,6 +196,9 @@ class DownloadHist(AggBase):
class BiggestChannel(AggBase):
"""get channel aggregations"""
+ def __init__(self, order):
+ self.data["aggs"][self.name]["multi_terms"]["order"] = {order: "desc"}
+
name = "channel_stats"
path = "ta_video/_search"
data = {
diff --git a/tubearchivist/api/views.py b/tubearchivist/api/views.py
index 24db6dd..5d3e59c 100644
--- a/tubearchivist/api/views.py
+++ b/tubearchivist/api/views.py
@@ -1025,9 +1025,9 @@ class StatBiggestChannel(ApiBaseView):
def get(self, request):
"""handle get request"""
- order = request.GET.get("order", False)
+ order = request.GET.get("order", "doc_count")
if order and order not in self.order_choices:
message = {"message": f"invalid order parameter {order}"}
return Response(message, status=400)
- return Response(BiggestChannel().process())
+ return Response(BiggestChannel(order).process())
diff --git a/tubearchivist/home/templates/home/settings.html b/tubearchivist/home/templates/home/settings.html
index 9524e2a..d28d2a7 100644
--- a/tubearchivist/home/templates/home/settings.html
+++ b/tubearchivist/home/templates/home/settings.html
@@ -22,21 +22,47 @@
diff --git a/tubearchivist/home/templates/home/channel_id.html b/tubearchivist/home/templates/home/channel_id.html
index 421392c..838615b 100644
--- a/tubearchivist/home/templates/home/channel_id.html
+++ b/tubearchivist/home/templates/home/channel_id.html
@@ -106,14 +106,14 @@
{% if results %}
{% for video in results %}
diff --git a/tubearchivist/home/templates/home/home.html b/tubearchivist/home/templates/home/home.html
index ade51aa..59a3478 100644
--- a/tubearchivist/home/templates/home/home.html
+++ b/tubearchivist/home/templates/home/home.html
@@ -95,14 +95,14 @@
{% if results %}
{% for video in results %}
diff --git a/tubearchivist/home/templates/home/playlist_id.html b/tubearchivist/home/templates/home/playlist_id.html
index 525e99a..3faf449 100644
--- a/tubearchivist/home/templates/home/playlist_id.html
+++ b/tubearchivist/home/templates/home/playlist_id.html
@@ -110,14 +110,14 @@
{% if results %}
{% for video in results %}