From 72ab94291cc45a4a802cf5fea970c1088f03eb09 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Thu, 24 Nov 2022 18:29:14 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/opds/TitlePage.js | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/server/core/opds/TitlePage.js b/server/core/opds/TitlePage.js index beb92f3..6509cfe 100644 --- a/server/core/opds/TitlePage.js +++ b/server/core/opds/TitlePage.js @@ -38,21 +38,16 @@ class TitlePage extends BasePage { for (const book of filtered) { const title = `${book.serno ? `${book.serno}. `: ''}${book.title || 'Без названия'} (${book.ext})`; - const e = { - id: book._uid, - title, - link: this.acqLink({href: `/book?uid=${encodeURIComponent(book._uid)}`}), - }; - - if (query.all) { - e.content = { - '*ATTRS': {type: 'text'}, - '*TEXT': this.bookAuthor(book.author), - } - } - entry.push( - this.makeEntry(e) + this.makeEntry({ + id: book._uid, + title, + link: this.acqLink({href: `/book?uid=${encodeURIComponent(book._uid)}`}), + content: { + '*ATTRS': {type: 'text'}, + '*TEXT': this.bookAuthor(book.author), + }, + }) ); } }