diff --git a/main.py b/main.py index 276f96b..fbd71b7 100644 --- a/main.py +++ b/main.py @@ -266,6 +266,12 @@ async def main(): subscriptions=subscriptions, ) + +@app.route("/instance", methods=["POST"]) +async def jump_to_instance(): + domain = (await request.form)["domain"] + return redirect("/" + domain) + @app.route("/search", methods = ["POST"]) async def simpleer_search_redirect(): query = (await request.form)["query"] @@ -373,6 +379,7 @@ async def instance_videos_recently_added(domain, page): + @app.route("//search", methods=["POST"]) async def search_redirect(domain): query = (await request.form)["query"] diff --git a/templates/index.html b/templates/index.html index e6106b8..ad9432a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -14,7 +14,19 @@
-
{% if videos|length > 0 %} + + +
+ +
+ +
+ + +
+ + + {% if videos|length > 0 %}

{{ videos|length }} latest videos from local subscriptions

{% for sub in subscriptions %}{% if not loop.first %}, {% endif %}{{ sub.displayName }} (@{{ sub.name }}@{{ sub.host }}){% endfor %}