feat: Add Series and Sequence number to the playlist view for items when applicable

This commit is contained in:
Ben Kugler 2026-04-10 17:46:27 -07:00
parent 88667d00a1
commit b266828b45

View file

@ -19,6 +19,9 @@
<div class="truncate max-w-48 md:max-w-md">
<nuxt-link :to="`/item/${libraryItem.id}`" class="truncate hover:underline text-sm md:text-base">{{ itemTitle }}</nuxt-link>
</div>
<div v-if="seriesList.length" class="truncate max-w-48 md:max-w-md text-xs md:text-sm text-gray-300">
<nuxt-link v-for="_series in seriesList" :key="_series.id" :to="`/library/${libraryItem.libraryId}/series/${_series.id}`" class="hover:underline font-sans text-gray-300"> {{ _series.text }}</nuxt-link>
</div>
<div class="truncate max-w-48 md:max-w-md text-xs md:text-sm text-gray-300">
<template v-for="(author, index) in bookAuthors">
<nuxt-link :key="author.id" :to="`/author/${author.id}`" class="truncate hover:underline">{{ author.name }}</nuxt-link
@ -105,6 +108,17 @@ export default {
if (this.episode) return []
return this.mediaMetadata.authors || []
},
series() {
if (this.episode) return []
return this.mediaMetadata.series || []
},
seriesList() {
return this.series.map((se) => {
let text = se.name
if (se.sequence) text += ` #${se.sequence}`
return { ...se, text }
})
},
itemDuration() {
if (this.episode) return this.$elapsedPretty(this.episode.duration)
return this.$elapsedPretty(this.media.duration)