mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-07 04:18:48 +02:00
Functions to update local progress
This commit is contained in:
@@ -29,4 +29,11 @@ struct PlaybackSession: Decodable, Encodable {
|
||||
var localLibraryItem: LocalLibraryItem?
|
||||
var serverConnectionConfigId: String?
|
||||
var serverAddress: String?
|
||||
|
||||
var totalDuration: Double {
|
||||
var total = 0.0
|
||||
self.audioTracks.forEach { total += $0.duration }
|
||||
return total
|
||||
}
|
||||
var progress: Double { self.currentTime / self.totalDuration }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user