Add chapters, history, bookmarks, live download progress, and i18n
- Chapter navigation with auto-scroll to current chapter and end-of-chapter sleep timer - Opt-in listening history (local-only) with XML export and per-item quick menu - Bookmarks with server sync via Audiobookshelf API - Live MB counter during downloads via URLSessionDownloadTask delegate - In-progress downloads shown in "Heruntergeladen" with dimmed cover + ring overlay - Cover image cache (50 MB memory / 500 MB disk URLCache) - German/English localization (de.lproj, en.lproj) - Loading spinner now triggers immediately on view switch instead of waiting for the network Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,11 +31,19 @@ struct LibraryItemDTO: Decodable {
|
||||
let media: MediaDTO?
|
||||
}
|
||||
|
||||
struct ChapterDTO: Decodable {
|
||||
let id: Int?
|
||||
let start: Double?
|
||||
let end: Double?
|
||||
let title: String?
|
||||
}
|
||||
|
||||
struct MediaDTO: Decodable {
|
||||
let metadata: MetadataDTO?
|
||||
let duration: Double?
|
||||
let audioFiles: [AudioFileDTO]?
|
||||
let episodes: [EpisodeDTO]?
|
||||
let chapters: [ChapterDTO]?
|
||||
}
|
||||
|
||||
struct MetadataDTO: Decodable {
|
||||
@@ -69,6 +77,12 @@ struct AudioFileDTO: Decodable {
|
||||
}
|
||||
}
|
||||
|
||||
struct BookmarkDTO: Decodable {
|
||||
let title: String?
|
||||
let time: Double?
|
||||
let createdAt: Double?
|
||||
}
|
||||
|
||||
struct ProgressResponseDTO: Decodable {
|
||||
let id: String?
|
||||
let libraryItemId: String?
|
||||
@@ -77,6 +91,7 @@ struct ProgressResponseDTO: Decodable {
|
||||
let duration: Double?
|
||||
let isFinished: Bool?
|
||||
let lastUpdate: Double?
|
||||
let bookmarks: [BookmarkDTO]?
|
||||
}
|
||||
|
||||
struct MeResponseDTO: Decodable {
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import Foundation
|
||||
|
||||
struct Chapter: Codable, Identifiable, Hashable {
|
||||
let id: Int
|
||||
let start: Double
|
||||
let end: Double
|
||||
let title: String
|
||||
}
|
||||
|
||||
struct Library: Codable, Identifiable, Hashable {
|
||||
let id: String
|
||||
let name: String
|
||||
@@ -15,6 +22,7 @@ struct LibraryItem: Codable, Identifiable, Hashable {
|
||||
var mediaType: String = "book"
|
||||
var episodeId: String? = nil
|
||||
var description: String? = nil
|
||||
var chapters: [Chapter] = []
|
||||
|
||||
var isPodcast: Bool { mediaType == "podcast" }
|
||||
var isPodcastContainer: Bool { isPodcast && episodeId == nil }
|
||||
|
||||
Reference in New Issue
Block a user