Add album detail and track listing

This commit is contained in:
lucast committed 2026-10-07 01:40:54 +02:00
1 parent c415380336
commit 39a64bebf2
4 files changed
+355 -11

No files matched your search

+11 -1
View File
@@ -46,6 +46,16 @@ nonisolated public struct Album: Decodable, Identifiable, Sendable {
}
}
nonisolated public struct TrackAlbum: Decodable, Identifiable, Sendable {
public let id: String
public let name: String
public let file: String
enum CodingKeys: String, CodingKey {
case id = "_id"
case name, file
}
}
nonisolated public struct Lyrics: Decodable, Sendable {
public let synced: Bool
public let text: String
@@ -54,7 +64,7 @@ nonisolated public struct Lyrics: Decodable, Sendable {
nonisolated public struct Track: Decodable, Identifiable, Sendable {
public let id: String
public let name: String
public let album: APIReference<Album>
public let album: APIReference<TrackAlbum>
public let artists: [APIReference<Artist>]
public let fileDir: String
public let durationInSeconds: Double