I think we're done

This commit is contained in:
cdricms
2026-03-21 18:25:21 +01:00
parent 2d1e8e1044
commit ba9e2db1b9
26 changed files with 281 additions and 63 deletions

View File

@@ -1,6 +1,6 @@
import Foundation
public struct ArtistCredit: Codable, Sendable {
public struct ArtistCredit: Codable, Sendable, Hashable, Equatable {
public let name: String
public let artist: Artist?
public let joinphrase: String?

View File

@@ -1,6 +1,6 @@
import Foundation
public struct CoverArtImage: Codable, Sendable {
public struct CoverArtImage: Codable, Sendable, Identifiable, Hashable, Equatable {
public let image: String
public let thumbnails: [String: String]
public let types: [String]
@@ -11,7 +11,7 @@ public struct CoverArtImage: Codable, Sendable {
public let id: String
}
public struct CoverArtResponse: Codable, Sendable {
public struct CoverArtResponse: Codable, Sendable, Hashable, Equatable {
public let images: [CoverArtImage]
public let release: String

View File

@@ -1,6 +1,6 @@
import Foundation
public struct LifeSpan: Codable, Sendable {
public struct LifeSpan: Codable, Sendable, Hashable, Equatable {
public let begin: String?
public let end: String?
public let ended: Bool?

View File

@@ -0,0 +1,22 @@
import Foundation
public struct Track: Codable, Sendable, Identifiable, Hashable, Equatable {
public let id: String
public let number: String
public let position: Int
public let title: String
public let length: Int?
public let recording: Recording?
}
public struct Media: Codable, Sendable, Hashable, Equatable {
public let position: Int
public let format: ReleaseFormat?
public let trackCount: Int
public let tracks: [Track]?
enum CodingKeys: String, CodingKey {
case position, format, tracks
case trackCount = "track-count"
}
}

View File

@@ -1,6 +1,6 @@
import Foundation
public struct Relation: Codable, Sendable {
public struct Relation: Codable, Sendable, Hashable, Equatable {
public let type: String
public let direction: String
public let url: URLResource?

View File

@@ -1,6 +1,6 @@
import Foundation
public struct URLResource: Codable, Sendable {
public struct URLResource: Codable, Sendable, Identifiable, Hashable, Equatable {
public let id: String
public let resource: String
}

View File

@@ -0,0 +1,20 @@
import Foundation
public struct WikimediaResponse: Codable, Sendable {
public let query: WikimediaQuery
}
public struct WikimediaQuery: Codable, Sendable {
public let pages: [String: WikimediaPage]
}
public struct WikimediaPage: Codable, Sendable {
public let pageid: Int?
public let title: String
public let imageinfo: [WikimediaImageInfo]?
}
public struct WikimediaImageInfo: Codable, Sendable {
public let url: String
public let descriptionurl: String
}