Update start playback from bookmark time confirm to new confirm prompt

This commit is contained in:
advplyr 2022-07-30 11:53:48 -05:00
parent bcc2f847f9
commit 3cf8b9dca9
2 changed files with 12 additions and 4 deletions

View file

@ -424,13 +424,21 @@ export default {
},
selectBookmark(bookmark) {
if (!bookmark) return
console.log('Select bookmark', bookmark)
if (this.isStreaming) {
this.$eventBus.$emit('playback-seek', bookmark.time)
} else if (this.streamLibraryItem) {
if (confirm(`Are you sure you want to play ${this.title} @ ${this.$secondsToTimestamp(bookmark.time)}?`)) {
this.startStream(bookmark.time)
this.showBookmarksModal = false
console.log('Already streaming library item so ask about it')
const payload = {
message: `Start playback for "${this.title}" at ${this.$secondsToTimestamp(bookmark.time)}?`,
callback: (confirmed) => {
if (confirmed) {
this.startStream(bookmark.time)
}
},
type: 'yesNo'
}
this.$store.commit('globals/setConfirmPrompt', payload)
} else {
this.startStream(bookmark.time)
}