mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-09 17:04:58 +02:00
Library stats page links to genres, authors, items #453, use overall days when hours > 10000
This commit is contained in:
parent
8be3bebee8
commit
f2d9de5a5f
3 changed files with 24 additions and 11 deletions
|
@ -247,7 +247,8 @@ module.exports = {
|
|||
if (authorsMap[author.id]) authorsMap[author.id].count++
|
||||
else
|
||||
authorsMap[author.id] = {
|
||||
author: author.name,
|
||||
id: author.id,
|
||||
name: author.name,
|
||||
count: 1
|
||||
}
|
||||
})
|
||||
|
@ -257,7 +258,7 @@ module.exports = {
|
|||
|
||||
getItemDurationStats(libraryItems) {
|
||||
var sorted = sort(libraryItems).desc(li => li.media.duration)
|
||||
var top10 = sorted.slice(0, 10).map(li => ({ title: li.media.metadata.title, duration: li.media.duration })).filter(i => i.duration > 0)
|
||||
var top10 = sorted.slice(0, 10).map(li => ({ id: li.id, title: li.media.metadata.title, duration: li.media.duration })).filter(i => i.duration > 0)
|
||||
var totalDuration = 0
|
||||
var numAudioTracks = 0
|
||||
libraryItems.forEach((li) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue