diff --git a/client/components/app/MediaPlayerContainer.vue b/client/components/app/MediaPlayerContainer.vue index 1f6846541e..f13fd840e4 100644 --- a/client/components/app/MediaPlayerContainer.vue +++ b/client/components/app/MediaPlayerContainer.vue @@ -41,6 +41,7 @@ :bookmarks="bookmarks" :sleep-timer-set="sleepTimerSet" :sleep-timer-remaining="sleepTimerRemaining" + :sleep-timer-type="sleepTimerType" :is-podcast="isPodcast" @playPause="playPause" @jumpForward="jumpForward" diff --git a/client/components/player/PlayerUi.vue b/client/components/player/PlayerUi.vue index 058c6e1162..6db91d8249 100644 --- a/client/components/player/PlayerUi.vue +++ b/client/components/player/PlayerUi.vue @@ -79,6 +79,7 @@ export default { }, sleepTimerSet: Boolean, sleepTimerRemaining: Number, + sleepTimerType: String, isPodcast: Boolean, hideBookmarks: Boolean, hideSleepTimer: Boolean @@ -102,16 +103,20 @@ export default { }, computed: { sleepTimerRemainingString() { - var rounded = Math.round(this.sleepTimerRemaining) - if (rounded < 90) { - return `${rounded}s` - } - var minutesRounded = Math.round(rounded / 60) - if (minutesRounded < 90) { - return `${minutesRounded}m` + if (this.sleepTimerType === this.$constants.SleepTimerTypes.CHAPTER) { + return this.$strings.LabelEndOfChapter + } else { + var rounded = Math.round(this.sleepTimerRemaining) + if (rounded < 90) { + return `${rounded}s` + } + var minutesRounded = Math.round(rounded / 60) + if (minutesRounded < 90) { + return `${minutesRounded}m` + } + var hoursRounded = Math.round(minutesRounded / 60) + return `${hoursRounded}h` } - var hoursRounded = Math.round(minutesRounded / 60) - return `${hoursRounded}h` }, token() { return this.$store.getters['user/getToken'] diff --git a/client/strings/en-us.json b/client/strings/en-us.json index f713cb11dc..7c8672495f 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -290,6 +290,7 @@ "LabelEmbeddedCover": "Embedded Cover", "LabelEnable": "Enable", "LabelEnd": "End", + "LabelEndOfChapter": "End of Chapter", "LabelEpisode": "Episode", "LabelEpisodeTitle": "Episode Title", "LabelEpisodeType": "Episode Type",