import Foundation // MARK: - Playback State Response struct MopidyPlaybackState: Codable { let state: State let timestamp: Int let tlTrack: TLTrack? enum State: String, Codable { case playing, paused, stopped } struct TLTrack: Codable { let tlid: String let trackid: String let track: Track } struct Track: Codable { let name: String let artists: [Artist] let artistNames: [String] { artists.map { $0.name } } let album: Album? let bitrate: Int? let date: String? let discNumber: Int? let duration: Int? let index: Int? let uri: String let coverArtURI: [String]? struct Artist: Codable { let name: String } struct Album: Codable { let name: String } } } // MARK: - Volume Response struct VolumeResponse: Codable { let result: Int }