Library stats page links to genres, authors, items #453, use overall days when hours > 10000

This commit is contained in:
advplyr 2022-04-20 18:43:39 -05:00
parent 8be3bebee8
commit f2d9de5a5f
3 changed files with 24 additions and 11 deletions

View file

@ -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) => {