From b4d6012e2382d792384c40ab42c9ca70bdf03a11 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Sat, 9 Dec 2023 16:17:20 +0800 Subject: [PATCH] OPDS: show author and price in feed --- src/library.js | 3 ++- src/opds/opds.html | 33 +++++++++++++++++++++++++++++---- src/opds/opds.js | 26 +++++++++++++++++++++----- 3 files changed, 52 insertions(+), 10 deletions(-) diff --git a/src/library.js b/src/library.js index f522ae65..8ddb38d0 100644 --- a/src/library.js +++ b/src/library.js @@ -31,6 +31,7 @@ const uiText = { 'http://opds-spec.org/acquisition/borrow': _('Borrow'), 'http://opds-spec.org/acquisition/subscribe': _('Subscribe'), }, + openAccess: _('Free'), pagination: [ _('First'), _('Previous'), @@ -452,7 +453,7 @@ GObject.registerClass({ const initFuncs = [ webView.provide('formatMime', format.mime), webView.provide('formatPrice', - ({ currency, value }) => format.price(currency, value)), + price => price ? format.price(price.currency, price.value) : ''), webView.provide('formatLanguage', format.language), webView.provide('formatDate', format.date), webView.provide('formatList', format.list), diff --git a/src/opds/opds.html b/src/opds/opds.html index c7b2e26f..4fff20a0 100644 --- a/src/opds/opds.html +++ b/src/opds/opds.html @@ -428,6 +428,8 @@