mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 20:31:36 +00:00
Add functionality for 'end of chapter' sleep timer
This commit is contained in:
parent
41e3965467
commit
cd902c0636
3 changed files with 61 additions and 24 deletions
|
|
@ -72,6 +72,7 @@ export default {
|
|||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
currentChapter: Object,
|
||||
bookmarks: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
|
|
@ -135,9 +136,6 @@ export default {
|
|||
if (!duration) return 0
|
||||
return Math.round((100 * time) / duration)
|
||||
},
|
||||
currentChapter() {
|
||||
return this.chapters.find((chapter) => chapter.start <= this.currentTime && this.currentTime < chapter.end)
|
||||
},
|
||||
currentChapterName() {
|
||||
return this.currentChapter ? this.currentChapter.title : ''
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue