diff --git a/src/components/PlexOnDeck.vue b/src/components/PlexOnDeck.vue index d136e51c..ee83faad 100644 --- a/src/components/PlexOnDeck.vue +++ b/src/components/PlexOnDeck.vue @@ -46,7 +46,6 @@ > -
- {{ getTitle(content, fullTitle) }} -
+ {{ getTitle(content, fullTitle) }}
-
- {{ getSecondaryTitle(content, fullTitle) }} -
+ {{ getSecondaryTitle(content, fullTitle) }} +
+ + + {{ getReasonTitle(content) }}
{{ getTitle(content, fullTitle) }}
+ +
+ {{ getSecondaryTitle(content, fullTitle) }} +
+
- {{ getSecondaryTitle(content, fullTitle) }} + {{ getReasonTitle(content) }}
@@ -295,6 +304,12 @@ export default { } }, + beforeDestroy() { + if (this.$el.vanillaTilt) { + this.$el.vanillaTilt.destroy(); + } + }, + methods: { getImageUrl(width) { return this.GET_MEDIA_IMAGE_URL({ diff --git a/src/components/SearchBar.vue b/src/components/SearchBar.vue index 66cd8028..d0da5671 100644 --- a/src/components/SearchBar.vue +++ b/src/components/SearchBar.vue @@ -76,7 +76,7 @@ {{ getTitle(item) }} - {{ getSecondaryTitle(item) }} + {{ getItemSecondaryTitle(item) }} @@ -159,6 +159,12 @@ export default { 'SEARCH_PLEX_SERVER_HUB', ]), + getItemSecondaryTitle(item) { + return item.reason + ? this.getReasonTitle(item) + : this.getSecondaryTitle(item); + }, + getItemThumb({ type, thumb, grandparentThumb }) { switch (type) { case 'movie': diff --git a/src/utils/contenttitleutils.js b/src/utils/contenttitleutils.js index 766f893f..84d0d545 100644 --- a/src/utils/contenttitleutils.js +++ b/src/utils/contenttitleutils.js @@ -1,3 +1,9 @@ +const reasonWord = { + section: 'in', + actor: 'with', + director: 'by', +}; + export default { getTitle: (metadata, fullTitle) => { switch (metadata.type) { @@ -63,4 +69,6 @@ export default { } } }, + + getReasonTitle: ({ reason, reasonTitle }) => `${reasonWord[reason]} ${reasonTitle}`, }; diff --git a/src/views/PlexLibrary.vue b/src/views/PlexLibrary.vue index ee64fd6f..26143bbb 100644 --- a/src/views/PlexLibrary.vue +++ b/src/views/PlexLibrary.vue @@ -60,7 +60,6 @@ >