mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-12-02 21:14:21 +01:00
feat: now playing chapter track
This commit is contained in:
1 parent
793f0c05f7
commit
2b1667e532
11 files changed
+91
-11
No files matched your search
@@ -39,3 +39,13 @@ class Chapter: EmbeddedObject, Codable {
|
||||
try container.encode(title, forKey: .title)
|
||||
}
|
||||
}
|
||||
|
||||
extension Chapter {
|
||||
func getRelativeChapterCurrentTime(sessionCurrentTime: Double) -> Double {
|
||||
return sessionCurrentTime - self.start
|
||||
}
|
||||
|
||||
func getRelativeChapterEndTime() -> Double {
|
||||
return self.end - self.start
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user