mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-05-18 01:15:31 +02:00
Update episode row to show filename when sorting by filename
This commit is contained in:
parent
007691ffe5
commit
828d5d2afc
@ -10,8 +10,13 @@
|
|||||||
<div class="h-10 flex items-center mt-1.5 mb-0.5 overflow-hidden">
|
<div class="h-10 flex items-center mt-1.5 mb-0.5 overflow-hidden">
|
||||||
<p class="text-sm text-gray-200 line-clamp-2" v-html="episodeSubtitle"></p>
|
<p class="text-sm text-gray-200 line-clamp-2" v-html="episodeSubtitle"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="h-8 flex items-center">
|
<div class="h-8 flex items-center">
|
||||||
<div class="w-full inline-flex justify-between max-w-xl">
|
<p v-if="sortKey === 'audioFile.metadata.filename'" class="text-sm text-gray-300 truncate font-light">
|
||||||
|
<strong className="font-bold">{{ $strings.LabelFilename }}</strong
|
||||||
|
>: {{ episode.audioFile.metadata.filename }}
|
||||||
|
</p>
|
||||||
|
<div v-else class="w-full inline-flex justify-between max-w-xl">
|
||||||
<p v-if="episode?.season" class="text-sm text-gray-300">{{ $getString('LabelSeasonNumber', [episode.season]) }}</p>
|
<p v-if="episode?.season" class="text-sm text-gray-300">{{ $getString('LabelSeasonNumber', [episode.season]) }}</p>
|
||||||
<p v-if="episode?.episode" class="text-sm text-gray-300">{{ $getString('LabelEpisodeNumber', [episode.episode]) }}</p>
|
<p v-if="episode?.episode" class="text-sm text-gray-300">{{ $getString('LabelEpisodeNumber', [episode.episode]) }}</p>
|
||||||
<p v-if="episode?.chapters?.length" class="text-sm text-gray-300">{{ $getString('LabelChapterCount', [episode.chapters.length]) }}</p>
|
<p v-if="episode?.chapters?.length" class="text-sm text-gray-300">{{ $getString('LabelChapterCount', [episode.chapters.length]) }}</p>
|
||||||
@ -65,7 +70,8 @@ export default {
|
|||||||
episode: {
|
episode: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => null
|
default: () => null
|
||||||
}
|
},
|
||||||
|
sortKey: String
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -180,7 +180,7 @@ export default {
|
|||||||
let bValue
|
let bValue
|
||||||
|
|
||||||
if (this.sortKey.includes('.')) {
|
if (this.sortKey.includes('.')) {
|
||||||
const getNestedValue = (ob, s) => s.split('.').reduce((o, k) => o?.[k], ob);
|
const getNestedValue = (ob, s) => s.split('.').reduce((o, k) => o?.[k], ob)
|
||||||
aValue = getNestedValue(a, this.sortKey)
|
aValue = getNestedValue(a, this.sortKey)
|
||||||
bValue = getNestedValue(b, this.sortKey)
|
bValue = getNestedValue(b, this.sortKey)
|
||||||
} else {
|
} else {
|
||||||
@ -454,7 +454,8 @@ export default {
|
|||||||
propsData: {
|
propsData: {
|
||||||
index,
|
index,
|
||||||
libraryItemId: this.libraryItem.id,
|
libraryItemId: this.libraryItem.id,
|
||||||
episode: this.episodesList[index]
|
episode: this.episodesList[index],
|
||||||
|
sortKey: this.sortKey
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$on('selected', (payload) => {
|
this.$on('selected', (payload) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user