From d42f9a9ac43defb1da103d9c524264496f0316f3 Mon Sep 17 00:00:00 2001 From: sqozz Date: Fri, 29 Dec 2017 03:03:47 +0100 Subject: [PATCH] Add basic detail routes --- indexer.py | 6 ++++++ static/css/details.css | 4 ++++ templates/details.html | 11 +++++++++++ templates/index.html | 2 +- 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 static/css/details.css create mode 100644 templates/details.html diff --git a/indexer.py b/indexer.py index 5a02339..a1fcbfb 100644 --- a/indexer.py +++ b/indexer.py @@ -75,6 +75,12 @@ def search(): results = c.fetchall() return render_template("result.html", results=results, strings=strings, language="english", categories=settings["categories"]) +@app.route("/details", methods=['GET']) +def details(): + info_hash = request.args["h"] + print(info_hash) + return render_template("details.html", strings=strings, language="english", categories=settings["categories"]) + def scrapeAll(): TRACKER_URL = "http://tracker.lootbox.cf:6969/" statedump = requests.get(TRACKER_URL + "stats" + "?mode=statedump") diff --git a/static/css/details.css b/static/css/details.css new file mode 100644 index 0000000..8cb4b41 --- /dev/null +++ b/static/css/details.css @@ -0,0 +1,4 @@ +table, th, td { + width: 100%; + border: 1px solid white; +} diff --git a/templates/details.html b/templates/details.html new file mode 100644 index 0000000..753c12b --- /dev/null +++ b/templates/details.html @@ -0,0 +1,11 @@ + +{% extends "index.html" %} +{% block title %}{{ super() }} - Results{% endblock%} +{% set active_page = "search" %} +{% block content %} + + +

DETAILS

+{% endblock content%} diff --git a/templates/index.html b/templates/index.html index 4b72568..9df8269 100644 --- a/templates/index.html +++ b/templates/index.html @@ -31,7 +31,7 @@ vim: ts=2 noexpandtab
-

TorrentIndexer

+

Torrent Indexer