Everything works well and good structure.
This commit is contained in:
21
Sources/MusicBrainz/Models/Shared/CoverArt.swift
Normal file
21
Sources/MusicBrainz/Models/Shared/CoverArt.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
import Foundation
|
||||
|
||||
public struct CoverArtImage: Codable, Sendable {
|
||||
public let image: String
|
||||
public let thumbnails: [String: String]
|
||||
public let types: [String]
|
||||
public let front: Bool
|
||||
public let back: Bool
|
||||
public let edit: Int
|
||||
public let comment: String
|
||||
public let id: String
|
||||
}
|
||||
|
||||
public struct CoverArtResponse: Codable, Sendable {
|
||||
public let images: [CoverArtImage]
|
||||
public let release: String
|
||||
|
||||
public var frontImage: CoverArtImage? {
|
||||
images.first { $0.front }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user