mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 18:01:42 +00:00
21 lines
350 B
JavaScript
21 lines
350 B
JavaScript
async function loadBrowseCount({ mode, exactCountLoader } = {}) {
|
|
if (mode === 'skip') {
|
|
return {
|
|
total: null,
|
|
isExact: false,
|
|
isDeferred: true
|
|
}
|
|
}
|
|
|
|
const total = await exactCountLoader()
|
|
|
|
return {
|
|
total,
|
|
isExact: true,
|
|
isDeferred: mode === 'deferred-exact'
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
loadBrowseCount
|
|
}
|