mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-03 00:03:14 -04:00
Show unreadable archives in web interface (#49)
This commit is contained in:
@@ -4,11 +4,14 @@ class ReaderRouter < Router
|
||||
def initialize
|
||||
get "/reader/:title/:entry" do |env|
|
||||
begin
|
||||
username = get_username env
|
||||
|
||||
title = (@context.library.get_title env.params.url["title"]).not_nil!
|
||||
entry = (title.get_entry env.params.url["entry"]).not_nil!
|
||||
|
||||
next layout "reader-error" if entry.err_msg
|
||||
|
||||
# load progress
|
||||
username = get_username env
|
||||
page = entry.load_progress username
|
||||
# we go back 2 * `IMGS_PER_PAGE` pages. the infinite scroll
|
||||
# library perloads a few pages in advance, and the user
|
||||
|
||||
Reference in New Issue
Block a user