aboutsummaryrefslogtreecommitdiff
path: root/run.py
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2020-07-09 14:20:56 -0700
committerJordan <me@jordan.im>2020-07-09 14:20:56 -0700
commitee24bacda8d9015d9d3bb7c0c8d2b7633896cf80 (patch)
tree1c43ce0031474f10e83e586d1ac98ac521cfc4d8 /run.py
parent66ccf888d37eab5d92057cfc949d15f36ea42986 (diff)
downloadroka-ee24bacda8d9015d9d3bb7c0c8d2b7633896cf80.tar.gz
roka-ee24bacda8d9015d9d3bb7c0c8d2b7633896cf80.zip
housekeeping
Diffstat (limited to 'run.py')
-rwxr-xr-xrun.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/run.py b/run.py
index 8d3bed8..e48f19f 100755
--- a/run.py
+++ b/run.py
@@ -31,7 +31,6 @@ def list_books():
return 'book or file not found', 404
f_path = books[a]['files'][f]['path']
-
return send_file(f_path, conditional=True)
# serve up audiobook RSS feed; only audiobook hash provided
@@ -41,11 +40,13 @@ def list_books():
rss = generate_rss(request, books)
return Response(rss, mimetype='text/xml')
+
else:
auth = request.authorization
if not auth or not check_auth(app, auth.username, auth.password):
form = {'WWW-Authenticate': 'Basic realm="o/"'}
return Response('unauthorized', 401, form)
+
return render_template('index.html', books=books)
if __name__ == '__main__':