chore: add custom titles, description and chapters

This commit is contained in:
Konstantin Späth
2023-08-13 00:01:27 +02:00
parent fd2e396262
commit b225b0f800
6 changed files with 142 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
struct Chapter {
let title: String
let uri: String
let startTime: Double
let endTime: Double
let json: NSDictionary?
init(_ json: NSDictionary!) {
guard json != nil else {
self.json = nil
self.title = ""
self.uri = ""
self.startTime = 0
self.endTime = 0
return
}
self.json = json
self.title = json["title"] as? String ?? ""
self.uri = json["uri"] as? String ?? ""
self.startTime = json["startTime"] as? Double ?? 0
self.endTime = json["endTime"] as? Double ?? 0
}
}