mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-05 11:34:50 +02:00
Chapter and Total Track in Player
This patch allows user to not only add a chapter track but also remove the total track. This means that you can have only the total track or only the chapter track. This patch does not allow user to have no track at all. Disabling one track will automatically enable the other one, if that one is already disabled. The reasoning behind this is that for long-ish audio books, users will not very often look at the overall progress. In fact, I find the progress bar mostly useful only for quickly seeking to a position when jumping back a few seconds is not sufficient. In the seldom occasion that I want the overall progress, I can easily get it from the book details page.
This commit is contained in:
parent
56fe350104
commit
d89c97ba1a
2 changed files with 34 additions and 1 deletions
|
@ -60,6 +60,24 @@ class LocalStorage {
|
|||
}
|
||||
}
|
||||
|
||||
async setUseTotalTrack(useTotalTrack) {
|
||||
try {
|
||||
await Storage.set({ key: 'useTotalTrack', value: useTotalTrack ? '1' : '0' })
|
||||
} catch (error) {
|
||||
console.error('[LocalStorage] Failed to set use total track', error)
|
||||
}
|
||||
}
|
||||
|
||||
async getUseTotalTrack() {
|
||||
try {
|
||||
var obj = await Storage.get({ key: 'useTotalTrack' }) || {}
|
||||
return obj.value === '1'
|
||||
} catch (error) {
|
||||
console.error('[LocalStorage] Failed to get use total track', error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
async setPlayerLock(lock) {
|
||||
try {
|
||||
await Storage.set({ key: 'playerLock', value: lock ? '1' : '0' })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue