diff --git a/client/components/app/MediaPlayerContainer.vue b/client/components/app/MediaPlayerContainer.vue
index 926a1f72b..a9cdc991b 100644
--- a/client/components/app/MediaPlayerContainer.vue
+++ b/client/components/app/MediaPlayerContainer.vue
@@ -58,7 +58,7 @@
-
+
@@ -83,7 +83,6 @@ export default {
showPlayerQueueItemsModal: false,
showPlayerSettingsModal: false,
sleepTimerSet: false,
- sleepTimerTime: 0,
sleepTimerRemaining: 0,
sleepTimerType: null,
sleepTimer: null,
@@ -93,13 +92,6 @@ export default {
coverAspectRatio: 1
}
},
- watch: {
- currentTime(newTime) {
- if (this.sleepTimerType === this.$constants.SleepTimerTypes.CHAPTER && this.sleepTimerSet) {
- this.checkChapterEnd(newTime)
- }
- }
- },
computed: {
isSquareCover() {
return this.coverAspectRatio === 1
@@ -231,7 +223,6 @@ export default {
}
},
runSleepTimer(time) {
- this.sleepTimerTime = time.seconds
this.sleepTimerRemaining = time.seconds
var lastTick = Date.now()
@@ -247,6 +238,7 @@ export default {
}, 1000)
},
checkChapterEnd(time) {
+ if (!this.currentChapter) return
const chapterEndTime = this.currentChapter.end
const tolerance = 0.75
if (time >= chapterEndTime - tolerance) {
@@ -308,6 +300,10 @@ export default {
if (this.$refs.audioPlayer) {
this.$refs.audioPlayer.setCurrentTime(time)
}
+
+ if (this.sleepTimerType === this.$constants.SleepTimerTypes.CHAPTER && this.sleepTimerSet) {
+ this.checkChapterEnd(newTime)
+ }
},
setDuration(duration) {
this.totalDuration = duration
diff --git a/client/components/modals/SleepTimerModal.vue b/client/components/modals/SleepTimerModal.vue
index 11ca7f51d..e1c94883a 100644
--- a/client/components/modals/SleepTimerModal.vue
+++ b/client/components/modals/SleepTimerModal.vue
@@ -19,7 +19,7 @@
-
+
remove
30m
@@ -47,10 +47,8 @@ export default {
props: {
value: Boolean,
timerSet: Boolean,
- timerTime: Number,
timerType: String,
- remaining: Number,
- currentChapter: Object
+ remaining: Number
},
data() {
return {
@@ -100,12 +98,6 @@ export default {
]
}
},
- watch: {
- show(newVal) {
- if (newVal) {
- }
- }
- },
computed: {
show: {
get() {
@@ -145,4 +137,4 @@ export default {
}
}
}
-
\ No newline at end of file
+