From 828d5d2afc62a95cca7b2009df676a49ec234aa6 Mon Sep 17 00:00:00 2001 From: advplyr Date: Fri, 28 Feb 2025 17:42:56 -0600 Subject: [PATCH] Update episode row to show filename when sorting by filename --- client/components/tables/podcast/LazyEpisodeRow.vue | 10 ++++++++-- client/components/tables/podcast/LazyEpisodesTable.vue | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/client/components/tables/podcast/LazyEpisodeRow.vue b/client/components/tables/podcast/LazyEpisodeRow.vue index 8709b1ad..5a4a3a85 100644 --- a/client/components/tables/podcast/LazyEpisodeRow.vue +++ b/client/components/tables/podcast/LazyEpisodeRow.vue @@ -10,8 +10,13 @@

+
-
+

+ {{ $strings.LabelFilename }}: {{ episode.audioFile.metadata.filename }} +

+

{{ $getString('LabelSeasonNumber', [episode.season]) }}

{{ $getString('LabelEpisodeNumber', [episode.episode]) }}

{{ $getString('LabelChapterCount', [episode.chapters.length]) }}

@@ -65,7 +70,8 @@ export default { episode: { type: Object, default: () => null - } + }, + sortKey: String }, data() { return { diff --git a/client/components/tables/podcast/LazyEpisodesTable.vue b/client/components/tables/podcast/LazyEpisodesTable.vue index 04829909..2f95b523 100644 --- a/client/components/tables/podcast/LazyEpisodesTable.vue +++ b/client/components/tables/podcast/LazyEpisodesTable.vue @@ -180,7 +180,7 @@ export default { let bValue 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) bValue = getNestedValue(b, this.sortKey) } else { @@ -454,7 +454,8 @@ export default { propsData: { index, libraryItemId: this.libraryItem.id, - episode: this.episodesList[index] + episode: this.episodesList[index], + sortKey: this.sortKey }, created() { this.$on('selected', (payload) => {