mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-21 01:59:05 +02:00
Fix seeking in NowPlaying to adjust for chapter start time
This commit is contained in:
parent
322cad5548
commit
3cc7a0937c
1 changed files with 17 additions and 10 deletions
|
@ -668,7 +668,14 @@ class AudioPlayer: NSObject {
|
||||||
return .noSuchContent
|
return .noSuchContent
|
||||||
}
|
}
|
||||||
|
|
||||||
self?.seek(event.positionTime, from: "remote")
|
// Adjust seek time if chapter track is being used
|
||||||
|
var seekTime = event.positionTime
|
||||||
|
if PlayerSettings.main().chapterTrack {
|
||||||
|
if let session = self?.getPlaybackSession(), let currentChapter = session.getCurrentChapter() {
|
||||||
|
seekTime += currentChapter.start
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self?.seek(seekTime, from: "remote")
|
||||||
return .success
|
return .success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue