I think we're done
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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?
|
||||
|
||||
22
Sources/MusicBrainz/Models/Shared/Media.swift
Normal file
22
Sources/MusicBrainz/Models/Shared/Media.swift
Normal 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"
|
||||
}
|
||||
}
|
||||
@@ -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?
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
20
Sources/MusicBrainz/Models/Shared/Wikimedia.swift
Normal file
20
Sources/MusicBrainz/Models/Shared/Wikimedia.swift
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user