Работа над opds

This commit is contained in:
Book Pauk
2022-11-24 17:20:11 +07:00
parent e356b87494
commit fd9bc45fb1
5 changed files with 130 additions and 10 deletions

View File

@@ -8,15 +8,6 @@ class AuthorPage extends BasePage {
this.title = 'Авторы';
}
bookAuthor(author) {
if (author) {
let a = author.split(',');
return a.slice(0, 3).join(', ') + (a.length > 3 ? ' и др.' : '');
}
return '';
}
sortBooks(bookList) {
//схлопывание серий
const books = [];
@@ -175,7 +166,7 @@ class AuthorPage extends BasePage {
entry.push(
this.makeEntry({
id: rec.id,
title: this.bookAuthor(rec.title),//${(query.depth > 1 && rec.count ? ` (${rec.count})` : '')}
title: this.bookAuthor(rec.title),
link: this.navLink({href: `/${this.id}?author=${rec.q}&genre=${encodeURIComponent(query.genre)}`}),
})
);