Skip to content

Commit 86568fd

Browse files
committed
fix(opds): generalize numberOfItems fallback for non-stream links
1 parent 03f8747 commit 86568fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const getLink = link => {
165165
price: (isAcquisition || isStream) ? getPrice(link) : undefined,
166166
indirectAcquisition: (isAcquisition || isStream) ? getIndirectAcquisition(link) : undefined,
167167
// --- Pagination / Facet Counters ---
168-
numberOfItems: thrCount != null ? Number(thrCount) : (isFacet && fallbackCount != null) ? Number(fallbackCount) : undefined,
168+
numberOfItems: thrCount != null ? Number(thrCount) : (!isStream && fallbackCount != null) ? Number(fallbackCount) : undefined,
169169
'pse:count': isStream && (pseCount ?? fallbackCount) != null ? Number(pseCount ?? fallbackCount) : undefined,
170170
'pse:lastRead': isStream && pseLastRead != null ? Number(pseLastRead) : undefined,
171171
'pse:lastReadDate': isStream ? pseLastReadDate ?? undefined : undefined,

0 commit comments

Comments
 (0)