Skip to content

Commit

Permalink
Update:Podcast episodes fallback to description when subtitle is null a…
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed May 11, 2023
1 parent dfc7877 commit 688531f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
14 changes: 14 additions & 0 deletions client/assets/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,20 @@ Bookshelf Label
-webkit-box-orient: vertical;
}

.episode-subtitle-long {
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
line-height: 16px;
/* fallback */
max-height: 72px;
/* fallback */
-webkit-line-clamp: 6;
/* number of lines to show */
-webkit-box-orient: vertical;
}


/* Padding for toastification toasts in the top right to not cover appbar/toolbar */
.app-bar-and-toolbar .Vue-Toastification__container.top-right {
Expand Down
9 changes: 2 additions & 7 deletions client/components/tables/podcast/EpisodeTableRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<widgets-podcast-type-indicator :type="episode.episodeType" />
</div>

<p class="text-sm text-gray-200 episode-subtitle mt-1.5 mb-0.5">{{ subtitle }}</p>

<p class="text-sm text-gray-200 episode-subtitle mt-1.5 mb-0.5" v-html="subtitle"></p>
<div class="flex justify-between pt-2 max-w-xl">
<p v-if="episode.season" class="text-sm text-gray-300">Season #{{ episode.season }}</p>
<p v-if="episode.episode" class="text-sm text-gray-300">Episode #{{ episode.episode }}</p>
Expand All @@ -22,10 +21,6 @@
<p class="pl-2 pr-1 text-sm font-semibold">{{ timeRemaining }}</p>
</button>

<!-- <button v-if="libraryItemIdStreaming && !isStreamingFromDifferentLibrary" class="h-8 w-8 flex justify-center items-center mx-2" :class="isQueued ? 'text-success' : ''" @click.stop="queueBtnClick">
<span class="material-icons-outlined">{{ isQueued ? 'playlist_add_check' : 'queue' }}</span>
</button> -->

<ui-tooltip v-if="libraryItemIdStreaming && !isStreamingFromDifferentLibrary" :text="isQueued ? $strings.MessageRemoveFromPlayerQueue : $strings.MessageAddToPlayerQueue" :class="isQueued ? 'text-success' : ''" direction="top">
<ui-icon-btn :icon="isQueued ? 'playlist_add_check' : 'playlist_play'" borderless @click="queueBtnClick" />
</ui-tooltip>
Expand Down Expand Up @@ -89,7 +84,7 @@ export default {
return this.episode.title || ''
},
subtitle() {
return this.episode.subtitle || ''
return this.episode.subtitle || this.description
},
description() {
return this.episode.description || ''
Expand Down
2 changes: 1 addition & 1 deletion client/pages/library/_library/podcast/latest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<widgets-podcast-type-indicator :type="episode.episodeType" />
</div>

<p class="text-sm text-gray-200 mb-4">{{ episode.subtitle }}</p>
<p class="text-sm text-gray-200 mb-4 episode-subtitle-long" v-html="episode.subtitle || episode.description" />

<div class="flex items-center">
<button class="h-8 px-4 border border-white border-opacity-20 hover:bg-white hover:bg-opacity-10 rounded-full flex items-center justify-center cursor-pointer focus:outline-none" :class="episode.progress && episode.progress.isFinished ? 'text-white text-opacity-40' : ''" @click.stop="playClick(episode)">
Expand Down

0 comments on commit 688531f

Please sign in to comment.