mirror of
https://github.com/jellyfin/jellyfin-sdk-swift.git
synced 2024-11-23 06:09:58 +00:00
uuid to string and ignore invalid fields
This commit is contained in:
parent
45a5b3487e
commit
afd8c22dc9
@ -19,9 +19,9 @@ public struct AccessSchedule: Codable, Identifiable {
|
||||
/// Gets or sets the start hour.
|
||||
public var startHour: Double?
|
||||
/// Gets the id of the associated user.
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
|
||||
public init(dayOfWeek: DynamicDayOfWeek? = nil, endHour: Double? = nil, id: Int32? = nil, startHour: Double? = nil, userID: UUID? = nil) {
|
||||
public init(dayOfWeek: DynamicDayOfWeek? = nil, endHour: Double? = nil, id: Int32? = nil, startHour: Double? = nil, userID: String? = nil) {
|
||||
self.dayOfWeek = dayOfWeek
|
||||
self.endHour = endHour
|
||||
self.id = id
|
||||
@ -35,7 +35,7 @@ public struct AccessSchedule: Codable, Identifiable {
|
||||
self.endHour = try values.decodeIfPresent(Double.self, forKey: "EndHour")
|
||||
self.id = try values.decodeIfPresent(Int32.self, forKey: "Id")
|
||||
self.startHour = try values.decodeIfPresent(Double.self, forKey: "StartHour")
|
||||
self.userID = try values.decodeIfPresent(UUID.self, forKey: "UserId")
|
||||
self.userID = try values.decodeIfPresent(String.self, forKey: "UserId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -27,13 +27,13 @@ public struct ActivityLogEntry: Codable, Identifiable {
|
||||
/// Gets or sets the type.
|
||||
public var type: String?
|
||||
/// Gets or sets the user identifier.
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
/// Gets or sets the user primary image tag.
|
||||
///
|
||||
/// - warning: Deprecated.
|
||||
public var userPrimaryImageTag: String?
|
||||
|
||||
public init(date: Date? = nil, id: Int64? = nil, itemID: String? = nil, name: String? = nil, overview: String? = nil, severity: LogLevel? = nil, shortOverview: String? = nil, type: String? = nil, userID: UUID? = nil, userPrimaryImageTag: String? = nil) {
|
||||
public init(date: Date? = nil, id: Int64? = nil, itemID: String? = nil, name: String? = nil, overview: String? = nil, severity: LogLevel? = nil, shortOverview: String? = nil, type: String? = nil, userID: String? = nil, userPrimaryImageTag: String? = nil) {
|
||||
self.date = date
|
||||
self.id = id
|
||||
self.itemID = itemID
|
||||
@ -56,7 +56,7 @@ public struct ActivityLogEntry: Codable, Identifiable {
|
||||
self.severity = try values.decodeIfPresent(LogLevel.self, forKey: "Severity")
|
||||
self.shortOverview = try values.decodeIfPresent(String.self, forKey: "ShortOverview")
|
||||
self.type = try values.decodeIfPresent(String.self, forKey: "Type")
|
||||
self.userID = try values.decodeIfPresent(UUID.self, forKey: "UserId")
|
||||
self.userID = try values.decodeIfPresent(String.self, forKey: "UserId")
|
||||
self.userPrimaryImageTag = try values.decodeIfPresent(String.self, forKey: "UserPrimaryImageTag")
|
||||
}
|
||||
|
||||
|
@ -11,12 +11,12 @@ import Foundation
|
||||
public struct AlbumInfoRemoteSearchQuery: Codable {
|
||||
/// Gets or sets a value indicating whether disabled providers should be included.
|
||||
public var isIncludeDisabledProviders: Bool?
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
public var searchInfo: AlbumInfo?
|
||||
/// Gets or sets the provider name to search within if set.
|
||||
public var searchProviderName: String?
|
||||
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: UUID? = nil, searchInfo: AlbumInfo? = nil, searchProviderName: String? = nil) {
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: String? = nil, searchInfo: AlbumInfo? = nil, searchProviderName: String? = nil) {
|
||||
self.isIncludeDisabledProviders = isIncludeDisabledProviders
|
||||
self.itemID = itemID
|
||||
self.searchInfo = searchInfo
|
||||
@ -26,7 +26,7 @@ public struct AlbumInfoRemoteSearchQuery: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isIncludeDisabledProviders = try values.decodeIfPresent(Bool.self, forKey: "IncludeDisabledProviders")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.searchInfo = try values.decodeIfPresent(AlbumInfo.self, forKey: "SearchInfo")
|
||||
self.searchProviderName = try values.decodeIfPresent(String.self, forKey: "SearchProviderName")
|
||||
}
|
||||
|
@ -11,12 +11,12 @@ import Foundation
|
||||
public struct ArtistInfoRemoteSearchQuery: Codable {
|
||||
/// Gets or sets a value indicating whether disabled providers should be included.
|
||||
public var isIncludeDisabledProviders: Bool?
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
public var searchInfo: ArtistInfo?
|
||||
/// Gets or sets the provider name to search within if set.
|
||||
public var searchProviderName: String?
|
||||
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: UUID? = nil, searchInfo: ArtistInfo? = nil, searchProviderName: String? = nil) {
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: String? = nil, searchInfo: ArtistInfo? = nil, searchProviderName: String? = nil) {
|
||||
self.isIncludeDisabledProviders = isIncludeDisabledProviders
|
||||
self.itemID = itemID
|
||||
self.searchInfo = searchInfo
|
||||
@ -26,7 +26,7 @@ public struct ArtistInfoRemoteSearchQuery: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isIncludeDisabledProviders = try values.decodeIfPresent(Bool.self, forKey: "IncludeDisabledProviders")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.searchInfo = try values.decodeIfPresent(ArtistInfo.self, forKey: "SearchInfo")
|
||||
self.searchProviderName = try values.decodeIfPresent(String.self, forKey: "SearchProviderName")
|
||||
}
|
||||
|
@ -29,10 +29,10 @@ public struct AuthenticationInfo: Codable, Identifiable {
|
||||
/// Gets or sets a value indicating whether this instance is active.
|
||||
public var isActive: Bool?
|
||||
/// Gets or sets the user identifier.
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var userName: String?
|
||||
|
||||
public init(accessToken: String? = nil, appName: String? = nil, appVersion: String? = nil, dateCreated: Date? = nil, dateLastActivity: Date? = nil, dateRevoked: Date? = nil, deviceID: String? = nil, deviceName: String? = nil, id: Int64? = nil, isActive: Bool? = nil, userID: UUID? = nil, userName: String? = nil) {
|
||||
public init(accessToken: String? = nil, appName: String? = nil, appVersion: String? = nil, dateCreated: Date? = nil, dateLastActivity: Date? = nil, dateRevoked: Date? = nil, deviceID: String? = nil, deviceName: String? = nil, id: Int64? = nil, isActive: Bool? = nil, userID: String? = nil, userName: String? = nil) {
|
||||
self.accessToken = accessToken
|
||||
self.appName = appName
|
||||
self.appVersion = appVersion
|
||||
@ -59,7 +59,7 @@ public struct AuthenticationInfo: Codable, Identifiable {
|
||||
self.deviceName = try values.decodeIfPresent(String.self, forKey: "DeviceName")
|
||||
self.id = try values.decodeIfPresent(Int64.self, forKey: "Id")
|
||||
self.isActive = try values.decodeIfPresent(Bool.self, forKey: "IsActive")
|
||||
self.userID = try values.decodeIfPresent(UUID.self, forKey: "UserId")
|
||||
self.userID = try values.decodeIfPresent(String.self, forKey: "UserId")
|
||||
self.userName = try values.decodeIfPresent(String.self, forKey: "UserName")
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ import Foundation
|
||||
public struct BaseItem: Codable {
|
||||
public var container: String?
|
||||
public var dateLastSaved: Date?
|
||||
public var extraIDs: [UUID]?
|
||||
public var extraIDs: [String]?
|
||||
public var height: Int32?
|
||||
public var isHD: Bool?
|
||||
public var isShortcut: Bool?
|
||||
@ -23,7 +23,7 @@ public struct BaseItem: Codable {
|
||||
public var isSupportsExternalTransfer: Bool?
|
||||
public var width: Int32?
|
||||
|
||||
public init(container: String? = nil, dateLastSaved: Date? = nil, extraIDs: [UUID]? = nil, height: Int32? = nil, isHD: Bool? = nil, isShortcut: Bool? = nil, remoteTrailers: [MediaURL]? = nil, shortcutPath: String? = nil, size: Int64? = nil, isSupportsExternalTransfer: Bool? = nil, width: Int32? = nil) {
|
||||
public init(container: String? = nil, dateLastSaved: Date? = nil, extraIDs: [String]? = nil, height: Int32? = nil, isHD: Bool? = nil, isShortcut: Bool? = nil, remoteTrailers: [MediaURL]? = nil, shortcutPath: String? = nil, size: Int64? = nil, isSupportsExternalTransfer: Bool? = nil, width: Int32? = nil) {
|
||||
self.container = container
|
||||
self.dateLastSaved = dateLastSaved
|
||||
self.extraIDs = extraIDs
|
||||
@ -41,7 +41,7 @@ public struct BaseItem: Codable {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.container = try values.decodeIfPresent(String.self, forKey: "Container")
|
||||
self.dateLastSaved = try values.decodeIfPresent(Date.self, forKey: "DateLastSaved")
|
||||
self.extraIDs = try values.decodeIfPresent([UUID].self, forKey: "ExtraIds")
|
||||
self.extraIDs = try values.decodeIfPresent([String].self, forKey: "ExtraIds")
|
||||
self.height = try values.decodeIfPresent(Int32.self, forKey: "Height")
|
||||
self.isHD = try values.decodeIfPresent(Bool.self, forKey: "IsHD")
|
||||
self.isShortcut = try values.decodeIfPresent(Bool.self, forKey: "IsShortcut")
|
||||
|
@ -28,7 +28,7 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
/// Gets or sets the album count.
|
||||
public var albumCount: Int32?
|
||||
/// Gets or sets the album id.
|
||||
public var albumID: UUID?
|
||||
public var albumID: String?
|
||||
/// Gets or sets the album image tag.
|
||||
public var albumPrimaryImageTag: String?
|
||||
public var altitude: Double?
|
||||
@ -49,7 +49,7 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
public var canDelete: Bool?
|
||||
public var canDownload: Bool?
|
||||
/// Gets or sets the channel identifier.
|
||||
public var channelID: UUID?
|
||||
public var channelID: String?
|
||||
public var channelName: String?
|
||||
public var channelNumber: String?
|
||||
/// Gets or sets the channel primary image tag.
|
||||
@ -101,7 +101,7 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
public var hasSubtitles: Bool?
|
||||
public var height: Int32?
|
||||
/// Gets or sets the id.
|
||||
public var id: UUID?
|
||||
public var id: String?
|
||||
/// Gets or sets the blurhashes for the image tags.
|
||||
///
|
||||
/// Maps image type to dictionary mapping image tag to blurhash value.
|
||||
@ -171,19 +171,19 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
/// Gets or sets the parent art image tag.
|
||||
public var parentArtImageTag: String?
|
||||
/// Gets or sets wether the item has fan art, this will hold the Id of the Parent that has one.
|
||||
public var parentArtItemID: UUID?
|
||||
public var parentArtItemID: String?
|
||||
/// Gets or sets the parent backdrop image tags.
|
||||
public var parentBackdropImageTags: [String]?
|
||||
/// Gets or sets wether the item has any backdrops, this will hold the Id of the Parent that has one.
|
||||
public var parentBackdropItemID: UUID?
|
||||
public var parentBackdropItemID: String?
|
||||
/// Gets or sets the parent id.
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
/// Gets or sets the parent index number.
|
||||
public var parentIndexNumber: Int32?
|
||||
/// Gets or sets the parent logo image tag.
|
||||
public var parentLogoImageTag: String?
|
||||
/// Gets or sets wether the item has a logo, this will hold the Id of the Parent that has one.
|
||||
public var parentLogoItemID: UUID?
|
||||
public var parentLogoItemID: String?
|
||||
/// Gets or sets the parent primary image item identifier.
|
||||
public var parentPrimaryImageItemID: String?
|
||||
/// Gets or sets the parent primary image tag.
|
||||
@ -191,7 +191,7 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
/// Gets or sets the parent thumb image tag.
|
||||
public var parentThumbImageTag: String?
|
||||
/// Gets or sets the parent thumb item id.
|
||||
public var parentThumbItemID: UUID?
|
||||
public var parentThumbItemID: String?
|
||||
/// Gets or sets the part count.
|
||||
public var partCount: Int32?
|
||||
/// Gets or sets the path.
|
||||
@ -225,13 +225,13 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
/// Gets or sets the screenshot image tags.
|
||||
public var screenshotImageTags: [String]?
|
||||
/// Gets or sets the season identifier.
|
||||
public var seasonID: UUID?
|
||||
public var seasonID: String?
|
||||
/// Gets or sets the name of the season.
|
||||
public var seasonName: String?
|
||||
/// Gets or sets the series count.
|
||||
public var seriesCount: Int32?
|
||||
/// Gets or sets the series id.
|
||||
public var seriesID: UUID?
|
||||
public var seriesID: String?
|
||||
/// Gets or sets the name of the series.
|
||||
public var seriesName: String?
|
||||
/// Gets or sets the series primary image tag.
|
||||
@ -349,7 +349,7 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
}
|
||||
}
|
||||
|
||||
public init(airDays: [DayOfWeek]? = nil, airTime: String? = nil, airsAfterSeasonNumber: Int32? = nil, airsBeforeEpisodeNumber: Int32? = nil, airsBeforeSeasonNumber: Int32? = nil, album: String? = nil, albumArtist: String? = nil, albumArtists: [NameGuidPair]? = nil, albumCount: Int32? = nil, albumID: UUID? = nil, albumPrimaryImageTag: String? = nil, altitude: Double? = nil, aperture: Double? = nil, artistCount: Int32? = nil, artistItems: [NameGuidPair]? = nil, artists: [String]? = nil, aspectRatio: String? = nil, audio: ProgramAudio? = nil, backdropImageTags: [String]? = nil, cameraMake: String? = nil, cameraModel: String? = nil, canDelete: Bool? = nil, canDownload: Bool? = nil, channelID: UUID? = nil, channelName: String? = nil, channelNumber: String? = nil, channelPrimaryImageTag: String? = nil, channelType: ChannelType? = nil, chapters: [ChapterInfo]? = nil, childCount: Int32? = nil, collectionType: String? = nil, communityRating: Float? = nil, completionPercentage: Double? = nil, container: String? = nil, criticRating: Float? = nil, cumulativeRunTimeTicks: Int64? = nil, customRating: String? = nil, dateCreated: Date? = nil, dateLastMediaAdded: Date? = nil, displayOrder: String? = nil, displayPreferencesID: String? = nil, enableMediaSourceDisplay: Bool? = nil, endDate: Date? = nil, episodeCount: Int32? = nil, episodeTitle: String? = nil, etag: String? = nil, exposureTime: Double? = nil, externalURLs: [ExternalURL]? = nil, extraType: String? = nil, focalLength: Double? = nil, forcedSortName: String? = nil, genreItems: [NameGuidPair]? = nil, genres: [String]? = nil, hasSubtitles: Bool? = nil, height: Int32? = nil, id: UUID? = nil, imageBlurHashes: ImageBlurHashes? = nil, imageOrientation: ImageOrientation? = nil, imageTags: [String: String]? = nil, indexNumber: Int32? = nil, indexNumberEnd: Int32? = nil, isFolder: Bool? = nil, isHD: Bool? = nil, isKids: Bool? = nil, isLive: Bool? = nil, isMovie: Bool? = nil, isNews: Bool? = nil, isPlaceHolder: Bool? = nil, isPremiere: Bool? = nil, isRepeat: Bool? = nil, isSeries: Bool? = nil, isSports: Bool? = nil, isoSpeedRating: Int32? = nil, isoType: IsoType? = nil, latitude: Double? = nil, localTrailerCount: Int32? = nil, locationType: LocationType? = nil, lockData: Bool? = nil, lockedFields: [MetadataField]? = nil, longitude: Double? = nil, mediaSourceCount: Int32? = nil, mediaSources: [MediaSourceInfo]? = nil, mediaStreams: [MediaStream]? = nil, mediaType: String? = nil, movieCount: Int32? = nil, musicVideoCount: Int32? = nil, name: String? = nil, number: String? = nil, officialRating: String? = nil, originalTitle: String? = nil, overview: String? = nil, parentArtImageTag: String? = nil, parentArtItemID: UUID? = nil, parentBackdropImageTags: [String]? = nil, parentBackdropItemID: UUID? = nil, parentID: UUID? = nil, parentIndexNumber: Int32? = nil, parentLogoImageTag: String? = nil, parentLogoItemID: UUID? = nil, parentPrimaryImageItemID: String? = nil, parentPrimaryImageTag: String? = nil, parentThumbImageTag: String? = nil, parentThumbItemID: UUID? = nil, partCount: Int32? = nil, path: String? = nil, people: [BaseItemPerson]? = nil, playAccess: PlayAccess? = nil, playlistItemID: String? = nil, preferredMetadataCountryCode: String? = nil, preferredMetadataLanguage: String? = nil, premiereDate: Date? = nil, primaryImageAspectRatio: Double? = nil, productionLocations: [String]? = nil, productionYear: Int32? = nil, programCount: Int32? = nil, programID: String? = nil, providerIDs: [String: String]? = nil, recursiveItemCount: Int32? = nil, remoteTrailers: [MediaURL]? = nil, runTimeTicks: Int64? = nil, screenshotImageTags: [String]? = nil, seasonID: UUID? = nil, seasonName: String? = nil, seriesCount: Int32? = nil, seriesID: UUID? = nil, seriesName: String? = nil, seriesPrimaryImageTag: String? = nil, seriesStudio: String? = nil, seriesThumbImageTag: String? = nil, seriesTimerID: String? = nil, serverID: String? = nil, shutterSpeed: Double? = nil, software: String? = nil, songCount: Int32? = nil, sortName: String? = nil, sourceType: String? = nil, specialFeatureCount: Int32? = nil, startDate: Date? = nil, status: String? = nil, studios: [NameGuidPair]? = nil, isSupportsSync: Bool? = nil, taglines: [String]? = nil, tags: [String]? = nil, timerID: String? = nil, trailerCount: Int32? = nil, type: BaseItemKind? = nil, userData: UserItemDataDto? = nil, video3DFormat: Video3DFormat? = nil, videoType: VideoType? = nil, width: Int32? = nil) {
|
||||
public init(airDays: [DayOfWeek]? = nil, airTime: String? = nil, airsAfterSeasonNumber: Int32? = nil, airsBeforeEpisodeNumber: Int32? = nil, airsBeforeSeasonNumber: Int32? = nil, album: String? = nil, albumArtist: String? = nil, albumArtists: [NameGuidPair]? = nil, albumCount: Int32? = nil, albumID: String? = nil, albumPrimaryImageTag: String? = nil, altitude: Double? = nil, aperture: Double? = nil, artistCount: Int32? = nil, artistItems: [NameGuidPair]? = nil, artists: [String]? = nil, aspectRatio: String? = nil, audio: ProgramAudio? = nil, backdropImageTags: [String]? = nil, cameraMake: String? = nil, cameraModel: String? = nil, canDelete: Bool? = nil, canDownload: Bool? = nil, channelID: String? = nil, channelName: String? = nil, channelNumber: String? = nil, channelPrimaryImageTag: String? = nil, channelType: ChannelType? = nil, chapters: [ChapterInfo]? = nil, childCount: Int32? = nil, collectionType: String? = nil, communityRating: Float? = nil, completionPercentage: Double? = nil, container: String? = nil, criticRating: Float? = nil, cumulativeRunTimeTicks: Int64? = nil, customRating: String? = nil, dateCreated: Date? = nil, dateLastMediaAdded: Date? = nil, displayOrder: String? = nil, displayPreferencesID: String? = nil, enableMediaSourceDisplay: Bool? = nil, endDate: Date? = nil, episodeCount: Int32? = nil, episodeTitle: String? = nil, etag: String? = nil, exposureTime: Double? = nil, externalURLs: [ExternalURL]? = nil, extraType: String? = nil, focalLength: Double? = nil, forcedSortName: String? = nil, genreItems: [NameGuidPair]? = nil, genres: [String]? = nil, hasSubtitles: Bool? = nil, height: Int32? = nil, id: String? = nil, imageBlurHashes: ImageBlurHashes? = nil, imageOrientation: ImageOrientation? = nil, imageTags: [String: String]? = nil, indexNumber: Int32? = nil, indexNumberEnd: Int32? = nil, isFolder: Bool? = nil, isHD: Bool? = nil, isKids: Bool? = nil, isLive: Bool? = nil, isMovie: Bool? = nil, isNews: Bool? = nil, isPlaceHolder: Bool? = nil, isPremiere: Bool? = nil, isRepeat: Bool? = nil, isSeries: Bool? = nil, isSports: Bool? = nil, isoSpeedRating: Int32? = nil, isoType: IsoType? = nil, latitude: Double? = nil, localTrailerCount: Int32? = nil, locationType: LocationType? = nil, lockData: Bool? = nil, lockedFields: [MetadataField]? = nil, longitude: Double? = nil, mediaSourceCount: Int32? = nil, mediaSources: [MediaSourceInfo]? = nil, mediaStreams: [MediaStream]? = nil, mediaType: String? = nil, movieCount: Int32? = nil, musicVideoCount: Int32? = nil, name: String? = nil, number: String? = nil, officialRating: String? = nil, originalTitle: String? = nil, overview: String? = nil, parentArtImageTag: String? = nil, parentArtItemID: String? = nil, parentBackdropImageTags: [String]? = nil, parentBackdropItemID: String? = nil, parentID: String? = nil, parentIndexNumber: Int32? = nil, parentLogoImageTag: String? = nil, parentLogoItemID: String? = nil, parentPrimaryImageItemID: String? = nil, parentPrimaryImageTag: String? = nil, parentThumbImageTag: String? = nil, parentThumbItemID: String? = nil, partCount: Int32? = nil, path: String? = nil, people: [BaseItemPerson]? = nil, playAccess: PlayAccess? = nil, playlistItemID: String? = nil, preferredMetadataCountryCode: String? = nil, preferredMetadataLanguage: String? = nil, premiereDate: Date? = nil, primaryImageAspectRatio: Double? = nil, productionLocations: [String]? = nil, productionYear: Int32? = nil, programCount: Int32? = nil, programID: String? = nil, providerIDs: [String: String]? = nil, recursiveItemCount: Int32? = nil, remoteTrailers: [MediaURL]? = nil, runTimeTicks: Int64? = nil, screenshotImageTags: [String]? = nil, seasonID: String? = nil, seasonName: String? = nil, seriesCount: Int32? = nil, seriesID: String? = nil, seriesName: String? = nil, seriesPrimaryImageTag: String? = nil, seriesStudio: String? = nil, seriesThumbImageTag: String? = nil, seriesTimerID: String? = nil, serverID: String? = nil, shutterSpeed: Double? = nil, software: String? = nil, songCount: Int32? = nil, sortName: String? = nil, sourceType: String? = nil, specialFeatureCount: Int32? = nil, startDate: Date? = nil, status: String? = nil, studios: [NameGuidPair]? = nil, isSupportsSync: Bool? = nil, taglines: [String]? = nil, tags: [String]? = nil, timerID: String? = nil, trailerCount: Int32? = nil, type: BaseItemKind? = nil, userData: UserItemDataDto? = nil, video3DFormat: Video3DFormat? = nil, videoType: VideoType? = nil, width: Int32? = nil) {
|
||||
self.airDays = airDays
|
||||
self.airTime = airTime
|
||||
self.airsAfterSeasonNumber = airsAfterSeasonNumber
|
||||
@ -513,7 +513,7 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
self.albumArtist = try values.decodeIfPresent(String.self, forKey: "AlbumArtist")
|
||||
self.albumArtists = try values.decodeIfPresent([NameGuidPair].self, forKey: "AlbumArtists")
|
||||
self.albumCount = try values.decodeIfPresent(Int32.self, forKey: "AlbumCount")
|
||||
self.albumID = try values.decodeIfPresent(UUID.self, forKey: "AlbumId")
|
||||
self.albumID = try values.decodeIfPresent(String.self, forKey: "AlbumId")
|
||||
self.albumPrimaryImageTag = try values.decodeIfPresent(String.self, forKey: "AlbumPrimaryImageTag")
|
||||
self.altitude = try values.decodeIfPresent(Double.self, forKey: "Altitude")
|
||||
self.aperture = try values.decodeIfPresent(Double.self, forKey: "Aperture")
|
||||
@ -527,7 +527,7 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
self.cameraModel = try values.decodeIfPresent(String.self, forKey: "CameraModel")
|
||||
self.canDelete = try values.decodeIfPresent(Bool.self, forKey: "CanDelete")
|
||||
self.canDownload = try values.decodeIfPresent(Bool.self, forKey: "CanDownload")
|
||||
self.channelID = try values.decodeIfPresent(UUID.self, forKey: "ChannelId")
|
||||
self.channelID = try values.decodeIfPresent(String.self, forKey: "ChannelId")
|
||||
self.channelName = try values.decodeIfPresent(String.self, forKey: "ChannelName")
|
||||
self.channelNumber = try values.decodeIfPresent(String.self, forKey: "ChannelNumber")
|
||||
self.channelPrimaryImageTag = try values.decodeIfPresent(String.self, forKey: "ChannelPrimaryImageTag")
|
||||
@ -559,7 +559,7 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
self.genres = try values.decodeIfPresent([String].self, forKey: "Genres")
|
||||
self.hasSubtitles = try values.decodeIfPresent(Bool.self, forKey: "HasSubtitles")
|
||||
self.height = try values.decodeIfPresent(Int32.self, forKey: "Height")
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.imageBlurHashes = try values.decodeIfPresent(ImageBlurHashes.self, forKey: "ImageBlurHashes")
|
||||
self.imageOrientation = try values.decodeIfPresent(ImageOrientation.self, forKey: "ImageOrientation")
|
||||
self.imageTags = try values.decodeIfPresent([String: String].self, forKey: "ImageTags")
|
||||
@ -596,17 +596,17 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
self.originalTitle = try values.decodeIfPresent(String.self, forKey: "OriginalTitle")
|
||||
self.overview = try values.decodeIfPresent(String.self, forKey: "Overview")
|
||||
self.parentArtImageTag = try values.decodeIfPresent(String.self, forKey: "ParentArtImageTag")
|
||||
self.parentArtItemID = try values.decodeIfPresent(UUID.self, forKey: "ParentArtItemId")
|
||||
self.parentArtItemID = try values.decodeIfPresent(String.self, forKey: "ParentArtItemId")
|
||||
self.parentBackdropImageTags = try values.decodeIfPresent([String].self, forKey: "ParentBackdropImageTags")
|
||||
self.parentBackdropItemID = try values.decodeIfPresent(UUID.self, forKey: "ParentBackdropItemId")
|
||||
self.parentID = try values.decodeIfPresent(UUID.self, forKey: "ParentId")
|
||||
self.parentBackdropItemID = try values.decodeIfPresent(String.self, forKey: "ParentBackdropItemId")
|
||||
self.parentID = try values.decodeIfPresent(String.self, forKey: "ParentId")
|
||||
self.parentIndexNumber = try values.decodeIfPresent(Int32.self, forKey: "ParentIndexNumber")
|
||||
self.parentLogoImageTag = try values.decodeIfPresent(String.self, forKey: "ParentLogoImageTag")
|
||||
self.parentLogoItemID = try values.decodeIfPresent(UUID.self, forKey: "ParentLogoItemId")
|
||||
self.parentLogoItemID = try values.decodeIfPresent(String.self, forKey: "ParentLogoItemId")
|
||||
self.parentPrimaryImageItemID = try values.decodeIfPresent(String.self, forKey: "ParentPrimaryImageItemId")
|
||||
self.parentPrimaryImageTag = try values.decodeIfPresent(String.self, forKey: "ParentPrimaryImageTag")
|
||||
self.parentThumbImageTag = try values.decodeIfPresent(String.self, forKey: "ParentThumbImageTag")
|
||||
self.parentThumbItemID = try values.decodeIfPresent(UUID.self, forKey: "ParentThumbItemId")
|
||||
self.parentThumbItemID = try values.decodeIfPresent(String.self, forKey: "ParentThumbItemId")
|
||||
self.partCount = try values.decodeIfPresent(Int32.self, forKey: "PartCount")
|
||||
self.path = try values.decodeIfPresent(String.self, forKey: "Path")
|
||||
self.people = try values.decodeIfPresent([BaseItemPerson].self, forKey: "People")
|
||||
@ -625,10 +625,10 @@ public struct BaseItemDto: Codable, Identifiable {
|
||||
self.remoteTrailers = try values.decodeIfPresent([MediaURL].self, forKey: "RemoteTrailers")
|
||||
self.runTimeTicks = try values.decodeIfPresent(Int64.self, forKey: "RunTimeTicks")
|
||||
self.screenshotImageTags = try values.decodeIfPresent([String].self, forKey: "ScreenshotImageTags")
|
||||
self.seasonID = try values.decodeIfPresent(UUID.self, forKey: "SeasonId")
|
||||
self.seasonID = try values.decodeIfPresent(String.self, forKey: "SeasonId")
|
||||
self.seasonName = try values.decodeIfPresent(String.self, forKey: "SeasonName")
|
||||
self.seriesCount = try values.decodeIfPresent(Int32.self, forKey: "SeriesCount")
|
||||
self.seriesID = try values.decodeIfPresent(UUID.self, forKey: "SeriesId")
|
||||
self.seriesID = try values.decodeIfPresent(String.self, forKey: "SeriesId")
|
||||
self.seriesName = try values.decodeIfPresent(String.self, forKey: "SeriesName")
|
||||
self.seriesPrimaryImageTag = try values.decodeIfPresent(String.self, forKey: "SeriesPrimaryImageTag")
|
||||
self.seriesStudio = try values.decodeIfPresent(String.self, forKey: "SeriesStudio")
|
||||
|
@ -11,7 +11,7 @@ import Foundation
|
||||
/// This is used by the api to get information about a Person within a BaseItem.
|
||||
public struct BaseItemPerson: Codable, Identifiable {
|
||||
/// Gets or sets the identifier.
|
||||
public var id: UUID?
|
||||
public var id: String?
|
||||
/// Gets or sets the primary image blurhash.
|
||||
public var imageBlurHashes: ImageBlurHashes?
|
||||
/// Gets or sets the name.
|
||||
@ -90,7 +90,7 @@ public struct BaseItemPerson: Codable, Identifiable {
|
||||
}
|
||||
}
|
||||
|
||||
public init(id: UUID? = nil, imageBlurHashes: ImageBlurHashes? = nil, name: String? = nil, primaryImageTag: String? = nil, role: String? = nil, type: String? = nil) {
|
||||
public init(id: String? = nil, imageBlurHashes: ImageBlurHashes? = nil, name: String? = nil, primaryImageTag: String? = nil, role: String? = nil, type: String? = nil) {
|
||||
self.id = id
|
||||
self.imageBlurHashes = imageBlurHashes
|
||||
self.name = name
|
||||
@ -101,7 +101,7 @@ public struct BaseItemPerson: Codable, Identifiable {
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.imageBlurHashes = try values.decodeIfPresent(ImageBlurHashes.self, forKey: "ImageBlurHashes")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
self.primaryImageTag = try values.decodeIfPresent(String.self, forKey: "PrimaryImageTag")
|
||||
|
@ -11,12 +11,12 @@ import Foundation
|
||||
public struct BookInfoRemoteSearchQuery: Codable {
|
||||
/// Gets or sets a value indicating whether disabled providers should be included.
|
||||
public var isIncludeDisabledProviders: Bool?
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
public var searchInfo: BookInfo?
|
||||
/// Gets or sets the provider name to search within if set.
|
||||
public var searchProviderName: String?
|
||||
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: UUID? = nil, searchInfo: BookInfo? = nil, searchProviderName: String? = nil) {
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: String? = nil, searchInfo: BookInfo? = nil, searchProviderName: String? = nil) {
|
||||
self.isIncludeDisabledProviders = isIncludeDisabledProviders
|
||||
self.itemID = itemID
|
||||
self.searchInfo = searchInfo
|
||||
@ -26,7 +26,7 @@ public struct BookInfoRemoteSearchQuery: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isIncludeDisabledProviders = try values.decodeIfPresent(Bool.self, forKey: "IncludeDisabledProviders")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.searchInfo = try values.decodeIfPresent(BookInfo.self, forKey: "SearchInfo")
|
||||
self.searchProviderName = try values.decodeIfPresent(String.self, forKey: "SearchProviderName")
|
||||
}
|
||||
|
@ -11,12 +11,12 @@ import Foundation
|
||||
public struct BoxSetInfoRemoteSearchQuery: Codable {
|
||||
/// Gets or sets a value indicating whether disabled providers should be included.
|
||||
public var isIncludeDisabledProviders: Bool?
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
public var searchInfo: BoxSetInfo?
|
||||
/// Gets or sets the provider name to search within if set.
|
||||
public var searchProviderName: String?
|
||||
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: UUID? = nil, searchInfo: BoxSetInfo? = nil, searchProviderName: String? = nil) {
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: String? = nil, searchInfo: BoxSetInfo? = nil, searchProviderName: String? = nil) {
|
||||
self.isIncludeDisabledProviders = isIncludeDisabledProviders
|
||||
self.itemID = itemID
|
||||
self.searchInfo = searchInfo
|
||||
@ -26,7 +26,7 @@ public struct BoxSetInfoRemoteSearchQuery: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isIncludeDisabledProviders = try values.decodeIfPresent(Bool.self, forKey: "IncludeDisabledProviders")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.searchInfo = try values.decodeIfPresent(BoxSetInfo.self, forKey: "SearchInfo")
|
||||
self.searchProviderName = try values.decodeIfPresent(String.self, forKey: "SearchProviderName")
|
||||
}
|
||||
|
@ -13,13 +13,13 @@ public struct BufferRequestDto: Codable {
|
||||
/// Gets or sets a value indicating whether the client playback is unpaused.
|
||||
public var isPlaying: Bool?
|
||||
/// Gets or sets the playlist item identifier of the playing item.
|
||||
public var playlistItemID: UUID?
|
||||
public var playlistItemID: String?
|
||||
/// Gets or sets the position ticks.
|
||||
public var positionTicks: Int64?
|
||||
/// Gets or sets when the request has been made by the client.
|
||||
public var when: Date?
|
||||
|
||||
public init(isPlaying: Bool? = nil, playlistItemID: UUID? = nil, positionTicks: Int64? = nil, when: Date? = nil) {
|
||||
public init(isPlaying: Bool? = nil, playlistItemID: String? = nil, positionTicks: Int64? = nil, when: Date? = nil) {
|
||||
self.isPlaying = isPlaying
|
||||
self.playlistItemID = playlistItemID
|
||||
self.positionTicks = positionTicks
|
||||
@ -29,7 +29,7 @@ public struct BufferRequestDto: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isPlaying = try values.decodeIfPresent(Bool.self, forKey: "IsPlaying")
|
||||
self.playlistItemID = try values.decodeIfPresent(UUID.self, forKey: "PlaylistItemId")
|
||||
self.playlistItemID = try values.decodeIfPresent(String.self, forKey: "PlaylistItemId")
|
||||
self.positionTicks = try values.decodeIfPresent(Int64.self, forKey: "PositionTicks")
|
||||
self.when = try values.decodeIfPresent(Date.self, forKey: "When")
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public struct ChannelFeatures: Codable, Identifiable {
|
||||
/// Gets or sets the default sort orders.
|
||||
public var defaultSortFields: [ChannelItemSortField]?
|
||||
/// Gets or sets the identifier.
|
||||
public var id: UUID?
|
||||
public var id: String?
|
||||
/// Gets or sets the maximum number of records the channel allows retrieving at a time.
|
||||
public var maxPageSize: Int32?
|
||||
/// Gets or sets the media types.
|
||||
@ -34,7 +34,7 @@ public struct ChannelFeatures: Codable, Identifiable {
|
||||
/// Gets or sets a value indicating whether a sort ascending/descending toggle is supported.
|
||||
public var isSupportsSortOrderToggle: Bool?
|
||||
|
||||
public init(autoRefreshLevels: Int32? = nil, canFilter: Bool? = nil, canSearch: Bool? = nil, contentTypes: [ChannelMediaContentType]? = nil, defaultSortFields: [ChannelItemSortField]? = nil, id: UUID? = nil, maxPageSize: Int32? = nil, mediaTypes: [ChannelMediaType]? = nil, name: String? = nil, isSupportsContentDownloading: Bool? = nil, isSupportsLatestMedia: Bool? = nil, isSupportsSortOrderToggle: Bool? = nil) {
|
||||
public init(autoRefreshLevels: Int32? = nil, canFilter: Bool? = nil, canSearch: Bool? = nil, contentTypes: [ChannelMediaContentType]? = nil, defaultSortFields: [ChannelItemSortField]? = nil, id: String? = nil, maxPageSize: Int32? = nil, mediaTypes: [ChannelMediaType]? = nil, name: String? = nil, isSupportsContentDownloading: Bool? = nil, isSupportsLatestMedia: Bool? = nil, isSupportsSortOrderToggle: Bool? = nil) {
|
||||
self.autoRefreshLevels = autoRefreshLevels
|
||||
self.canFilter = canFilter
|
||||
self.canSearch = canSearch
|
||||
@ -56,7 +56,7 @@ public struct ChannelFeatures: Codable, Identifiable {
|
||||
self.canSearch = try values.decodeIfPresent(Bool.self, forKey: "CanSearch")
|
||||
self.contentTypes = try values.decodeIfPresent([ChannelMediaContentType].self, forKey: "ContentTypes")
|
||||
self.defaultSortFields = try values.decodeIfPresent([ChannelItemSortField].self, forKey: "DefaultSortFields")
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.maxPageSize = try values.decodeIfPresent(Int32.self, forKey: "MaxPageSize")
|
||||
self.mediaTypes = try values.decodeIfPresent([ChannelMediaType].self, forKey: "MediaTypes")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
|
@ -9,15 +9,15 @@
|
||||
import Foundation
|
||||
|
||||
public struct CollectionCreationResult: Codable, Identifiable {
|
||||
public var id: UUID?
|
||||
public var id: String?
|
||||
|
||||
public init(id: UUID? = nil) {
|
||||
public init(id: String? = nil) {
|
||||
self.id = id
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -21,9 +21,9 @@ public struct ConfigurationPageInfo: Codable {
|
||||
/// Gets or sets the name.
|
||||
public var name: String?
|
||||
/// Gets or sets the plugin id.
|
||||
public var pluginID: UUID?
|
||||
public var pluginID: String?
|
||||
|
||||
public init(displayName: String? = nil, enableInMainMenu: Bool? = nil, menuIcon: String? = nil, menuSection: String? = nil, name: String? = nil, pluginID: UUID? = nil) {
|
||||
public init(displayName: String? = nil, enableInMainMenu: Bool? = nil, menuIcon: String? = nil, menuSection: String? = nil, name: String? = nil, pluginID: String? = nil) {
|
||||
self.displayName = displayName
|
||||
self.enableInMainMenu = enableInMainMenu
|
||||
self.menuIcon = menuIcon
|
||||
@ -39,7 +39,7 @@ public struct ConfigurationPageInfo: Codable {
|
||||
self.menuIcon = try values.decodeIfPresent(String.self, forKey: "MenuIcon")
|
||||
self.menuSection = try values.decodeIfPresent(String.self, forKey: "MenuSection")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
self.pluginID = try values.decodeIfPresent(UUID.self, forKey: "PluginId")
|
||||
self.pluginID = try values.decodeIfPresent(String.self, forKey: "PluginId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -11,15 +11,15 @@ import Foundation
|
||||
/// Create new playlist dto.
|
||||
public struct CreatePlaylistDto: Codable {
|
||||
/// Gets or sets item ids to add to the playlist.
|
||||
public var ids: [UUID]?
|
||||
public var ids: [String]?
|
||||
/// Gets or sets the media type.
|
||||
public var mediaType: String?
|
||||
/// Gets or sets the name of the new playlist.
|
||||
public var name: String?
|
||||
/// Gets or sets the user id.
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
|
||||
public init(ids: [UUID]? = nil, mediaType: String? = nil, name: String? = nil, userID: UUID? = nil) {
|
||||
public init(ids: [String]? = nil, mediaType: String? = nil, name: String? = nil, userID: String? = nil) {
|
||||
self.ids = ids
|
||||
self.mediaType = mediaType
|
||||
self.name = name
|
||||
@ -28,10 +28,10 @@ public struct CreatePlaylistDto: Codable {
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.ids = try values.decodeIfPresent([UUID].self, forKey: "Ids")
|
||||
self.ids = try values.decodeIfPresent([String].self, forKey: "Ids")
|
||||
self.mediaType = try values.decodeIfPresent(String.self, forKey: "MediaType")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
self.userID = try values.decodeIfPresent(UUID.self, forKey: "UserId")
|
||||
self.userID = try values.decodeIfPresent(String.self, forKey: "UserId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -23,12 +23,12 @@ public struct DeviceInfo: Codable, Identifiable {
|
||||
/// Gets or sets the identifier.
|
||||
public var id: String?
|
||||
/// Gets or sets the last user identifier.
|
||||
public var lastUserID: UUID?
|
||||
public var lastUserID: String?
|
||||
/// Gets or sets the last name of the user.
|
||||
public var lastUserName: String?
|
||||
public var name: String?
|
||||
|
||||
public init(accessToken: String? = nil, appName: String? = nil, appVersion: String? = nil, capabilities: ClientCapabilities? = nil, dateLastActivity: Date? = nil, iconURL: String? = nil, id: String? = nil, lastUserID: UUID? = nil, lastUserName: String? = nil, name: String? = nil) {
|
||||
public init(accessToken: String? = nil, appName: String? = nil, appVersion: String? = nil, capabilities: ClientCapabilities? = nil, dateLastActivity: Date? = nil, iconURL: String? = nil, id: String? = nil, lastUserID: String? = nil, lastUserName: String? = nil, name: String? = nil) {
|
||||
self.accessToken = accessToken
|
||||
self.appName = appName
|
||||
self.appVersion = appVersion
|
||||
@ -50,7 +50,7 @@ public struct DeviceInfo: Codable, Identifiable {
|
||||
self.dateLastActivity = try values.decodeIfPresent(Date.self, forKey: "DateLastActivity")
|
||||
self.iconURL = try values.decodeIfPresent(String.self, forKey: "IconUrl")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.lastUserID = try values.decodeIfPresent(UUID.self, forKey: "LastUserId")
|
||||
self.lastUserID = try values.decodeIfPresent(String.self, forKey: "LastUserId")
|
||||
self.lastUserName = try values.decodeIfPresent(String.self, forKey: "LastUserName")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
}
|
||||
|
@ -10,11 +10,11 @@ import Foundation
|
||||
|
||||
public struct GeneralCommand: Codable {
|
||||
public var arguments: [String: String]?
|
||||
public var controllingUserID: UUID?
|
||||
public var controllingUserID: String?
|
||||
/// This exists simply to identify a set of known commands.
|
||||
public var name: GeneralCommandType?
|
||||
|
||||
public init(arguments: [String: String]? = nil, controllingUserID: UUID? = nil, name: GeneralCommandType? = nil) {
|
||||
public init(arguments: [String: String]? = nil, controllingUserID: String? = nil, name: GeneralCommandType? = nil) {
|
||||
self.arguments = arguments
|
||||
self.controllingUserID = controllingUserID
|
||||
self.name = name
|
||||
@ -23,7 +23,7 @@ public struct GeneralCommand: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.arguments = try values.decodeIfPresent([String: String].self, forKey: "Arguments")
|
||||
self.controllingUserID = try values.decodeIfPresent(UUID.self, forKey: "ControllingUserId")
|
||||
self.controllingUserID = try values.decodeIfPresent(String.self, forKey: "ControllingUserId")
|
||||
self.name = try values.decodeIfPresent(GeneralCommandType.self, forKey: "Name")
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ import Foundation
|
||||
/// Get programs dto.
|
||||
public struct GetProgramsDto: Codable {
|
||||
/// Gets or sets the channels to return guide information for.
|
||||
public var channelIDs: [UUID]?
|
||||
public var channelIDs: [String]?
|
||||
/// Gets or sets the image types to include in the output.
|
||||
///
|
||||
/// Optional.
|
||||
@ -31,7 +31,7 @@ public struct GetProgramsDto: Codable {
|
||||
/// Optional.
|
||||
public var fields: [ItemFields]?
|
||||
/// Gets or sets the genre ids to return guide information for.
|
||||
public var genreIDs: [UUID]?
|
||||
public var genreIDs: [String]?
|
||||
/// Gets or sets the genres to return guide information for.
|
||||
public var genres: [String]?
|
||||
/// Gets or sets filter by programs that have completed airing, or not.
|
||||
@ -69,7 +69,7 @@ public struct GetProgramsDto: Codable {
|
||||
/// Gets or sets filter by library series id.
|
||||
///
|
||||
/// Optional.
|
||||
public var librarySeriesID: UUID?
|
||||
public var librarySeriesID: String?
|
||||
/// Gets or sets the maximum number of records to return.
|
||||
///
|
||||
/// Optional.
|
||||
@ -105,9 +105,9 @@ public struct GetProgramsDto: Codable {
|
||||
/// Optional.
|
||||
public var startIndex: Int32?
|
||||
/// Gets or sets optional. Filter by user id.
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
|
||||
public init(channelIDs: [UUID]? = nil, enableImageTypes: [ImageType]? = nil, enableImages: Bool? = nil, enableTotalRecordCount: Bool? = nil, enableUserData: Bool? = nil, fields: [ItemFields]? = nil, genreIDs: [UUID]? = nil, genres: [String]? = nil, hasAired: Bool? = nil, imageTypeLimit: Int32? = nil, isAiring: Bool? = nil, isKids: Bool? = nil, isMovie: Bool? = nil, isNews: Bool? = nil, isSeries: Bool? = nil, isSports: Bool? = nil, librarySeriesID: UUID? = nil, limit: Int32? = nil, maxEndDate: Date? = nil, maxStartDate: Date? = nil, minEndDate: Date? = nil, minStartDate: Date? = nil, seriesTimerID: String? = nil, sortBy: [String]? = nil, sortOrder: [SortOrder]? = nil, startIndex: Int32? = nil, userID: UUID? = nil) {
|
||||
public init(channelIDs: [String]? = nil, enableImageTypes: [ImageType]? = nil, enableImages: Bool? = nil, enableTotalRecordCount: Bool? = nil, enableUserData: Bool? = nil, fields: [ItemFields]? = nil, genreIDs: [String]? = nil, genres: [String]? = nil, hasAired: Bool? = nil, imageTypeLimit: Int32? = nil, isAiring: Bool? = nil, isKids: Bool? = nil, isMovie: Bool? = nil, isNews: Bool? = nil, isSeries: Bool? = nil, isSports: Bool? = nil, librarySeriesID: String? = nil, limit: Int32? = nil, maxEndDate: Date? = nil, maxStartDate: Date? = nil, minEndDate: Date? = nil, minStartDate: Date? = nil, seriesTimerID: String? = nil, sortBy: [String]? = nil, sortOrder: [SortOrder]? = nil, startIndex: Int32? = nil, userID: String? = nil) {
|
||||
self.channelIDs = channelIDs
|
||||
self.enableImageTypes = enableImageTypes
|
||||
self.enableImages = enableImages
|
||||
@ -139,13 +139,13 @@ public struct GetProgramsDto: Codable {
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.channelIDs = try values.decodeIfPresent([UUID].self, forKey: "ChannelIds")
|
||||
self.channelIDs = try values.decodeIfPresent([String].self, forKey: "ChannelIds")
|
||||
self.enableImageTypes = try values.decodeIfPresent([ImageType].self, forKey: "EnableImageTypes")
|
||||
self.enableImages = try values.decodeIfPresent(Bool.self, forKey: "EnableImages")
|
||||
self.enableTotalRecordCount = try values.decodeIfPresent(Bool.self, forKey: "EnableTotalRecordCount")
|
||||
self.enableUserData = try values.decodeIfPresent(Bool.self, forKey: "EnableUserData")
|
||||
self.fields = try values.decodeIfPresent([ItemFields].self, forKey: "Fields")
|
||||
self.genreIDs = try values.decodeIfPresent([UUID].self, forKey: "GenreIds")
|
||||
self.genreIDs = try values.decodeIfPresent([String].self, forKey: "GenreIds")
|
||||
self.genres = try values.decodeIfPresent([String].self, forKey: "Genres")
|
||||
self.hasAired = try values.decodeIfPresent(Bool.self, forKey: "HasAired")
|
||||
self.imageTypeLimit = try values.decodeIfPresent(Int32.self, forKey: "ImageTypeLimit")
|
||||
@ -155,7 +155,7 @@ public struct GetProgramsDto: Codable {
|
||||
self.isNews = try values.decodeIfPresent(Bool.self, forKey: "IsNews")
|
||||
self.isSeries = try values.decodeIfPresent(Bool.self, forKey: "IsSeries")
|
||||
self.isSports = try values.decodeIfPresent(Bool.self, forKey: "IsSports")
|
||||
self.librarySeriesID = try values.decodeIfPresent(UUID.self, forKey: "LibrarySeriesId")
|
||||
self.librarySeriesID = try values.decodeIfPresent(String.self, forKey: "LibrarySeriesId")
|
||||
self.limit = try values.decodeIfPresent(Int32.self, forKey: "Limit")
|
||||
self.maxEndDate = try values.decodeIfPresent(Date.self, forKey: "MaxEndDate")
|
||||
self.maxStartDate = try values.decodeIfPresent(Date.self, forKey: "MaxStartDate")
|
||||
@ -165,7 +165,7 @@ public struct GetProgramsDto: Codable {
|
||||
self.sortBy = try values.decodeIfPresent([String].self, forKey: "SortBy")
|
||||
self.sortOrder = try values.decodeIfPresent([SortOrder].self, forKey: "SortOrder")
|
||||
self.startIndex = try values.decodeIfPresent(Int32.self, forKey: "StartIndex")
|
||||
self.userID = try values.decodeIfPresent(UUID.self, forKey: "UserId")
|
||||
self.userID = try values.decodeIfPresent(String.self, forKey: "UserId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -11,7 +11,7 @@ import Foundation
|
||||
/// Class GroupInfoDto.
|
||||
public struct GroupInfoDto: Codable {
|
||||
/// Gets the group identifier.
|
||||
public var groupID: UUID?
|
||||
public var groupID: String?
|
||||
/// Gets the group name.
|
||||
public var groupName: String?
|
||||
/// Gets the date when this DTO has been created.
|
||||
@ -21,7 +21,7 @@ public struct GroupInfoDto: Codable {
|
||||
/// Gets the group state.
|
||||
public var state: GroupStateType?
|
||||
|
||||
public init(groupID: UUID? = nil, groupName: String? = nil, lastUpdatedAt: Date? = nil, participants: [String]? = nil, state: GroupStateType? = nil) {
|
||||
public init(groupID: String? = nil, groupName: String? = nil, lastUpdatedAt: Date? = nil, participants: [String]? = nil, state: GroupStateType? = nil) {
|
||||
self.groupID = groupID
|
||||
self.groupName = groupName
|
||||
self.lastUpdatedAt = lastUpdatedAt
|
||||
@ -31,7 +31,7 @@ public struct GroupInfoDto: Codable {
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.groupID = try values.decodeIfPresent(UUID.self, forKey: "GroupId")
|
||||
self.groupID = try values.decodeIfPresent(String.self, forKey: "GroupId")
|
||||
self.groupName = try values.decodeIfPresent(String.self, forKey: "GroupName")
|
||||
self.lastUpdatedAt = try values.decodeIfPresent(Date.self, forKey: "LastUpdatedAt")
|
||||
self.participants = try values.decodeIfPresent([String].self, forKey: "Participants")
|
||||
|
@ -19,13 +19,13 @@ public struct IPlugin: Codable, Identifiable {
|
||||
/// Gets the Description.
|
||||
public var description: String?
|
||||
/// Gets the unique id.
|
||||
public var id: UUID?
|
||||
public var id: String?
|
||||
/// Gets the name of the plugin.
|
||||
public var name: String?
|
||||
/// Gets the plugin version.
|
||||
public var version: String?
|
||||
|
||||
public init(assemblyFilePath: String? = nil, canUninstall: Bool? = nil, dataFolderPath: String? = nil, description: String? = nil, id: UUID? = nil, name: String? = nil, version: String? = nil) {
|
||||
public init(assemblyFilePath: String? = nil, canUninstall: Bool? = nil, dataFolderPath: String? = nil, description: String? = nil, id: String? = nil, name: String? = nil, version: String? = nil) {
|
||||
self.assemblyFilePath = assemblyFilePath
|
||||
self.canUninstall = canUninstall
|
||||
self.dataFolderPath = dataFolderPath
|
||||
@ -41,7 +41,7 @@ public struct IPlugin: Codable, Identifiable {
|
||||
self.canUninstall = try values.decodeIfPresent(Bool.self, forKey: "CanUninstall")
|
||||
self.dataFolderPath = try values.decodeIfPresent(String.self, forKey: "DataFolderPath")
|
||||
self.description = try values.decodeIfPresent(String.self, forKey: "Description")
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
self.version = try values.decodeIfPresent(String.self, forKey: "Version")
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ public struct InstallationInfo: Codable {
|
||||
/// Gets or sets a checksum for the binary.
|
||||
public var checksum: String?
|
||||
/// Gets or sets the Id.
|
||||
public var guid: UUID?
|
||||
public var guid: String?
|
||||
/// Gets or sets the name.
|
||||
public var name: String?
|
||||
/// Gets or sets package information for the installation.
|
||||
@ -25,7 +25,7 @@ public struct InstallationInfo: Codable {
|
||||
/// Gets or sets the version.
|
||||
public var version: String?
|
||||
|
||||
public init(changelog: String? = nil, checksum: String? = nil, guid: UUID? = nil, name: String? = nil, packageInfo: PackageInfo? = nil, sourceURL: String? = nil, version: String? = nil) {
|
||||
public init(changelog: String? = nil, checksum: String? = nil, guid: String? = nil, name: String? = nil, packageInfo: PackageInfo? = nil, sourceURL: String? = nil, version: String? = nil) {
|
||||
self.changelog = changelog
|
||||
self.checksum = checksum
|
||||
self.guid = guid
|
||||
@ -39,7 +39,7 @@ public struct InstallationInfo: Codable {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.changelog = try values.decodeIfPresent(String.self, forKey: "Changelog")
|
||||
self.checksum = try values.decodeIfPresent(String.self, forKey: "Checksum")
|
||||
self.guid = try values.decodeIfPresent(UUID.self, forKey: "Guid")
|
||||
self.guid = try values.decodeIfPresent(String.self, forKey: "Guid")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
self.packageInfo = try values.decodeIfPresent(PackageInfo.self, forKey: "PackageInfo")
|
||||
self.sourceURL = try values.decodeIfPresent(String.self, forKey: "SourceUrl")
|
||||
|
@ -11,15 +11,15 @@ import Foundation
|
||||
/// Class JoinGroupRequestDto.
|
||||
public struct JoinGroupRequestDto: Codable {
|
||||
/// Gets or sets the group identifier.
|
||||
public var groupID: UUID?
|
||||
public var groupID: String?
|
||||
|
||||
public init(groupID: UUID? = nil) {
|
||||
public init(groupID: String? = nil) {
|
||||
self.groupID = groupID
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.groupID = try values.decodeIfPresent(UUID.self, forKey: "GroupId")
|
||||
self.groupID = try values.decodeIfPresent(String.self, forKey: "GroupId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -13,9 +13,9 @@ public struct MovePlaylistItemRequestDto: Codable {
|
||||
/// Gets or sets the new position.
|
||||
public var newIndex: Int32?
|
||||
/// Gets or sets the playlist identifier of the item.
|
||||
public var playlistItemID: UUID?
|
||||
public var playlistItemID: String?
|
||||
|
||||
public init(newIndex: Int32? = nil, playlistItemID: UUID? = nil) {
|
||||
public init(newIndex: Int32? = nil, playlistItemID: String? = nil) {
|
||||
self.newIndex = newIndex
|
||||
self.playlistItemID = playlistItemID
|
||||
}
|
||||
@ -23,7 +23,7 @@ public struct MovePlaylistItemRequestDto: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.newIndex = try values.decodeIfPresent(Int32.self, forKey: "NewIndex")
|
||||
self.playlistItemID = try values.decodeIfPresent(UUID.self, forKey: "PlaylistItemId")
|
||||
self.playlistItemID = try values.decodeIfPresent(String.self, forKey: "PlaylistItemId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -11,12 +11,12 @@ import Foundation
|
||||
public struct MovieInfoRemoteSearchQuery: Codable {
|
||||
/// Gets or sets a value indicating whether disabled providers should be included.
|
||||
public var isIncludeDisabledProviders: Bool?
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
public var searchInfo: MovieInfo?
|
||||
/// Gets or sets the provider name to search within if set.
|
||||
public var searchProviderName: String?
|
||||
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: UUID? = nil, searchInfo: MovieInfo? = nil, searchProviderName: String? = nil) {
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: String? = nil, searchInfo: MovieInfo? = nil, searchProviderName: String? = nil) {
|
||||
self.isIncludeDisabledProviders = isIncludeDisabledProviders
|
||||
self.itemID = itemID
|
||||
self.searchInfo = searchInfo
|
||||
@ -26,7 +26,7 @@ public struct MovieInfoRemoteSearchQuery: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isIncludeDisabledProviders = try values.decodeIfPresent(Bool.self, forKey: "IncludeDisabledProviders")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.searchInfo = try values.decodeIfPresent(MovieInfo.self, forKey: "SearchInfo")
|
||||
self.searchProviderName = try values.decodeIfPresent(String.self, forKey: "SearchProviderName")
|
||||
}
|
||||
|
@ -11,12 +11,12 @@ import Foundation
|
||||
public struct MusicVideoInfoRemoteSearchQuery: Codable {
|
||||
/// Gets or sets a value indicating whether disabled providers should be included.
|
||||
public var isIncludeDisabledProviders: Bool?
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
public var searchInfo: MusicVideoInfo?
|
||||
/// Gets or sets the provider name to search within if set.
|
||||
public var searchProviderName: String?
|
||||
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: UUID? = nil, searchInfo: MusicVideoInfo? = nil, searchProviderName: String? = nil) {
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: String? = nil, searchInfo: MusicVideoInfo? = nil, searchProviderName: String? = nil) {
|
||||
self.isIncludeDisabledProviders = isIncludeDisabledProviders
|
||||
self.itemID = itemID
|
||||
self.searchInfo = searchInfo
|
||||
@ -26,7 +26,7 @@ public struct MusicVideoInfoRemoteSearchQuery: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isIncludeDisabledProviders = try values.decodeIfPresent(Bool.self, forKey: "IncludeDisabledProviders")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.searchInfo = try values.decodeIfPresent(MusicVideoInfo.self, forKey: "SearchInfo")
|
||||
self.searchProviderName = try values.decodeIfPresent(String.self, forKey: "SearchProviderName")
|
||||
}
|
||||
|
@ -9,17 +9,17 @@
|
||||
import Foundation
|
||||
|
||||
public struct NameGuidPair: Codable, Identifiable {
|
||||
public var id: UUID?
|
||||
public var id: String?
|
||||
public var name: String?
|
||||
|
||||
public init(id: UUID? = nil, name: String? = nil) {
|
||||
public init(id: String? = nil, name: String? = nil) {
|
||||
self.id = id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
}
|
||||
|
||||
|
@ -11,15 +11,15 @@ import Foundation
|
||||
/// Class NextItemRequestDto.
|
||||
public struct NextItemRequestDto: Codable {
|
||||
/// Gets or sets the playing item identifier.
|
||||
public var playlistItemID: UUID?
|
||||
public var playlistItemID: String?
|
||||
|
||||
public init(playlistItemID: UUID? = nil) {
|
||||
public init(playlistItemID: String? = nil) {
|
||||
self.playlistItemID = playlistItemID
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.playlistItemID = try values.decodeIfPresent(UUID.self, forKey: "PlaylistItemId")
|
||||
self.playlistItemID = try values.decodeIfPresent(String.self, forKey: "PlaylistItemId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -13,11 +13,11 @@ public struct ObjectGroupUpdate: Codable {
|
||||
/// Gets the update data.
|
||||
public var data: AnyJSON?
|
||||
/// Gets the group identifier.
|
||||
public var groupID: UUID?
|
||||
public var groupID: String?
|
||||
/// Gets the update type.
|
||||
public var type: GroupUpdateType?
|
||||
|
||||
public init(data: AnyJSON? = nil, groupID: UUID? = nil, type: GroupUpdateType? = nil) {
|
||||
public init(data: AnyJSON? = nil, groupID: String? = nil, type: GroupUpdateType? = nil) {
|
||||
self.data = data
|
||||
self.groupID = groupID
|
||||
self.type = type
|
||||
@ -26,7 +26,7 @@ public struct ObjectGroupUpdate: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.data = try values.decodeIfPresent(AnyJSON.self, forKey: "Data")
|
||||
self.groupID = try values.decodeIfPresent(UUID.self, forKey: "GroupId")
|
||||
self.groupID = try values.decodeIfPresent(String.self, forKey: "GroupId")
|
||||
self.type = try values.decodeIfPresent(GroupUpdateType.self, forKey: "Type")
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ public struct OpenLiveStreamDto: Codable {
|
||||
/// Gets or sets a value indicating whether to enale direct stream.
|
||||
public var enableDirectStream: Bool?
|
||||
/// Gets or sets the item id.
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
/// Gets or sets the max audio channels.
|
||||
public var maxAudioChannels: Int32?
|
||||
/// Gets or sets the max streaming bitrate.
|
||||
@ -45,9 +45,9 @@ public struct OpenLiveStreamDto: Codable {
|
||||
/// Gets or sets the subtitle stream index.
|
||||
public var subtitleStreamIndex: Int32?
|
||||
/// Gets or sets the user id.
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
|
||||
public init(audioStreamIndex: Int32? = nil, deviceProfile: DeviceProfile? = nil, directPlayProtocols: [MediaProtocol]? = nil, enableDirectPlay: Bool? = nil, enableDirectStream: Bool? = nil, itemID: UUID? = nil, maxAudioChannels: Int32? = nil, maxStreamingBitrate: Int32? = nil, openToken: String? = nil, playSessionID: String? = nil, startTimeTicks: Int64? = nil, subtitleStreamIndex: Int32? = nil, userID: UUID? = nil) {
|
||||
public init(audioStreamIndex: Int32? = nil, deviceProfile: DeviceProfile? = nil, directPlayProtocols: [MediaProtocol]? = nil, enableDirectPlay: Bool? = nil, enableDirectStream: Bool? = nil, itemID: String? = nil, maxAudioChannels: Int32? = nil, maxStreamingBitrate: Int32? = nil, openToken: String? = nil, playSessionID: String? = nil, startTimeTicks: Int64? = nil, subtitleStreamIndex: Int32? = nil, userID: String? = nil) {
|
||||
self.audioStreamIndex = audioStreamIndex
|
||||
self.deviceProfile = deviceProfile
|
||||
self.directPlayProtocols = directPlayProtocols
|
||||
@ -70,14 +70,14 @@ public struct OpenLiveStreamDto: Codable {
|
||||
self.directPlayProtocols = try values.decodeIfPresent([MediaProtocol].self, forKey: "DirectPlayProtocols")
|
||||
self.enableDirectPlay = try values.decodeIfPresent(Bool.self, forKey: "EnableDirectPlay")
|
||||
self.enableDirectStream = try values.decodeIfPresent(Bool.self, forKey: "EnableDirectStream")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.maxAudioChannels = try values.decodeIfPresent(Int32.self, forKey: "MaxAudioChannels")
|
||||
self.maxStreamingBitrate = try values.decodeIfPresent(Int32.self, forKey: "MaxStreamingBitrate")
|
||||
self.openToken = try values.decodeIfPresent(String.self, forKey: "OpenToken")
|
||||
self.playSessionID = try values.decodeIfPresent(String.self, forKey: "PlaySessionId")
|
||||
self.startTimeTicks = try values.decodeIfPresent(Int64.self, forKey: "StartTimeTicks")
|
||||
self.subtitleStreamIndex = try values.decodeIfPresent(Int32.self, forKey: "SubtitleStreamIndex")
|
||||
self.userID = try values.decodeIfPresent(UUID.self, forKey: "UserId")
|
||||
self.userID = try values.decodeIfPresent(String.self, forKey: "UserId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -17,7 +17,7 @@ public struct PackageInfo: Codable {
|
||||
/// Gets or sets the guid of the assembly associated with this plugin.
|
||||
///
|
||||
/// This is used to identify the proper item for automatic updates.
|
||||
public var guid: UUID?
|
||||
public var guid: String?
|
||||
/// Gets or sets the image url for the package.
|
||||
public var imageURL: String?
|
||||
/// Gets or sets the name.
|
||||
@ -29,7 +29,7 @@ public struct PackageInfo: Codable {
|
||||
/// Gets or sets the versions.
|
||||
public var versions: [VersionInfo]?
|
||||
|
||||
public init(category: String? = nil, description: String? = nil, guid: UUID? = nil, imageURL: String? = nil, name: String? = nil, overview: String? = nil, owner: String? = nil, versions: [VersionInfo]? = nil) {
|
||||
public init(category: String? = nil, description: String? = nil, guid: String? = nil, imageURL: String? = nil, name: String? = nil, overview: String? = nil, owner: String? = nil, versions: [VersionInfo]? = nil) {
|
||||
self.category = category
|
||||
self.description = description
|
||||
self.guid = guid
|
||||
@ -44,7 +44,7 @@ public struct PackageInfo: Codable {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.category = try values.decodeIfPresent(String.self, forKey: "category")
|
||||
self.description = try values.decodeIfPresent(String.self, forKey: "description")
|
||||
self.guid = try values.decodeIfPresent(UUID.self, forKey: "guid")
|
||||
self.guid = try values.decodeIfPresent(String.self, forKey: "guid")
|
||||
self.imageURL = try values.decodeIfPresent(String.self, forKey: "imageUrl")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "name")
|
||||
self.overview = try values.decodeIfPresent(String.self, forKey: "overview")
|
||||
|
@ -11,12 +11,12 @@ import Foundation
|
||||
public struct PersonLookupInfoRemoteSearchQuery: Codable {
|
||||
/// Gets or sets a value indicating whether disabled providers should be included.
|
||||
public var isIncludeDisabledProviders: Bool?
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
public var searchInfo: PersonLookupInfo?
|
||||
/// Gets or sets the provider name to search within if set.
|
||||
public var searchProviderName: String?
|
||||
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: UUID? = nil, searchInfo: PersonLookupInfo? = nil, searchProviderName: String? = nil) {
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: String? = nil, searchInfo: PersonLookupInfo? = nil, searchProviderName: String? = nil) {
|
||||
self.isIncludeDisabledProviders = isIncludeDisabledProviders
|
||||
self.itemID = itemID
|
||||
self.searchInfo = searchInfo
|
||||
@ -26,7 +26,7 @@ public struct PersonLookupInfoRemoteSearchQuery: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isIncludeDisabledProviders = try values.decodeIfPresent(Bool.self, forKey: "IncludeDisabledProviders")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.searchInfo = try values.decodeIfPresent(PersonLookupInfo.self, forKey: "SearchInfo")
|
||||
self.searchProviderName = try values.decodeIfPresent(String.self, forKey: "SearchProviderName")
|
||||
}
|
||||
|
@ -12,9 +12,9 @@ import Foundation
|
||||
public struct PlayRequest: Codable {
|
||||
public var audioStreamIndex: Int32?
|
||||
/// Gets or sets the controlling user identifier.
|
||||
public var controllingUserID: UUID?
|
||||
public var controllingUserID: String?
|
||||
/// Gets or sets the item ids.
|
||||
public var itemIDs: [UUID]?
|
||||
public var itemIDs: [String]?
|
||||
public var mediaSourceID: String?
|
||||
/// Gets or sets the play command.
|
||||
public var playCommand: PlayCommand?
|
||||
@ -23,7 +23,7 @@ public struct PlayRequest: Codable {
|
||||
public var startPositionTicks: Int64?
|
||||
public var subtitleStreamIndex: Int32?
|
||||
|
||||
public init(audioStreamIndex: Int32? = nil, controllingUserID: UUID? = nil, itemIDs: [UUID]? = nil, mediaSourceID: String? = nil, playCommand: PlayCommand? = nil, startIndex: Int32? = nil, startPositionTicks: Int64? = nil, subtitleStreamIndex: Int32? = nil) {
|
||||
public init(audioStreamIndex: Int32? = nil, controllingUserID: String? = nil, itemIDs: [String]? = nil, mediaSourceID: String? = nil, playCommand: PlayCommand? = nil, startIndex: Int32? = nil, startPositionTicks: Int64? = nil, subtitleStreamIndex: Int32? = nil) {
|
||||
self.audioStreamIndex = audioStreamIndex
|
||||
self.controllingUserID = controllingUserID
|
||||
self.itemIDs = itemIDs
|
||||
@ -37,8 +37,8 @@ public struct PlayRequest: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.audioStreamIndex = try values.decodeIfPresent(Int32.self, forKey: "AudioStreamIndex")
|
||||
self.controllingUserID = try values.decodeIfPresent(UUID.self, forKey: "ControllingUserId")
|
||||
self.itemIDs = try values.decodeIfPresent([UUID].self, forKey: "ItemIds")
|
||||
self.controllingUserID = try values.decodeIfPresent(String.self, forKey: "ControllingUserId")
|
||||
self.itemIDs = try values.decodeIfPresent([String].self, forKey: "ItemIds")
|
||||
self.mediaSourceID = try values.decodeIfPresent(String.self, forKey: "MediaSourceId")
|
||||
self.playCommand = try values.decodeIfPresent(PlayCommand.self, forKey: "PlayCommand")
|
||||
self.startIndex = try values.decodeIfPresent(Int32.self, forKey: "StartIndex")
|
||||
|
@ -13,11 +13,11 @@ public struct PlayRequestDto: Codable {
|
||||
/// Gets or sets the position of the playing item in the queue.
|
||||
public var playingItemPosition: Int32?
|
||||
/// Gets or sets the playing queue.
|
||||
public var playingQueue: [UUID]?
|
||||
public var playingQueue: [String]?
|
||||
/// Gets or sets the start position ticks.
|
||||
public var startPositionTicks: Int64?
|
||||
|
||||
public init(playingItemPosition: Int32? = nil, playingQueue: [UUID]? = nil, startPositionTicks: Int64? = nil) {
|
||||
public init(playingItemPosition: Int32? = nil, playingQueue: [String]? = nil, startPositionTicks: Int64? = nil) {
|
||||
self.playingItemPosition = playingItemPosition
|
||||
self.playingQueue = playingQueue
|
||||
self.startPositionTicks = startPositionTicks
|
||||
@ -26,7 +26,7 @@ public struct PlayRequestDto: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.playingItemPosition = try values.decodeIfPresent(Int32.self, forKey: "PlayingItemPosition")
|
||||
self.playingQueue = try values.decodeIfPresent([UUID].self, forKey: "PlayingQueue")
|
||||
self.playingQueue = try values.decodeIfPresent([String].self, forKey: "PlayingQueue")
|
||||
self.startPositionTicks = try values.decodeIfPresent(Int64.self, forKey: "StartPositionTicks")
|
||||
}
|
||||
|
||||
|
@ -49,9 +49,9 @@ public struct PlaybackInfoDto: Codable {
|
||||
/// Gets or sets the subtitle stream index.
|
||||
public var subtitleStreamIndex: Int32?
|
||||
/// Gets or sets the playback userId.
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
|
||||
public init(allowAudioStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, audioStreamIndex: Int32? = nil, isAutoOpenLiveStream: Bool? = nil, deviceProfile: DeviceProfile? = nil, enableDirectPlay: Bool? = nil, enableDirectStream: Bool? = nil, enableTranscoding: Bool? = nil, liveStreamID: String? = nil, maxAudioChannels: Int32? = nil, maxStreamingBitrate: Int32? = nil, mediaSourceID: String? = nil, startTimeTicks: Int64? = nil, subtitleStreamIndex: Int32? = nil, userID: UUID? = nil) {
|
||||
public init(allowAudioStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, audioStreamIndex: Int32? = nil, isAutoOpenLiveStream: Bool? = nil, deviceProfile: DeviceProfile? = nil, enableDirectPlay: Bool? = nil, enableDirectStream: Bool? = nil, enableTranscoding: Bool? = nil, liveStreamID: String? = nil, maxAudioChannels: Int32? = nil, maxStreamingBitrate: Int32? = nil, mediaSourceID: String? = nil, startTimeTicks: Int64? = nil, subtitleStreamIndex: Int32? = nil, userID: String? = nil) {
|
||||
self.allowAudioStreamCopy = allowAudioStreamCopy
|
||||
self.allowVideoStreamCopy = allowVideoStreamCopy
|
||||
self.audioStreamIndex = audioStreamIndex
|
||||
@ -85,7 +85,7 @@ public struct PlaybackInfoDto: Codable {
|
||||
self.mediaSourceID = try values.decodeIfPresent(String.self, forKey: "MediaSourceId")
|
||||
self.startTimeTicks = try values.decodeIfPresent(Int64.self, forKey: "StartTimeTicks")
|
||||
self.subtitleStreamIndex = try values.decodeIfPresent(Int32.self, forKey: "SubtitleStreamIndex")
|
||||
self.userID = try values.decodeIfPresent(UUID.self, forKey: "UserId")
|
||||
self.userID = try values.decodeIfPresent(String.self, forKey: "UserId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -23,7 +23,7 @@ public struct PlaybackProgressInfo: Codable {
|
||||
/// Gets or sets the item.
|
||||
public var item: BaseItemDto?
|
||||
/// Gets or sets the item identifier.
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
/// Gets or sets the live stream identifier.
|
||||
public var liveStreamID: String?
|
||||
/// Gets or sets the media version identifier.
|
||||
@ -46,7 +46,7 @@ public struct PlaybackProgressInfo: Codable {
|
||||
/// Gets or sets the volume level.
|
||||
public var volumeLevel: Int32?
|
||||
|
||||
public init(aspectRatio: String? = nil, audioStreamIndex: Int32? = nil, brightness: Int32? = nil, canSeek: Bool? = nil, isMuted: Bool? = nil, isPaused: Bool? = nil, item: BaseItemDto? = nil, itemID: UUID? = nil, liveStreamID: String? = nil, mediaSourceID: String? = nil, nowPlayingQueue: [QueueItem]? = nil, playMethod: PlayMethod? = nil, playSessionID: String? = nil, playbackStartTimeTicks: Int64? = nil, playlistItemID: String? = nil, positionTicks: Int64? = nil, repeatMode: RepeatMode? = nil, sessionID: String? = nil, subtitleStreamIndex: Int32? = nil, volumeLevel: Int32? = nil) {
|
||||
public init(aspectRatio: String? = nil, audioStreamIndex: Int32? = nil, brightness: Int32? = nil, canSeek: Bool? = nil, isMuted: Bool? = nil, isPaused: Bool? = nil, item: BaseItemDto? = nil, itemID: String? = nil, liveStreamID: String? = nil, mediaSourceID: String? = nil, nowPlayingQueue: [QueueItem]? = nil, playMethod: PlayMethod? = nil, playSessionID: String? = nil, playbackStartTimeTicks: Int64? = nil, playlistItemID: String? = nil, positionTicks: Int64? = nil, repeatMode: RepeatMode? = nil, sessionID: String? = nil, subtitleStreamIndex: Int32? = nil, volumeLevel: Int32? = nil) {
|
||||
self.aspectRatio = aspectRatio
|
||||
self.audioStreamIndex = audioStreamIndex
|
||||
self.brightness = brightness
|
||||
@ -78,7 +78,7 @@ public struct PlaybackProgressInfo: Codable {
|
||||
self.isMuted = try values.decodeIfPresent(Bool.self, forKey: "IsMuted")
|
||||
self.isPaused = try values.decodeIfPresent(Bool.self, forKey: "IsPaused")
|
||||
self.item = try values.decodeIfPresent(BaseItemDto.self, forKey: "Item")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.liveStreamID = try values.decodeIfPresent(String.self, forKey: "LiveStreamId")
|
||||
self.mediaSourceID = try values.decodeIfPresent(String.self, forKey: "MediaSourceId")
|
||||
self.nowPlayingQueue = try values.decodeIfPresent([QueueItem].self, forKey: "NowPlayingQueue")
|
||||
|
@ -23,7 +23,7 @@ public struct PlaybackStartInfo: Codable {
|
||||
/// Gets or sets the item.
|
||||
public var item: BaseItemDto?
|
||||
/// Gets or sets the item identifier.
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
/// Gets or sets the live stream identifier.
|
||||
public var liveStreamID: String?
|
||||
/// Gets or sets the media version identifier.
|
||||
@ -46,7 +46,7 @@ public struct PlaybackStartInfo: Codable {
|
||||
/// Gets or sets the volume level.
|
||||
public var volumeLevel: Int32?
|
||||
|
||||
public init(aspectRatio: String? = nil, audioStreamIndex: Int32? = nil, brightness: Int32? = nil, canSeek: Bool? = nil, isMuted: Bool? = nil, isPaused: Bool? = nil, item: BaseItemDto? = nil, itemID: UUID? = nil, liveStreamID: String? = nil, mediaSourceID: String? = nil, nowPlayingQueue: [QueueItem]? = nil, playMethod: PlayMethod? = nil, playSessionID: String? = nil, playbackStartTimeTicks: Int64? = nil, playlistItemID: String? = nil, positionTicks: Int64? = nil, repeatMode: RepeatMode? = nil, sessionID: String? = nil, subtitleStreamIndex: Int32? = nil, volumeLevel: Int32? = nil) {
|
||||
public init(aspectRatio: String? = nil, audioStreamIndex: Int32? = nil, brightness: Int32? = nil, canSeek: Bool? = nil, isMuted: Bool? = nil, isPaused: Bool? = nil, item: BaseItemDto? = nil, itemID: String? = nil, liveStreamID: String? = nil, mediaSourceID: String? = nil, nowPlayingQueue: [QueueItem]? = nil, playMethod: PlayMethod? = nil, playSessionID: String? = nil, playbackStartTimeTicks: Int64? = nil, playlistItemID: String? = nil, positionTicks: Int64? = nil, repeatMode: RepeatMode? = nil, sessionID: String? = nil, subtitleStreamIndex: Int32? = nil, volumeLevel: Int32? = nil) {
|
||||
self.aspectRatio = aspectRatio
|
||||
self.audioStreamIndex = audioStreamIndex
|
||||
self.brightness = brightness
|
||||
@ -78,7 +78,7 @@ public struct PlaybackStartInfo: Codable {
|
||||
self.isMuted = try values.decodeIfPresent(Bool.self, forKey: "IsMuted")
|
||||
self.isPaused = try values.decodeIfPresent(Bool.self, forKey: "IsPaused")
|
||||
self.item = try values.decodeIfPresent(BaseItemDto.self, forKey: "Item")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.liveStreamID = try values.decodeIfPresent(String.self, forKey: "LiveStreamId")
|
||||
self.mediaSourceID = try values.decodeIfPresent(String.self, forKey: "MediaSourceId")
|
||||
self.nowPlayingQueue = try values.decodeIfPresent([QueueItem].self, forKey: "NowPlayingQueue")
|
||||
|
@ -15,7 +15,7 @@ public struct PlaybackStopInfo: Codable {
|
||||
/// Gets or sets the item.
|
||||
public var item: BaseItemDto?
|
||||
/// Gets or sets the item identifier.
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
/// Gets or sets the live stream identifier.
|
||||
public var liveStreamID: String?
|
||||
/// Gets or sets the media version identifier.
|
||||
@ -30,7 +30,7 @@ public struct PlaybackStopInfo: Codable {
|
||||
/// Gets or sets the session id.
|
||||
public var sessionID: String?
|
||||
|
||||
public init(isFailed: Bool? = nil, item: BaseItemDto? = nil, itemID: UUID? = nil, liveStreamID: String? = nil, mediaSourceID: String? = nil, nextMediaType: String? = nil, nowPlayingQueue: [QueueItem]? = nil, playSessionID: String? = nil, playlistItemID: String? = nil, positionTicks: Int64? = nil, sessionID: String? = nil) {
|
||||
public init(isFailed: Bool? = nil, item: BaseItemDto? = nil, itemID: String? = nil, liveStreamID: String? = nil, mediaSourceID: String? = nil, nextMediaType: String? = nil, nowPlayingQueue: [QueueItem]? = nil, playSessionID: String? = nil, playlistItemID: String? = nil, positionTicks: Int64? = nil, sessionID: String? = nil) {
|
||||
self.isFailed = isFailed
|
||||
self.item = item
|
||||
self.itemID = itemID
|
||||
@ -48,7 +48,7 @@ public struct PlaybackStopInfo: Codable {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isFailed = try values.decodeIfPresent(Bool.self, forKey: "Failed")
|
||||
self.item = try values.decodeIfPresent(BaseItemDto.self, forKey: "Item")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.liveStreamID = try values.decodeIfPresent(String.self, forKey: "LiveStreamId")
|
||||
self.mediaSourceID = try values.decodeIfPresent(String.self, forKey: "MediaSourceId")
|
||||
self.nextMediaType = try values.decodeIfPresent(String.self, forKey: "NextMediaType")
|
||||
|
@ -19,7 +19,7 @@ public struct PluginInfo: Codable, Identifiable {
|
||||
/// Gets or sets a value indicating whether this plugin has a valid image.
|
||||
public var hasImage: Bool?
|
||||
/// Gets or sets the unique id.
|
||||
public var id: UUID?
|
||||
public var id: String?
|
||||
/// Gets or sets the name.
|
||||
public var name: String?
|
||||
/// Gets or sets a value indicating the status of the plugin.
|
||||
@ -27,7 +27,7 @@ public struct PluginInfo: Codable, Identifiable {
|
||||
/// Gets or sets the version.
|
||||
public var version: String?
|
||||
|
||||
public init(canUninstall: Bool? = nil, configurationFileName: String? = nil, description: String? = nil, hasImage: Bool? = nil, id: UUID? = nil, name: String? = nil, status: PluginStatus? = nil, version: String? = nil) {
|
||||
public init(canUninstall: Bool? = nil, configurationFileName: String? = nil, description: String? = nil, hasImage: Bool? = nil, id: String? = nil, name: String? = nil, status: PluginStatus? = nil, version: String? = nil) {
|
||||
self.canUninstall = canUninstall
|
||||
self.configurationFileName = configurationFileName
|
||||
self.description = description
|
||||
@ -44,7 +44,7 @@ public struct PluginInfo: Codable, Identifiable {
|
||||
self.configurationFileName = try values.decodeIfPresent(String.self, forKey: "ConfigurationFileName")
|
||||
self.description = try values.decodeIfPresent(String.self, forKey: "Description")
|
||||
self.hasImage = try values.decodeIfPresent(Bool.self, forKey: "HasImage")
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
self.status = try values.decodeIfPresent(PluginStatus.self, forKey: "Status")
|
||||
self.version = try values.decodeIfPresent(String.self, forKey: "Version")
|
||||
|
@ -11,15 +11,15 @@ import Foundation
|
||||
/// Class PreviousItemRequestDto.
|
||||
public struct PreviousItemRequestDto: Codable {
|
||||
/// Gets or sets the playing item identifier.
|
||||
public var playlistItemID: UUID?
|
||||
public var playlistItemID: String?
|
||||
|
||||
public init(playlistItemID: UUID? = nil) {
|
||||
public init(playlistItemID: String? = nil) {
|
||||
self.playlistItemID = playlistItemID
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.playlistItemID = try values.decodeIfPresent(UUID.self, forKey: "PlaylistItemId")
|
||||
self.playlistItemID = try values.decodeIfPresent(String.self, forKey: "PlaylistItemId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -9,17 +9,17 @@
|
||||
import Foundation
|
||||
|
||||
public struct QueueItem: Codable, Identifiable {
|
||||
public var id: UUID?
|
||||
public var id: String?
|
||||
public var playlistItemID: String?
|
||||
|
||||
public init(id: UUID? = nil, playlistItemID: String? = nil) {
|
||||
public init(id: String? = nil, playlistItemID: String? = nil) {
|
||||
self.id = id
|
||||
self.playlistItemID = playlistItemID
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.playlistItemID = try values.decodeIfPresent(String.self, forKey: "PlaylistItemId")
|
||||
}
|
||||
|
||||
|
@ -11,18 +11,18 @@ import Foundation
|
||||
/// Class QueueRequestDto.
|
||||
public struct QueueRequestDto: Codable {
|
||||
/// Gets or sets the items to enqueue.
|
||||
public var itemIDs: [UUID]?
|
||||
public var itemIDs: [String]?
|
||||
/// Enum GroupQueueMode.
|
||||
public var mode: GroupQueueMode?
|
||||
|
||||
public init(itemIDs: [UUID]? = nil, mode: GroupQueueMode? = nil) {
|
||||
public init(itemIDs: [String]? = nil, mode: GroupQueueMode? = nil) {
|
||||
self.itemIDs = itemIDs
|
||||
self.mode = mode
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.itemIDs = try values.decodeIfPresent([UUID].self, forKey: "ItemIds")
|
||||
self.itemIDs = try values.decodeIfPresent([String].self, forKey: "ItemIds")
|
||||
self.mode = try values.decodeIfPresent(GroupQueueMode.self, forKey: "Mode")
|
||||
}
|
||||
|
||||
|
@ -13,13 +13,13 @@ public struct ReadyRequestDto: Codable {
|
||||
/// Gets or sets a value indicating whether the client playback is unpaused.
|
||||
public var isPlaying: Bool?
|
||||
/// Gets or sets the playlist item identifier of the playing item.
|
||||
public var playlistItemID: UUID?
|
||||
public var playlistItemID: String?
|
||||
/// Gets or sets the position ticks.
|
||||
public var positionTicks: Int64?
|
||||
/// Gets or sets when the request has been made by the client.
|
||||
public var when: Date?
|
||||
|
||||
public init(isPlaying: Bool? = nil, playlistItemID: UUID? = nil, positionTicks: Int64? = nil, when: Date? = nil) {
|
||||
public init(isPlaying: Bool? = nil, playlistItemID: String? = nil, positionTicks: Int64? = nil, when: Date? = nil) {
|
||||
self.isPlaying = isPlaying
|
||||
self.playlistItemID = playlistItemID
|
||||
self.positionTicks = positionTicks
|
||||
@ -29,7 +29,7 @@ public struct ReadyRequestDto: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isPlaying = try values.decodeIfPresent(Bool.self, forKey: "IsPlaying")
|
||||
self.playlistItemID = try values.decodeIfPresent(UUID.self, forKey: "PlaylistItemId")
|
||||
self.playlistItemID = try values.decodeIfPresent(String.self, forKey: "PlaylistItemId")
|
||||
self.positionTicks = try values.decodeIfPresent(Int64.self, forKey: "PositionTicks")
|
||||
self.when = try values.decodeIfPresent(Date.self, forKey: "When")
|
||||
}
|
||||
|
@ -10,11 +10,11 @@ import Foundation
|
||||
|
||||
public struct RecommendationDto: Codable {
|
||||
public var baselineItemName: String?
|
||||
public var categoryID: UUID?
|
||||
public var categoryID: String?
|
||||
public var items: [BaseItemDto]?
|
||||
public var recommendationType: RecommendationType?
|
||||
|
||||
public init(baselineItemName: String? = nil, categoryID: UUID? = nil, items: [BaseItemDto]? = nil, recommendationType: RecommendationType? = nil) {
|
||||
public init(baselineItemName: String? = nil, categoryID: String? = nil, items: [BaseItemDto]? = nil, recommendationType: RecommendationType? = nil) {
|
||||
self.baselineItemName = baselineItemName
|
||||
self.categoryID = categoryID
|
||||
self.items = items
|
||||
@ -24,7 +24,7 @@ public struct RecommendationDto: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.baselineItemName = try values.decodeIfPresent(String.self, forKey: "BaselineItemName")
|
||||
self.categoryID = try values.decodeIfPresent(UUID.self, forKey: "CategoryId")
|
||||
self.categoryID = try values.decodeIfPresent(String.self, forKey: "CategoryId")
|
||||
self.items = try values.decodeIfPresent([BaseItemDto].self, forKey: "Items")
|
||||
self.recommendationType = try values.decodeIfPresent(RecommendationType.self, forKey: "RecommendationType")
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ public struct RemoveFromPlaylistRequestDto: Codable {
|
||||
/// Gets or sets a value indicating whether the entire playlist should be cleared.
|
||||
public var isClearPlaylist: Bool?
|
||||
/// Gets or sets the playlist identifiers ot the items. Ignored when clearing the playlist.
|
||||
public var playlistItemIDs: [UUID]?
|
||||
public var playlistItemIDs: [String]?
|
||||
|
||||
public init(isClearPlayingItem: Bool? = nil, isClearPlaylist: Bool? = nil, playlistItemIDs: [UUID]? = nil) {
|
||||
public init(isClearPlayingItem: Bool? = nil, isClearPlaylist: Bool? = nil, playlistItemIDs: [String]? = nil) {
|
||||
self.isClearPlayingItem = isClearPlayingItem
|
||||
self.isClearPlaylist = isClearPlaylist
|
||||
self.playlistItemIDs = playlistItemIDs
|
||||
@ -27,7 +27,7 @@ public struct RemoveFromPlaylistRequestDto: Codable {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isClearPlayingItem = try values.decodeIfPresent(Bool.self, forKey: "ClearPlayingItem")
|
||||
self.isClearPlaylist = try values.decodeIfPresent(Bool.self, forKey: "ClearPlaylist")
|
||||
self.playlistItemIDs = try values.decodeIfPresent([UUID].self, forKey: "PlaylistItemIds")
|
||||
self.playlistItemIDs = try values.decodeIfPresent([String].self, forKey: "PlaylistItemIds")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -14,7 +14,7 @@ public struct SearchHint: Codable, Identifiable {
|
||||
public var album: String?
|
||||
/// Gets or sets the album artist.
|
||||
public var albumArtist: String?
|
||||
public var albumID: UUID?
|
||||
public var albumID: String?
|
||||
/// Gets or sets the artists.
|
||||
public var artists: [String]?
|
||||
/// Gets or sets the backdrop image item identifier.
|
||||
@ -22,18 +22,18 @@ public struct SearchHint: Codable, Identifiable {
|
||||
/// Gets or sets the backdrop image tag.
|
||||
public var backdropImageTag: String?
|
||||
/// Gets or sets the channel identifier.
|
||||
public var channelID: UUID?
|
||||
public var channelID: String?
|
||||
/// Gets or sets the name of the channel.
|
||||
public var channelName: String?
|
||||
public var endDate: Date?
|
||||
/// Gets or sets the episode count.
|
||||
public var episodeCount: Int32?
|
||||
public var id: UUID?
|
||||
public var id: String?
|
||||
/// Gets or sets the index number.
|
||||
public var indexNumber: Int32?
|
||||
public var isFolder: Bool?
|
||||
/// Gets or sets the item id.
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
/// Gets or sets the matched term.
|
||||
public var matchedTerm: String?
|
||||
/// Gets or sets the type of the media.
|
||||
@ -63,7 +63,7 @@ public struct SearchHint: Codable, Identifiable {
|
||||
/// Gets or sets the type.
|
||||
public var type: String?
|
||||
|
||||
public init(album: String? = nil, albumArtist: String? = nil, albumID: UUID? = nil, artists: [String]? = nil, backdropImageItemID: String? = nil, backdropImageTag: String? = nil, channelID: UUID? = nil, channelName: String? = nil, endDate: Date? = nil, episodeCount: Int32? = nil, id: UUID? = nil, indexNumber: Int32? = nil, isFolder: Bool? = nil, itemID: UUID? = nil, matchedTerm: String? = nil, mediaType: String? = nil, name: String? = nil, parentIndexNumber: Int32? = nil, primaryImageAspectRatio: Double? = nil, primaryImageTag: String? = nil, productionYear: Int32? = nil, runTimeTicks: Int64? = nil, series: String? = nil, songCount: Int32? = nil, startDate: Date? = nil, status: String? = nil, thumbImageItemID: String? = nil, thumbImageTag: String? = nil, type: String? = nil) {
|
||||
public init(album: String? = nil, albumArtist: String? = nil, albumID: String? = nil, artists: [String]? = nil, backdropImageItemID: String? = nil, backdropImageTag: String? = nil, channelID: String? = nil, channelName: String? = nil, endDate: Date? = nil, episodeCount: Int32? = nil, id: String? = nil, indexNumber: Int32? = nil, isFolder: Bool? = nil, itemID: String? = nil, matchedTerm: String? = nil, mediaType: String? = nil, name: String? = nil, parentIndexNumber: Int32? = nil, primaryImageAspectRatio: Double? = nil, primaryImageTag: String? = nil, productionYear: Int32? = nil, runTimeTicks: Int64? = nil, series: String? = nil, songCount: Int32? = nil, startDate: Date? = nil, status: String? = nil, thumbImageItemID: String? = nil, thumbImageTag: String? = nil, type: String? = nil) {
|
||||
self.album = album
|
||||
self.albumArtist = albumArtist
|
||||
self.albumID = albumID
|
||||
@ -99,18 +99,18 @@ public struct SearchHint: Codable, Identifiable {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.album = try values.decodeIfPresent(String.self, forKey: "Album")
|
||||
self.albumArtist = try values.decodeIfPresent(String.self, forKey: "AlbumArtist")
|
||||
self.albumID = try values.decodeIfPresent(UUID.self, forKey: "AlbumId")
|
||||
self.albumID = try values.decodeIfPresent(String.self, forKey: "AlbumId")
|
||||
self.artists = try values.decodeIfPresent([String].self, forKey: "Artists")
|
||||
self.backdropImageItemID = try values.decodeIfPresent(String.self, forKey: "BackdropImageItemId")
|
||||
self.backdropImageTag = try values.decodeIfPresent(String.self, forKey: "BackdropImageTag")
|
||||
self.channelID = try values.decodeIfPresent(UUID.self, forKey: "ChannelId")
|
||||
self.channelID = try values.decodeIfPresent(String.self, forKey: "ChannelId")
|
||||
self.channelName = try values.decodeIfPresent(String.self, forKey: "ChannelName")
|
||||
self.endDate = try values.decodeIfPresent(Date.self, forKey: "EndDate")
|
||||
self.episodeCount = try values.decodeIfPresent(Int32.self, forKey: "EpisodeCount")
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.indexNumber = try values.decodeIfPresent(Int32.self, forKey: "IndexNumber")
|
||||
self.isFolder = try values.decodeIfPresent(Bool.self, forKey: "IsFolder")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.matchedTerm = try values.decodeIfPresent(String.self, forKey: "MatchedTerm")
|
||||
self.mediaType = try values.decodeIfPresent(String.self, forKey: "MediaType")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
|
@ -15,15 +15,15 @@ public struct SendCommand: Codable {
|
||||
/// Gets the UTC time when this command has been emitted.
|
||||
public var emittedAt: Date?
|
||||
/// Gets the group identifier.
|
||||
public var groupID: UUID?
|
||||
public var groupID: String?
|
||||
/// Gets the playlist identifier of the playing item.
|
||||
public var playlistItemID: UUID?
|
||||
public var playlistItemID: String?
|
||||
/// Gets the position ticks.
|
||||
public var positionTicks: Int64?
|
||||
/// Gets or sets the UTC time when to execute the command.
|
||||
public var when: Date?
|
||||
|
||||
public init(command: SendCommandType? = nil, emittedAt: Date? = nil, groupID: UUID? = nil, playlistItemID: UUID? = nil, positionTicks: Int64? = nil, when: Date? = nil) {
|
||||
public init(command: SendCommandType? = nil, emittedAt: Date? = nil, groupID: String? = nil, playlistItemID: String? = nil, positionTicks: Int64? = nil, when: Date? = nil) {
|
||||
self.command = command
|
||||
self.emittedAt = emittedAt
|
||||
self.groupID = groupID
|
||||
@ -36,8 +36,8 @@ public struct SendCommand: Codable {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.command = try values.decodeIfPresent(SendCommandType.self, forKey: "Command")
|
||||
self.emittedAt = try values.decodeIfPresent(Date.self, forKey: "EmittedAt")
|
||||
self.groupID = try values.decodeIfPresent(UUID.self, forKey: "GroupId")
|
||||
self.playlistItemID = try values.decodeIfPresent(UUID.self, forKey: "PlaylistItemId")
|
||||
self.groupID = try values.decodeIfPresent(String.self, forKey: "GroupId")
|
||||
self.playlistItemID = try values.decodeIfPresent(String.self, forKey: "PlaylistItemId")
|
||||
self.positionTicks = try values.decodeIfPresent(Int64.self, forKey: "PositionTicks")
|
||||
self.when = try values.decodeIfPresent(Date.self, forKey: "When")
|
||||
}
|
||||
|
@ -11,12 +11,12 @@ import Foundation
|
||||
public struct SeriesInfoRemoteSearchQuery: Codable {
|
||||
/// Gets or sets a value indicating whether disabled providers should be included.
|
||||
public var isIncludeDisabledProviders: Bool?
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
public var searchInfo: SeriesInfo?
|
||||
/// Gets or sets the provider name to search within if set.
|
||||
public var searchProviderName: String?
|
||||
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: UUID? = nil, searchInfo: SeriesInfo? = nil, searchProviderName: String? = nil) {
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: String? = nil, searchInfo: SeriesInfo? = nil, searchProviderName: String? = nil) {
|
||||
self.isIncludeDisabledProviders = isIncludeDisabledProviders
|
||||
self.itemID = itemID
|
||||
self.searchInfo = searchInfo
|
||||
@ -26,7 +26,7 @@ public struct SeriesInfoRemoteSearchQuery: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isIncludeDisabledProviders = try values.decodeIfPresent(Bool.self, forKey: "IncludeDisabledProviders")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.searchInfo = try values.decodeIfPresent(SeriesInfo.self, forKey: "SearchInfo")
|
||||
self.searchProviderName = try values.decodeIfPresent(String.self, forKey: "SearchProviderName")
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import Foundation
|
||||
/// Class SeriesTimerInfoDto.
|
||||
public struct SeriesTimerInfoDto: Codable, Identifiable {
|
||||
/// Gets or sets the channel id of the recording.
|
||||
public var channelID: UUID?
|
||||
public var channelID: String?
|
||||
/// Gets or sets the channel name of the recording.
|
||||
public var channelName: String?
|
||||
public var channelPrimaryImageTag: String?
|
||||
@ -76,7 +76,7 @@ public struct SeriesTimerInfoDto: Codable, Identifiable {
|
||||
public var startDate: Date?
|
||||
public var type: String?
|
||||
|
||||
public init(channelID: UUID? = nil, channelName: String? = nil, channelPrimaryImageTag: String? = nil, dayPattern: DayPattern? = nil, days: [DayOfWeek]? = nil, endDate: Date? = nil, externalChannelID: String? = nil, externalID: String? = nil, externalProgramID: String? = nil, id: String? = nil, imageTags: [String: String]? = nil, isPostPaddingRequired: Bool? = nil, isPrePaddingRequired: Bool? = nil, keepUntil: KeepUntil? = nil, keepUpTo: Int32? = nil, name: String? = nil, overview: String? = nil, parentBackdropImageTags: [String]? = nil, parentBackdropItemID: String? = nil, parentPrimaryImageItemID: String? = nil, parentPrimaryImageTag: String? = nil, parentThumbImageTag: String? = nil, parentThumbItemID: String? = nil, postPaddingSeconds: Int32? = nil, prePaddingSeconds: Int32? = nil, priority: Int32? = nil, programID: String? = nil, isRecordAnyChannel: Bool? = nil, isRecordAnyTime: Bool? = nil, isRecordNewOnly: Bool? = nil, serverID: String? = nil, serviceName: String? = nil, isSkipEpisodesInLibrary: Bool? = nil, startDate: Date? = nil, type: String? = nil) {
|
||||
public init(channelID: String? = nil, channelName: String? = nil, channelPrimaryImageTag: String? = nil, dayPattern: DayPattern? = nil, days: [DayOfWeek]? = nil, endDate: Date? = nil, externalChannelID: String? = nil, externalID: String? = nil, externalProgramID: String? = nil, id: String? = nil, imageTags: [String: String]? = nil, isPostPaddingRequired: Bool? = nil, isPrePaddingRequired: Bool? = nil, keepUntil: KeepUntil? = nil, keepUpTo: Int32? = nil, name: String? = nil, overview: String? = nil, parentBackdropImageTags: [String]? = nil, parentBackdropItemID: String? = nil, parentPrimaryImageItemID: String? = nil, parentPrimaryImageTag: String? = nil, parentThumbImageTag: String? = nil, parentThumbItemID: String? = nil, postPaddingSeconds: Int32? = nil, prePaddingSeconds: Int32? = nil, priority: Int32? = nil, programID: String? = nil, isRecordAnyChannel: Bool? = nil, isRecordAnyTime: Bool? = nil, isRecordNewOnly: Bool? = nil, serverID: String? = nil, serviceName: String? = nil, isSkipEpisodesInLibrary: Bool? = nil, startDate: Date? = nil, type: String? = nil) {
|
||||
self.channelID = channelID
|
||||
self.channelName = channelName
|
||||
self.channelPrimaryImageTag = channelPrimaryImageTag
|
||||
@ -116,7 +116,7 @@ public struct SeriesTimerInfoDto: Codable, Identifiable {
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.channelID = try values.decodeIfPresent(UUID.self, forKey: "ChannelId")
|
||||
self.channelID = try values.decodeIfPresent(String.self, forKey: "ChannelId")
|
||||
self.channelName = try values.decodeIfPresent(String.self, forKey: "ChannelName")
|
||||
self.channelPrimaryImageTag = try values.decodeIfPresent(String.self, forKey: "ChannelPrimaryImageTag")
|
||||
self.dayPattern = try values.decodeIfPresent(DayPattern.self, forKey: "DayPattern")
|
||||
|
@ -29,10 +29,6 @@ public struct SessionInfo: Codable, Identifiable {
|
||||
public var id: String?
|
||||
/// Gets a value indicating whether this instance is active.
|
||||
public var isActive: Bool?
|
||||
/// Gets or sets the last activity date.
|
||||
public var lastActivityDate: Date?
|
||||
/// Gets or sets the last playback check in.
|
||||
public var lastPlaybackCheckIn: Date?
|
||||
/// This is strictly used as a data transfer object from the api layer.
|
||||
///
|
||||
/// This holds information about a BaseItem in a format that is convenient for the client.
|
||||
@ -56,12 +52,12 @@ public struct SessionInfo: Codable, Identifiable {
|
||||
public var isSupportsRemoteControl: Bool?
|
||||
public var transcodingInfo: TranscodingInfo?
|
||||
/// Gets or sets the user id.
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
/// Gets or sets the username.
|
||||
public var userName: String?
|
||||
public var userPrimaryImageTag: String?
|
||||
|
||||
public init(additionalUsers: [SessionUserInfo]? = nil, applicationVersion: String? = nil, capabilities: ClientCapabilities? = nil, client: String? = nil, deviceID: String? = nil, deviceName: String? = nil, deviceType: String? = nil, fullNowPlayingItem: BaseItem? = nil, hasCustomDeviceName: Bool? = nil, id: String? = nil, isActive: Bool? = nil, lastActivityDate: Date? = nil, lastPlaybackCheckIn: Date? = nil, nowPlayingItem: BaseItemDto? = nil, nowPlayingQueue: [QueueItem]? = nil, nowPlayingQueueFullItems: [BaseItemDto]? = nil, nowViewingItem: BaseItemDto? = nil, playState: PlayerStateInfo? = nil, playableMediaTypes: [String]? = nil, playlistItemID: String? = nil, remoteEndPoint: String? = nil, serverID: String? = nil, supportedCommands: [GeneralCommandType]? = nil, isSupportsMediaControl: Bool? = nil, isSupportsRemoteControl: Bool? = nil, transcodingInfo: TranscodingInfo? = nil, userID: UUID? = nil, userName: String? = nil, userPrimaryImageTag: String? = nil) {
|
||||
public init(additionalUsers: [SessionUserInfo]? = nil, applicationVersion: String? = nil, capabilities: ClientCapabilities? = nil, client: String? = nil, deviceID: String? = nil, deviceName: String? = nil, deviceType: String? = nil, fullNowPlayingItem: BaseItem? = nil, hasCustomDeviceName: Bool? = nil, id: String? = nil, isActive: Bool? = nil, nowPlayingItem: BaseItemDto? = nil, nowPlayingQueue: [QueueItem]? = nil, nowPlayingQueueFullItems: [BaseItemDto]? = nil, nowViewingItem: BaseItemDto? = nil, playState: PlayerStateInfo? = nil, playableMediaTypes: [String]? = nil, playlistItemID: String? = nil, remoteEndPoint: String? = nil, serverID: String? = nil, supportedCommands: [GeneralCommandType]? = nil, isSupportsMediaControl: Bool? = nil, isSupportsRemoteControl: Bool? = nil, transcodingInfo: TranscodingInfo? = nil, userID: String? = nil, userName: String? = nil, userPrimaryImageTag: String? = nil) {
|
||||
self.additionalUsers = additionalUsers
|
||||
self.applicationVersion = applicationVersion
|
||||
self.capabilities = capabilities
|
||||
@ -73,8 +69,6 @@ public struct SessionInfo: Codable, Identifiable {
|
||||
self.hasCustomDeviceName = hasCustomDeviceName
|
||||
self.id = id
|
||||
self.isActive = isActive
|
||||
self.lastActivityDate = lastActivityDate
|
||||
self.lastPlaybackCheckIn = lastPlaybackCheckIn
|
||||
self.nowPlayingItem = nowPlayingItem
|
||||
self.nowPlayingQueue = nowPlayingQueue
|
||||
self.nowPlayingQueueFullItems = nowPlayingQueueFullItems
|
||||
@ -106,8 +100,6 @@ public struct SessionInfo: Codable, Identifiable {
|
||||
self.hasCustomDeviceName = try values.decodeIfPresent(Bool.self, forKey: "HasCustomDeviceName")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.isActive = try values.decodeIfPresent(Bool.self, forKey: "IsActive")
|
||||
self.lastActivityDate = try values.decodeIfPresent(Date.self, forKey: "LastActivityDate")
|
||||
self.lastPlaybackCheckIn = try values.decodeIfPresent(Date.self, forKey: "LastPlaybackCheckIn")
|
||||
self.nowPlayingItem = try values.decodeIfPresent(BaseItemDto.self, forKey: "NowPlayingItem")
|
||||
self.nowPlayingQueue = try values.decodeIfPresent([QueueItem].self, forKey: "NowPlayingQueue")
|
||||
self.nowPlayingQueueFullItems = try values.decodeIfPresent([BaseItemDto].self, forKey: "NowPlayingQueueFullItems")
|
||||
@ -121,7 +113,7 @@ public struct SessionInfo: Codable, Identifiable {
|
||||
self.isSupportsMediaControl = try values.decodeIfPresent(Bool.self, forKey: "SupportsMediaControl")
|
||||
self.isSupportsRemoteControl = try values.decodeIfPresent(Bool.self, forKey: "SupportsRemoteControl")
|
||||
self.transcodingInfo = try values.decodeIfPresent(TranscodingInfo.self, forKey: "TranscodingInfo")
|
||||
self.userID = try values.decodeIfPresent(UUID.self, forKey: "UserId")
|
||||
self.userID = try values.decodeIfPresent(String.self, forKey: "UserId")
|
||||
self.userName = try values.decodeIfPresent(String.self, forKey: "UserName")
|
||||
self.userPrimaryImageTag = try values.decodeIfPresent(String.self, forKey: "UserPrimaryImageTag")
|
||||
}
|
||||
@ -139,8 +131,6 @@ public struct SessionInfo: Codable, Identifiable {
|
||||
try values.encodeIfPresent(hasCustomDeviceName, forKey: "HasCustomDeviceName")
|
||||
try values.encodeIfPresent(id, forKey: "Id")
|
||||
try values.encodeIfPresent(isActive, forKey: "IsActive")
|
||||
try values.encodeIfPresent(lastActivityDate, forKey: "LastActivityDate")
|
||||
try values.encodeIfPresent(lastPlaybackCheckIn, forKey: "LastPlaybackCheckIn")
|
||||
try values.encodeIfPresent(nowPlayingItem, forKey: "NowPlayingItem")
|
||||
try values.encodeIfPresent(nowPlayingQueue, forKey: "NowPlayingQueue")
|
||||
try values.encodeIfPresent(nowPlayingQueueFullItems, forKey: "NowPlayingQueueFullItems")
|
||||
|
@ -11,18 +11,18 @@ import Foundation
|
||||
/// Class SessionUserInfo.
|
||||
public struct SessionUserInfo: Codable {
|
||||
/// Gets or sets the user identifier.
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
/// Gets or sets the name of the user.
|
||||
public var userName: String?
|
||||
|
||||
public init(userID: UUID? = nil, userName: String? = nil) {
|
||||
public init(userID: String? = nil, userName: String? = nil) {
|
||||
self.userID = userID
|
||||
self.userName = userName
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.userID = try values.decodeIfPresent(UUID.self, forKey: "UserId")
|
||||
self.userID = try values.decodeIfPresent(String.self, forKey: "UserId")
|
||||
self.userName = try values.decodeIfPresent(String.self, forKey: "UserName")
|
||||
}
|
||||
|
||||
|
@ -11,15 +11,15 @@ import Foundation
|
||||
/// Class SetPlaylistItemRequestDto.
|
||||
public struct SetPlaylistItemRequestDto: Codable {
|
||||
/// Gets or sets the playlist identifier of the playing item.
|
||||
public var playlistItemID: UUID?
|
||||
public var playlistItemID: String?
|
||||
|
||||
public init(playlistItemID: UUID? = nil) {
|
||||
public init(playlistItemID: String? = nil) {
|
||||
self.playlistItemID = playlistItemID
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.playlistItemID = try values.decodeIfPresent(UUID.self, forKey: "PlaylistItemId")
|
||||
self.playlistItemID = try values.decodeIfPresent(String.self, forKey: "PlaylistItemId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -13,13 +13,13 @@ public struct ThemeMediaResult: Codable {
|
||||
/// Gets or sets the items.
|
||||
public var items: [BaseItemDto]?
|
||||
/// Gets or sets the owner id.
|
||||
public var ownerID: UUID?
|
||||
public var ownerID: String?
|
||||
/// Gets or sets the index of the first record in Items.
|
||||
public var startIndex: Int32?
|
||||
/// Gets or sets the total number of records available.
|
||||
public var totalRecordCount: Int32?
|
||||
|
||||
public init(items: [BaseItemDto]? = nil, ownerID: UUID? = nil, startIndex: Int32? = nil, totalRecordCount: Int32? = nil) {
|
||||
public init(items: [BaseItemDto]? = nil, ownerID: String? = nil, startIndex: Int32? = nil, totalRecordCount: Int32? = nil) {
|
||||
self.items = items
|
||||
self.ownerID = ownerID
|
||||
self.startIndex = startIndex
|
||||
@ -29,7 +29,7 @@ public struct ThemeMediaResult: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.items = try values.decodeIfPresent([BaseItemDto].self, forKey: "Items")
|
||||
self.ownerID = try values.decodeIfPresent(UUID.self, forKey: "OwnerId")
|
||||
self.ownerID = try values.decodeIfPresent(String.self, forKey: "OwnerId")
|
||||
self.startIndex = try values.decodeIfPresent(Int32.self, forKey: "StartIndex")
|
||||
self.totalRecordCount = try values.decodeIfPresent(Int32.self, forKey: "TotalRecordCount")
|
||||
}
|
||||
|
@ -10,9 +10,9 @@ import Foundation
|
||||
|
||||
public struct TimerEventInfo: Codable, Identifiable {
|
||||
public var id: String?
|
||||
public var programID: UUID?
|
||||
public var programID: String?
|
||||
|
||||
public init(id: String? = nil, programID: UUID? = nil) {
|
||||
public init(id: String? = nil, programID: String? = nil) {
|
||||
self.id = id
|
||||
self.programID = programID
|
||||
}
|
||||
@ -20,7 +20,7 @@ public struct TimerEventInfo: Codable, Identifiable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.programID = try values.decodeIfPresent(UUID.self, forKey: "ProgramId")
|
||||
self.programID = try values.decodeIfPresent(String.self, forKey: "ProgramId")
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
public struct TimerInfoDto: Codable, Identifiable {
|
||||
/// Gets or sets the channel id of the recording.
|
||||
public var channelID: UUID?
|
||||
public var channelID: String?
|
||||
/// Gets or sets the channel name of the recording.
|
||||
public var channelName: String?
|
||||
public var channelPrimaryImageTag: String?
|
||||
@ -63,7 +63,7 @@ public struct TimerInfoDto: Codable, Identifiable {
|
||||
public var status: RecordingStatus?
|
||||
public var type: String?
|
||||
|
||||
public init(channelID: UUID? = nil, channelName: String? = nil, channelPrimaryImageTag: String? = nil, endDate: Date? = nil, externalChannelID: String? = nil, externalID: String? = nil, externalProgramID: String? = nil, externalSeriesTimerID: String? = nil, id: String? = nil, isPostPaddingRequired: Bool? = nil, isPrePaddingRequired: Bool? = nil, keepUntil: KeepUntil? = nil, name: String? = nil, overview: String? = nil, parentBackdropImageTags: [String]? = nil, parentBackdropItemID: String? = nil, postPaddingSeconds: Int32? = nil, prePaddingSeconds: Int32? = nil, priority: Int32? = nil, programID: String? = nil, programInfo: BaseItemDto? = nil, runTimeTicks: Int64? = nil, seriesTimerID: String? = nil, serverID: String? = nil, serviceName: String? = nil, startDate: Date? = nil, status: RecordingStatus? = nil, type: String? = nil) {
|
||||
public init(channelID: String? = nil, channelName: String? = nil, channelPrimaryImageTag: String? = nil, endDate: Date? = nil, externalChannelID: String? = nil, externalID: String? = nil, externalProgramID: String? = nil, externalSeriesTimerID: String? = nil, id: String? = nil, isPostPaddingRequired: Bool? = nil, isPrePaddingRequired: Bool? = nil, keepUntil: KeepUntil? = nil, name: String? = nil, overview: String? = nil, parentBackdropImageTags: [String]? = nil, parentBackdropItemID: String? = nil, postPaddingSeconds: Int32? = nil, prePaddingSeconds: Int32? = nil, priority: Int32? = nil, programID: String? = nil, programInfo: BaseItemDto? = nil, runTimeTicks: Int64? = nil, seriesTimerID: String? = nil, serverID: String? = nil, serviceName: String? = nil, startDate: Date? = nil, status: RecordingStatus? = nil, type: String? = nil) {
|
||||
self.channelID = channelID
|
||||
self.channelName = channelName
|
||||
self.channelPrimaryImageTag = channelPrimaryImageTag
|
||||
@ -96,7 +96,7 @@ public struct TimerInfoDto: Codable, Identifiable {
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.channelID = try values.decodeIfPresent(UUID.self, forKey: "ChannelId")
|
||||
self.channelID = try values.decodeIfPresent(String.self, forKey: "ChannelId")
|
||||
self.channelName = try values.decodeIfPresent(String.self, forKey: "ChannelName")
|
||||
self.channelPrimaryImageTag = try values.decodeIfPresent(String.self, forKey: "ChannelPrimaryImageTag")
|
||||
self.endDate = try values.decodeIfPresent(Date.self, forKey: "EndDate")
|
||||
|
@ -11,12 +11,12 @@ import Foundation
|
||||
public struct TrailerInfoRemoteSearchQuery: Codable {
|
||||
/// Gets or sets a value indicating whether disabled providers should be included.
|
||||
public var isIncludeDisabledProviders: Bool?
|
||||
public var itemID: UUID?
|
||||
public var itemID: String?
|
||||
public var searchInfo: TrailerInfo?
|
||||
/// Gets or sets the provider name to search within if set.
|
||||
public var searchProviderName: String?
|
||||
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: UUID? = nil, searchInfo: TrailerInfo? = nil, searchProviderName: String? = nil) {
|
||||
public init(isIncludeDisabledProviders: Bool? = nil, itemID: String? = nil, searchInfo: TrailerInfo? = nil, searchProviderName: String? = nil) {
|
||||
self.isIncludeDisabledProviders = isIncludeDisabledProviders
|
||||
self.itemID = itemID
|
||||
self.searchInfo = searchInfo
|
||||
@ -26,7 +26,7 @@ public struct TrailerInfoRemoteSearchQuery: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.isIncludeDisabledProviders = try values.decodeIfPresent(Bool.self, forKey: "IncludeDisabledProviders")
|
||||
self.itemID = try values.decodeIfPresent(UUID.self, forKey: "ItemId")
|
||||
self.itemID = try values.decodeIfPresent(String.self, forKey: "ItemId")
|
||||
self.searchInfo = try values.decodeIfPresent(TrailerInfo.self, forKey: "SearchInfo")
|
||||
self.searchProviderName = try values.decodeIfPresent(String.self, forKey: "SearchProviderName")
|
||||
}
|
||||
|
@ -11,18 +11,18 @@ import Foundation
|
||||
/// Update library options dto.
|
||||
public struct UpdateLibraryOptionsDto: Codable, Identifiable {
|
||||
/// Gets or sets the library item id.
|
||||
public var id: UUID?
|
||||
public var id: String?
|
||||
/// Gets or sets library options.
|
||||
public var libraryOptions: LibraryOptions?
|
||||
|
||||
public init(id: UUID? = nil, libraryOptions: LibraryOptions? = nil) {
|
||||
public init(id: String? = nil, libraryOptions: LibraryOptions? = nil) {
|
||||
self.id = id
|
||||
self.libraryOptions = libraryOptions
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.libraryOptions = try values.decodeIfPresent(LibraryOptions.self, forKey: "LibraryOptions")
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,7 @@ public struct UserDto: Codable, Identifiable {
|
||||
/// Gets or sets a value indicating whether this instance has password.
|
||||
public var hasPassword: Bool?
|
||||
/// Gets or sets the id.
|
||||
public var id: UUID?
|
||||
/// Gets or sets the last activity date.
|
||||
public var lastActivityDate: Date?
|
||||
/// Gets or sets the last login date.
|
||||
public var lastLoginDate: Date?
|
||||
public var id: String?
|
||||
/// Gets or sets the name.
|
||||
public var name: String?
|
||||
/// Gets or sets the policy.
|
||||
@ -41,15 +37,13 @@ public struct UserDto: Codable, Identifiable {
|
||||
/// This is not used by the server and is for client-side usage only.
|
||||
public var serverName: String?
|
||||
|
||||
public init(configuration: UserConfiguration? = nil, enableAutoLogin: Bool? = nil, hasConfiguredEasyPassword: Bool? = nil, hasConfiguredPassword: Bool? = nil, hasPassword: Bool? = nil, id: UUID? = nil, lastActivityDate: Date? = nil, lastLoginDate: Date? = nil, name: String? = nil, policy: UserPolicy? = nil, primaryImageAspectRatio: Double? = nil, primaryImageTag: String? = nil, serverID: String? = nil, serverName: String? = nil) {
|
||||
public init(configuration: UserConfiguration? = nil, enableAutoLogin: Bool? = nil, hasConfiguredEasyPassword: Bool? = nil, hasConfiguredPassword: Bool? = nil, hasPassword: Bool? = nil, id: String? = nil, name: String? = nil, policy: UserPolicy? = nil, primaryImageAspectRatio: Double? = nil, primaryImageTag: String? = nil, serverID: String? = nil, serverName: String? = nil) {
|
||||
self.configuration = configuration
|
||||
self.enableAutoLogin = enableAutoLogin
|
||||
self.hasConfiguredEasyPassword = hasConfiguredEasyPassword
|
||||
self.hasConfiguredPassword = hasConfiguredPassword
|
||||
self.hasPassword = hasPassword
|
||||
self.id = id
|
||||
self.lastActivityDate = lastActivityDate
|
||||
self.lastLoginDate = lastLoginDate
|
||||
self.name = name
|
||||
self.policy = policy
|
||||
self.primaryImageAspectRatio = primaryImageAspectRatio
|
||||
@ -65,9 +59,7 @@ public struct UserDto: Codable, Identifiable {
|
||||
self.hasConfiguredEasyPassword = try values.decodeIfPresent(Bool.self, forKey: "HasConfiguredEasyPassword")
|
||||
self.hasConfiguredPassword = try values.decodeIfPresent(Bool.self, forKey: "HasConfiguredPassword")
|
||||
self.hasPassword = try values.decodeIfPresent(Bool.self, forKey: "HasPassword")
|
||||
self.id = try values.decodeIfPresent(UUID.self, forKey: "Id")
|
||||
self.lastActivityDate = try values.decodeIfPresent(Date.self, forKey: "LastActivityDate")
|
||||
self.lastLoginDate = try values.decodeIfPresent(Date.self, forKey: "LastLoginDate")
|
||||
self.id = try values.decodeIfPresent(String.self, forKey: "Id")
|
||||
self.name = try values.decodeIfPresent(String.self, forKey: "Name")
|
||||
self.policy = try values.decodeIfPresent(UserPolicy.self, forKey: "Policy")
|
||||
self.primaryImageAspectRatio = try values.decodeIfPresent(Double.self, forKey: "PrimaryImageAspectRatio")
|
||||
@ -84,8 +76,6 @@ public struct UserDto: Codable, Identifiable {
|
||||
try values.encodeIfPresent(hasConfiguredPassword, forKey: "HasConfiguredPassword")
|
||||
try values.encodeIfPresent(hasPassword, forKey: "HasPassword")
|
||||
try values.encodeIfPresent(id, forKey: "Id")
|
||||
try values.encodeIfPresent(lastActivityDate, forKey: "LastActivityDate")
|
||||
try values.encodeIfPresent(lastLoginDate, forKey: "LastLoginDate")
|
||||
try values.encodeIfPresent(name, forKey: "Name")
|
||||
try values.encodeIfPresent(policy, forKey: "Policy")
|
||||
try values.encodeIfPresent(primaryImageAspectRatio, forKey: "PrimaryImageAspectRatio")
|
||||
|
@ -12,8 +12,8 @@ public struct UserPolicy: Codable {
|
||||
public var accessSchedules: [AccessSchedule]?
|
||||
public var authenticationProviderID: String?
|
||||
public var blockUnratedItems: [UnratedItem]?
|
||||
public var blockedChannels: [UUID]?
|
||||
public var blockedMediaFolders: [UUID]?
|
||||
public var blockedChannels: [String]?
|
||||
public var blockedMediaFolders: [String]?
|
||||
public var blockedTags: [String]?
|
||||
public var enableAllChannels: Bool?
|
||||
public var enableAllDevices: Bool?
|
||||
@ -35,9 +35,9 @@ public struct UserPolicy: Codable {
|
||||
public var enableSyncTranscoding: Bool?
|
||||
public var enableUserPreferenceAccess: Bool?
|
||||
public var enableVideoPlaybackTranscoding: Bool?
|
||||
public var enabledChannels: [UUID]?
|
||||
public var enabledChannels: [String]?
|
||||
public var enabledDevices: [String]?
|
||||
public var enabledFolders: [UUID]?
|
||||
public var enabledFolders: [String]?
|
||||
public var isForceRemoteSourceTranscoding: Bool?
|
||||
public var invalidLoginAttemptCount: Int32?
|
||||
/// Gets or sets a value indicating whether this instance is administrator.
|
||||
@ -55,7 +55,7 @@ public struct UserPolicy: Codable {
|
||||
/// Gets or sets a value indicating what SyncPlay features the user can access.
|
||||
public var syncPlayAccess: SyncPlayUserAccessType?
|
||||
|
||||
public init(accessSchedules: [AccessSchedule]? = nil, authenticationProviderID: String? = nil, blockUnratedItems: [UnratedItem]? = nil, blockedChannels: [UUID]? = nil, blockedMediaFolders: [UUID]? = nil, blockedTags: [String]? = nil, enableAllChannels: Bool? = nil, enableAllDevices: Bool? = nil, enableAllFolders: Bool? = nil, enableAudioPlaybackTranscoding: Bool? = nil, enableContentDeletion: Bool? = nil, enableContentDeletionFromFolders: [String]? = nil, enableContentDownloading: Bool? = nil, enableLiveTvAccess: Bool? = nil, enableLiveTvManagement: Bool? = nil, enableMediaConversion: Bool? = nil, enableMediaPlayback: Bool? = nil, enablePlaybackRemuxing: Bool? = nil, enablePublicSharing: Bool? = nil, enableRemoteAccess: Bool? = nil, enableRemoteControlOfOtherUsers: Bool? = nil, enableSharedDeviceControl: Bool? = nil, enableSyncTranscoding: Bool? = nil, enableUserPreferenceAccess: Bool? = nil, enableVideoPlaybackTranscoding: Bool? = nil, enabledChannels: [UUID]? = nil, enabledDevices: [String]? = nil, enabledFolders: [UUID]? = nil, isForceRemoteSourceTranscoding: Bool? = nil, invalidLoginAttemptCount: Int32? = nil, isAdministrator: Bool? = nil, isDisabled: Bool? = nil, isHidden: Bool? = nil, loginAttemptsBeforeLockout: Int32? = nil, maxActiveSessions: Int32? = nil, maxParentalRating: Int32? = nil, passwordResetProviderID: String? = nil, remoteClientBitrateLimit: Int32? = nil, syncPlayAccess: SyncPlayUserAccessType? = nil) {
|
||||
public init(accessSchedules: [AccessSchedule]? = nil, authenticationProviderID: String? = nil, blockUnratedItems: [UnratedItem]? = nil, blockedChannels: [String]? = nil, blockedMediaFolders: [String]? = nil, blockedTags: [String]? = nil, enableAllChannels: Bool? = nil, enableAllDevices: Bool? = nil, enableAllFolders: Bool? = nil, enableAudioPlaybackTranscoding: Bool? = nil, enableContentDeletion: Bool? = nil, enableContentDeletionFromFolders: [String]? = nil, enableContentDownloading: Bool? = nil, enableLiveTvAccess: Bool? = nil, enableLiveTvManagement: Bool? = nil, enableMediaConversion: Bool? = nil, enableMediaPlayback: Bool? = nil, enablePlaybackRemuxing: Bool? = nil, enablePublicSharing: Bool? = nil, enableRemoteAccess: Bool? = nil, enableRemoteControlOfOtherUsers: Bool? = nil, enableSharedDeviceControl: Bool? = nil, enableSyncTranscoding: Bool? = nil, enableUserPreferenceAccess: Bool? = nil, enableVideoPlaybackTranscoding: Bool? = nil, enabledChannels: [String]? = nil, enabledDevices: [String]? = nil, enabledFolders: [String]? = nil, isForceRemoteSourceTranscoding: Bool? = nil, invalidLoginAttemptCount: Int32? = nil, isAdministrator: Bool? = nil, isDisabled: Bool? = nil, isHidden: Bool? = nil, loginAttemptsBeforeLockout: Int32? = nil, maxActiveSessions: Int32? = nil, maxParentalRating: Int32? = nil, passwordResetProviderID: String? = nil, remoteClientBitrateLimit: Int32? = nil, syncPlayAccess: SyncPlayUserAccessType? = nil) {
|
||||
self.accessSchedules = accessSchedules
|
||||
self.authenticationProviderID = authenticationProviderID
|
||||
self.blockUnratedItems = blockUnratedItems
|
||||
@ -102,8 +102,8 @@ public struct UserPolicy: Codable {
|
||||
self.accessSchedules = try values.decodeIfPresent([AccessSchedule].self, forKey: "AccessSchedules")
|
||||
self.authenticationProviderID = try values.decodeIfPresent(String.self, forKey: "AuthenticationProviderId")
|
||||
self.blockUnratedItems = try values.decodeIfPresent([UnratedItem].self, forKey: "BlockUnratedItems")
|
||||
self.blockedChannels = try values.decodeIfPresent([UUID].self, forKey: "BlockedChannels")
|
||||
self.blockedMediaFolders = try values.decodeIfPresent([UUID].self, forKey: "BlockedMediaFolders")
|
||||
self.blockedChannels = try values.decodeIfPresent([String].self, forKey: "BlockedChannels")
|
||||
self.blockedMediaFolders = try values.decodeIfPresent([String].self, forKey: "BlockedMediaFolders")
|
||||
self.blockedTags = try values.decodeIfPresent([String].self, forKey: "BlockedTags")
|
||||
self.enableAllChannels = try values.decodeIfPresent(Bool.self, forKey: "EnableAllChannels")
|
||||
self.enableAllDevices = try values.decodeIfPresent(Bool.self, forKey: "EnableAllDevices")
|
||||
@ -124,9 +124,9 @@ public struct UserPolicy: Codable {
|
||||
self.enableSyncTranscoding = try values.decodeIfPresent(Bool.self, forKey: "EnableSyncTranscoding")
|
||||
self.enableUserPreferenceAccess = try values.decodeIfPresent(Bool.self, forKey: "EnableUserPreferenceAccess")
|
||||
self.enableVideoPlaybackTranscoding = try values.decodeIfPresent(Bool.self, forKey: "EnableVideoPlaybackTranscoding")
|
||||
self.enabledChannels = try values.decodeIfPresent([UUID].self, forKey: "EnabledChannels")
|
||||
self.enabledChannels = try values.decodeIfPresent([String].self, forKey: "EnabledChannels")
|
||||
self.enabledDevices = try values.decodeIfPresent([String].self, forKey: "EnabledDevices")
|
||||
self.enabledFolders = try values.decodeIfPresent([UUID].self, forKey: "EnabledFolders")
|
||||
self.enabledFolders = try values.decodeIfPresent([String].self, forKey: "EnabledFolders")
|
||||
self.isForceRemoteSourceTranscoding = try values.decodeIfPresent(Bool.self, forKey: "ForceRemoteSourceTranscoding")
|
||||
self.invalidLoginAttemptCount = try values.decodeIfPresent(Int32.self, forKey: "InvalidLoginAttemptCount")
|
||||
self.isAdministrator = try values.decodeIfPresent(Bool.self, forKey: "IsAdministrator")
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Adds items to a collection.
|
||||
static public func addToCollection(collectionID: String, ids: [UUID]) -> Request<Void> {
|
||||
static public func addToCollection(collectionID: String, ids: [String]) -> Request<Void> {
|
||||
Request(method: "POST", url: "/Collections/\(collectionID)/Items", query: makeAddToCollectionQuery(ids), id: "AddToCollection")
|
||||
}
|
||||
|
||||
private static func makeAddToCollectionQuery(_ ids: [UUID]) -> [(String, String?)] {
|
||||
private static func makeAddToCollectionQuery(_ ids: [String]) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(ids, forKey: "ids")
|
||||
return encoder.items
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Adds items to a playlist.
|
||||
static public func addToPlaylist(playlistID: String, ids: [UUID]? = nil, userID: UUID? = nil) -> Request<Void> {
|
||||
static public func addToPlaylist(playlistID: String, ids: [String]? = nil, userID: String? = nil) -> Request<Void> {
|
||||
Request(method: "POST", url: "/Playlists/\(playlistID)/Items", query: makeAddToPlaylistQuery(ids, userID), id: "AddToPlaylist")
|
||||
}
|
||||
|
||||
private static func makeAddToPlaylistQuery(_ ids: [UUID]?, _ userID: UUID?) -> [(String, String?)] {
|
||||
private static func makeAddToPlaylistQuery(_ ids: [String]?, _ userID: String?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(ids, forKey: "ids")
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
|
@ -19,10 +19,10 @@ extension Paths {
|
||||
public struct CreateCollectionParameters {
|
||||
public var name: String?
|
||||
public var ids: [String]?
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
public var isLocked: Bool?
|
||||
|
||||
public init(name: String? = nil, ids: [String]? = nil, parentID: UUID? = nil, isLocked: Bool? = nil) {
|
||||
public init(name: String? = nil, ids: [String]? = nil, parentID: String? = nil, isLocked: Bool? = nil) {
|
||||
self.name = name
|
||||
self.ids = ids
|
||||
self.parentID = parentID
|
||||
|
@ -22,11 +22,11 @@ extension Paths {
|
||||
|
||||
public struct CreatePlaylistParameters {
|
||||
public var name: String?
|
||||
public var ids: [UUID]?
|
||||
public var userID: UUID?
|
||||
public var ids: [String]?
|
||||
public var userID: String?
|
||||
public var mediaType: String?
|
||||
|
||||
public init(name: String? = nil, ids: [UUID]? = nil, userID: UUID? = nil, mediaType: String? = nil) {
|
||||
public init(name: String? = nil, ids: [String]? = nil, userID: String? = nil, mediaType: String? = nil) {
|
||||
self.name = name
|
||||
self.ids = ids
|
||||
self.userID = userID
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Deletes items from the library and filesystem.
|
||||
static public func deleteItems(ids: [UUID]? = nil) -> Request<Void> {
|
||||
static public func deleteItems(ids: [String]? = nil) -> Request<Void> {
|
||||
Request(method: "DELETE", url: "/Items", query: makeDeleteItemsQuery(ids), id: "DeleteItems")
|
||||
}
|
||||
|
||||
private static func makeDeleteItemsQuery(_ ids: [UUID]?) -> [(String, String?)] {
|
||||
private static func makeDeleteItemsQuery(_ ids: [String]?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(ids, forKey: "ids")
|
||||
return encoder.items
|
||||
|
@ -19,12 +19,12 @@ extension Paths {
|
||||
public struct GetParameters {
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var searchTerm: String
|
||||
public var includeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var excludeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var mediaTypes: [String]?
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
public var isMovie: Bool?
|
||||
public var isSeries: Bool?
|
||||
public var isNews: Bool?
|
||||
@ -36,7 +36,7 @@ extension Paths {
|
||||
public var isIncludeStudios: Bool?
|
||||
public var isIncludeArtists: Bool?
|
||||
|
||||
public init(startIndex: Int32? = nil, limit: Int32? = nil, userID: UUID? = nil, searchTerm: String, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, mediaTypes: [String]? = nil, parentID: UUID? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, isIncludePeople: Bool? = nil, isIncludeMedia: Bool? = nil, isIncludeGenres: Bool? = nil, isIncludeStudios: Bool? = nil, isIncludeArtists: Bool? = nil) {
|
||||
public init(startIndex: Int32? = nil, limit: Int32? = nil, userID: String? = nil, searchTerm: String, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, mediaTypes: [String]? = nil, parentID: String? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, isIncludePeople: Bool? = nil, isIncludeMedia: Bool? = nil, isIncludeGenres: Bool? = nil, isIncludeStudios: Bool? = nil, isIncludeArtists: Bool? = nil) {
|
||||
self.startIndex = startIndex
|
||||
self.limit = limit
|
||||
self.userID = userID
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Gets additional parts for a video.
|
||||
static public func getAdditionalPart(itemID: String, userID: UUID? = nil) -> Request<JellyfinAPI.BaseItemDtoQueryResult> {
|
||||
static public func getAdditionalPart(itemID: String, userID: String? = nil) -> Request<JellyfinAPI.BaseItemDtoQueryResult> {
|
||||
Request(method: "GET", url: "/Videos/\(itemID)/AdditionalParts", query: makeGetAdditionalPartQuery(userID), id: "GetAdditionalPart")
|
||||
}
|
||||
|
||||
private static func makeGetAdditionalPartQuery(_ userID: UUID?) -> [(String, String?)] {
|
||||
private static func makeGetAdditionalPartQuery(_ userID: String?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
return encoder.items
|
||||
|
@ -21,7 +21,7 @@ extension Paths {
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var searchTerm: String?
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var excludeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var includeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
@ -29,7 +29,7 @@ extension Paths {
|
||||
public var isFavorite: Bool?
|
||||
public var mediaTypes: [String]?
|
||||
public var genres: [String]?
|
||||
public var genreIDs: [UUID]?
|
||||
public var genreIDs: [String]?
|
||||
public var officialRatings: [String]?
|
||||
public var tags: [String]?
|
||||
public var years: [Int32]?
|
||||
@ -37,11 +37,11 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
public var person: String?
|
||||
public var personIDs: [UUID]?
|
||||
public var personIDs: [String]?
|
||||
public var personTypes: [String]?
|
||||
public var studios: [String]?
|
||||
public var studioIDs: [UUID]?
|
||||
public var userID: UUID?
|
||||
public var studioIDs: [String]?
|
||||
public var userID: String?
|
||||
public var nameStartsWithOrGreater: String?
|
||||
public var nameStartsWith: String?
|
||||
public var nameLessThan: String?
|
||||
@ -50,7 +50,7 @@ extension Paths {
|
||||
public var enableImages: Bool?
|
||||
public var enableTotalRecordCount: Bool?
|
||||
|
||||
public init(minCommunityRating: Double? = nil, startIndex: Int32? = nil, limit: Int32? = nil, searchTerm: String? = nil, parentID: UUID? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, isFavorite: Bool? = nil, mediaTypes: [String]? = nil, genres: [String]? = nil, genreIDs: [UUID]? = nil, officialRatings: [String]? = nil, tags: [String]? = nil, years: [Int32]? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, person: String? = nil, personIDs: [UUID]? = nil, personTypes: [String]? = nil, studios: [String]? = nil, studioIDs: [UUID]? = nil, userID: UUID? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, sortBy: [String]? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, enableImages: Bool? = nil, enableTotalRecordCount: Bool? = nil) {
|
||||
public init(minCommunityRating: Double? = nil, startIndex: Int32? = nil, limit: Int32? = nil, searchTerm: String? = nil, parentID: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, isFavorite: Bool? = nil, mediaTypes: [String]? = nil, genres: [String]? = nil, genreIDs: [String]? = nil, officialRatings: [String]? = nil, tags: [String]? = nil, years: [Int32]? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, person: String? = nil, personIDs: [String]? = nil, personTypes: [String]? = nil, studios: [String]? = nil, studioIDs: [String]? = nil, userID: String? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, sortBy: [String]? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, enableImages: Bool? = nil, enableTotalRecordCount: Bool? = nil) {
|
||||
self.minCommunityRating = minCommunityRating
|
||||
self.startIndex = startIndex
|
||||
self.limit = limit
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Gets all parents of an item.
|
||||
static public func getAncestors(itemID: String, userID: UUID? = nil) -> Request<[JellyfinAPI.BaseItemDto]> {
|
||||
static public func getAncestors(itemID: String, userID: String? = nil) -> Request<[JellyfinAPI.BaseItemDto]> {
|
||||
Request(method: "GET", url: "/Items/\(itemID)/Ancestors", query: makeGetAncestorsQuery(userID), id: "GetAncestors")
|
||||
}
|
||||
|
||||
private static func makeGetAncestorsQuery(_ userID: UUID?) -> [(String, String?)] {
|
||||
private static func makeGetAncestorsQuery(_ userID: String?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
return encoder.items
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Gets an artist by name.
|
||||
static public func getArtistByName(name: String, userID: UUID? = nil) -> Request<JellyfinAPI.BaseItemDto> {
|
||||
static public func getArtistByName(name: String, userID: String? = nil) -> Request<JellyfinAPI.BaseItemDto> {
|
||||
Request(method: "GET", url: "/Artists/\(name)", query: makeGetArtistByNameQuery(userID), id: "GetArtistByName")
|
||||
}
|
||||
|
||||
private static func makeGetArtistByNameQuery(_ userID: UUID?) -> [(String, String?)] {
|
||||
private static func makeGetArtistByNameQuery(_ userID: String?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
return encoder.items
|
||||
|
@ -21,7 +21,7 @@ extension Paths {
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var searchTerm: String?
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var excludeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var includeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
@ -29,7 +29,7 @@ extension Paths {
|
||||
public var isFavorite: Bool?
|
||||
public var mediaTypes: [String]?
|
||||
public var genres: [String]?
|
||||
public var genreIDs: [UUID]?
|
||||
public var genreIDs: [String]?
|
||||
public var officialRatings: [String]?
|
||||
public var tags: [String]?
|
||||
public var years: [Int32]?
|
||||
@ -37,11 +37,11 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
public var person: String?
|
||||
public var personIDs: [UUID]?
|
||||
public var personIDs: [String]?
|
||||
public var personTypes: [String]?
|
||||
public var studios: [String]?
|
||||
public var studioIDs: [UUID]?
|
||||
public var userID: UUID?
|
||||
public var studioIDs: [String]?
|
||||
public var userID: String?
|
||||
public var nameStartsWithOrGreater: String?
|
||||
public var nameStartsWith: String?
|
||||
public var nameLessThan: String?
|
||||
@ -50,7 +50,7 @@ extension Paths {
|
||||
public var enableImages: Bool?
|
||||
public var enableTotalRecordCount: Bool?
|
||||
|
||||
public init(minCommunityRating: Double? = nil, startIndex: Int32? = nil, limit: Int32? = nil, searchTerm: String? = nil, parentID: UUID? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, isFavorite: Bool? = nil, mediaTypes: [String]? = nil, genres: [String]? = nil, genreIDs: [UUID]? = nil, officialRatings: [String]? = nil, tags: [String]? = nil, years: [Int32]? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, person: String? = nil, personIDs: [UUID]? = nil, personTypes: [String]? = nil, studios: [String]? = nil, studioIDs: [UUID]? = nil, userID: UUID? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, sortBy: [String]? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, enableImages: Bool? = nil, enableTotalRecordCount: Bool? = nil) {
|
||||
public init(minCommunityRating: Double? = nil, startIndex: Int32? = nil, limit: Int32? = nil, searchTerm: String? = nil, parentID: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, isFavorite: Bool? = nil, mediaTypes: [String]? = nil, genres: [String]? = nil, genreIDs: [String]? = nil, officialRatings: [String]? = nil, tags: [String]? = nil, years: [Int32]? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, person: String? = nil, personIDs: [String]? = nil, personTypes: [String]? = nil, studios: [String]? = nil, studioIDs: [String]? = nil, userID: String? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, sortBy: [String]? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, enableImages: Bool? = nil, enableTotalRecordCount: Bool? = nil) {
|
||||
self.minCommunityRating = minCommunityRating
|
||||
self.startIndex = startIndex
|
||||
self.limit = limit
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Gets a live tv channel.
|
||||
static public func getChannel(channelID: String, userID: UUID? = nil) -> Request<JellyfinAPI.BaseItemDto> {
|
||||
static public func getChannel(channelID: String, userID: String? = nil) -> Request<JellyfinAPI.BaseItemDto> {
|
||||
Request(method: "GET", url: "/LiveTv/Channels/\(channelID)", query: makeGetChannelQuery(userID), id: "GetChannel")
|
||||
}
|
||||
|
||||
private static func makeGetChannelQuery(_ userID: UUID?) -> [(String, String?)] {
|
||||
private static func makeGetChannelQuery(_ userID: String?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
return encoder.items
|
||||
|
@ -17,8 +17,8 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetChannelItemsParameters {
|
||||
public var folderID: UUID?
|
||||
public var userID: UUID?
|
||||
public var folderID: String?
|
||||
public var userID: String?
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var sortOrder: [JellyfinAPI.SortOrder]?
|
||||
@ -26,7 +26,7 @@ extension Paths {
|
||||
public var sortBy: [String]?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
|
||||
public init(folderID: UUID? = nil, userID: UUID? = nil, startIndex: Int32? = nil, limit: Int32? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, sortBy: [String]? = nil, fields: [JellyfinAPI.ItemFields]? = nil) {
|
||||
public init(folderID: String? = nil, userID: String? = nil, startIndex: Int32? = nil, limit: Int32? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, sortBy: [String]? = nil, fields: [JellyfinAPI.ItemFields]? = nil) {
|
||||
self.folderID = folderID
|
||||
self.userID = userID
|
||||
self.startIndex = startIndex
|
||||
|
@ -17,14 +17,14 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetChannelsParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var isSupportsLatestItems: Bool?
|
||||
public var isSupportsMediaDeletion: Bool?
|
||||
public var isFavorite: Bool?
|
||||
|
||||
public init(userID: UUID? = nil, startIndex: Int32? = nil, limit: Int32? = nil, isSupportsLatestItems: Bool? = nil, isSupportsMediaDeletion: Bool? = nil, isFavorite: Bool? = nil) {
|
||||
public init(userID: String? = nil, startIndex: Int32? = nil, limit: Int32? = nil, isSupportsLatestItems: Bool? = nil, isSupportsMediaDeletion: Bool? = nil, isFavorite: Bool? = nil) {
|
||||
self.userID = userID
|
||||
self.startIndex = startIndex
|
||||
self.limit = limit
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Get Devices.
|
||||
static public func getDevices(isSupportsSync: Bool? = nil, userID: UUID? = nil) -> Request<JellyfinAPI.DeviceInfoQueryResult> {
|
||||
static public func getDevices(isSupportsSync: Bool? = nil, userID: String? = nil) -> Request<JellyfinAPI.DeviceInfoQueryResult> {
|
||||
Request(method: "GET", url: "/Devices", query: makeGetDevicesQuery(isSupportsSync, userID), id: "GetDevices")
|
||||
}
|
||||
|
||||
private static func makeGetDevicesQuery(_ isSupportsSync: Bool?, _ userID: UUID?) -> [(String, String?)] {
|
||||
private static func makeGetDevicesQuery(_ isSupportsSync: Bool?, _ userID: String?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(isSupportsSync, forKey: "supportsSync")
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
|
@ -12,14 +12,7 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Get Display Preferences.
|
||||
static public func getDisplayPreferences(displayPreferencesID: String, userID: UUID, client: String) -> Request<JellyfinAPI.DisplayPreferencesDto> {
|
||||
Request(method: "GET", url: "/DisplayPreferences/\(displayPreferencesID)", query: makeGetDisplayPreferencesQuery(userID, client), id: "GetDisplayPreferences")
|
||||
}
|
||||
|
||||
private static func makeGetDisplayPreferencesQuery(_ userID: UUID, _ client: String) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
encoder.encode(client, forKey: "client")
|
||||
return encoder.items
|
||||
static public func getDisplayPreferences(displayPreferencesID: String, userID: String, client: String) -> Request<JellyfinAPI.DisplayPreferencesDto> {
|
||||
Request(method: "GET", url: "/DisplayPreferences/\(displayPreferencesID)", query: [("userId", userID), ("client", client)], id: "GetDisplayPreferences")
|
||||
}
|
||||
}
|
||||
|
@ -17,13 +17,13 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetEpisodesParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var season: Int32?
|
||||
public var seasonID: UUID?
|
||||
public var seasonID: String?
|
||||
public var isMissing: Bool?
|
||||
public var adjacentTo: String?
|
||||
public var startItemID: UUID?
|
||||
public var startItemID: String?
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var enableImages: Bool?
|
||||
@ -32,7 +32,7 @@ extension Paths {
|
||||
public var enableUserData: Bool?
|
||||
public var sortBy: String?
|
||||
|
||||
public init(userID: UUID? = nil, fields: [JellyfinAPI.ItemFields]? = nil, season: Int32? = nil, seasonID: UUID? = nil, isMissing: Bool? = nil, adjacentTo: String? = nil, startItemID: UUID? = nil, startIndex: Int32? = nil, limit: Int32? = nil, enableImages: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, enableUserData: Bool? = nil, sortBy: String? = nil) {
|
||||
public init(userID: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, season: Int32? = nil, seasonID: String? = nil, isMissing: Bool? = nil, adjacentTo: String? = nil, startItemID: String? = nil, startIndex: Int32? = nil, limit: Int32? = nil, enableImages: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, enableUserData: Bool? = nil, sortBy: String? = nil) {
|
||||
self.userID = userID
|
||||
self.fields = fields
|
||||
self.season = season
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Gets a genre, by name.
|
||||
static public func getGenre(genreName: String, userID: UUID? = nil) -> Request<JellyfinAPI.BaseItemDto> {
|
||||
static public func getGenre(genreName: String, userID: String? = nil) -> Request<JellyfinAPI.BaseItemDto> {
|
||||
Request(method: "GET", url: "/Genres/\(genreName)", query: makeGetGenreQuery(userID), id: "GetGenre")
|
||||
}
|
||||
|
||||
private static func makeGetGenreQuery(_ userID: UUID?) -> [(String, String?)] {
|
||||
private static func makeGetGenreQuery(_ userID: String?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
return encoder.items
|
||||
|
@ -20,14 +20,14 @@ extension Paths {
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var searchTerm: String?
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var excludeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var includeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var isFavorite: Bool?
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var nameStartsWithOrGreater: String?
|
||||
public var nameStartsWith: String?
|
||||
public var nameLessThan: String?
|
||||
@ -36,7 +36,7 @@ extension Paths {
|
||||
public var enableImages: Bool?
|
||||
public var enableTotalRecordCount: Bool?
|
||||
|
||||
public init(startIndex: Int32? = nil, limit: Int32? = nil, searchTerm: String? = nil, parentID: UUID? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, isFavorite: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, userID: UUID? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, sortBy: [String]? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, enableImages: Bool? = nil, enableTotalRecordCount: Bool? = nil) {
|
||||
public init(startIndex: Int32? = nil, limit: Int32? = nil, searchTerm: String? = nil, parentID: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, isFavorite: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, userID: String? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, sortBy: [String]? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, enableImages: Bool? = nil, enableTotalRecordCount: Bool? = nil) {
|
||||
self.startIndex = startIndex
|
||||
self.limit = limit
|
||||
self.searchTerm = searchTerm
|
||||
|
@ -17,7 +17,7 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetInstantMixFromAlbumParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var limit: Int32?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var enableImages: Bool?
|
||||
@ -25,7 +25,7 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
|
||||
public init(userID: UUID? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
public init(userID: String? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
self.userID = userID
|
||||
self.limit = limit
|
||||
self.fields = fields
|
||||
|
@ -18,8 +18,8 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetInstantMixFromArtists2Parameters {
|
||||
public var id: UUID
|
||||
public var userID: UUID?
|
||||
public var id: String
|
||||
public var userID: String?
|
||||
public var limit: Int32?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var enableImages: Bool?
|
||||
@ -27,7 +27,7 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
|
||||
public init(id: UUID, userID: UUID? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
public init(id: String, userID: String? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
self.id = id
|
||||
self.userID = userID
|
||||
self.limit = limit
|
||||
|
@ -17,7 +17,7 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetInstantMixFromArtistsParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var limit: Int32?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var enableImages: Bool?
|
||||
@ -25,7 +25,7 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
|
||||
public init(userID: UUID? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
public init(userID: String? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
self.userID = userID
|
||||
self.limit = limit
|
||||
self.fields = fields
|
||||
|
@ -17,7 +17,7 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetInstantMixFromItemParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var limit: Int32?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var enableImages: Bool?
|
||||
@ -25,7 +25,7 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
|
||||
public init(userID: UUID? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
public init(userID: String? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
self.userID = userID
|
||||
self.limit = limit
|
||||
self.fields = fields
|
||||
|
@ -17,8 +17,8 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetInstantMixFromMusicGenreByIDParameters {
|
||||
public var id: UUID
|
||||
public var userID: UUID?
|
||||
public var id: String
|
||||
public var userID: String?
|
||||
public var limit: Int32?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var enableImages: Bool?
|
||||
@ -26,7 +26,7 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
|
||||
public init(id: UUID, userID: UUID? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
public init(id: String, userID: String? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
self.id = id
|
||||
self.userID = userID
|
||||
self.limit = limit
|
||||
|
@ -17,7 +17,7 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetInstantMixFromMusicGenreByNameParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var limit: Int32?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var enableImages: Bool?
|
||||
@ -25,7 +25,7 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
|
||||
public init(userID: UUID? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
public init(userID: String? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
self.userID = userID
|
||||
self.limit = limit
|
||||
self.fields = fields
|
||||
|
@ -17,7 +17,7 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetInstantMixFromPlaylistParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var limit: Int32?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var enableImages: Bool?
|
||||
@ -25,7 +25,7 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
|
||||
public init(userID: UUID? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
public init(userID: String? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
self.userID = userID
|
||||
self.limit = limit
|
||||
self.fields = fields
|
||||
|
@ -17,7 +17,7 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetInstantMixFromSongParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var limit: Int32?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var enableImages: Bool?
|
||||
@ -25,7 +25,7 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
|
||||
public init(userID: UUID? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
public init(userID: String? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableImages: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil) {
|
||||
self.userID = userID
|
||||
self.limit = limit
|
||||
self.fields = fields
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Get item counts.
|
||||
static public func getItemCounts(userID: UUID? = nil, isFavorite: Bool? = nil) -> Request<JellyfinAPI.ItemCounts> {
|
||||
static public func getItemCounts(userID: String? = nil, isFavorite: Bool? = nil) -> Request<JellyfinAPI.ItemCounts> {
|
||||
Request(method: "GET", url: "/Items/Counts", query: makeGetItemCountsQuery(userID, isFavorite), id: "GetItemCounts")
|
||||
}
|
||||
|
||||
private static func makeGetItemCountsQuery(_ userID: UUID?, _ isFavorite: Bool?) -> [(String, String?)] {
|
||||
private static func makeGetItemCountsQuery(_ userID: String?, _ isFavorite: Bool?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
encoder.encode(isFavorite, forKey: "isFavorite")
|
||||
|
@ -17,7 +17,7 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetItemsParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var maxOfficialRating: String?
|
||||
public var hasThemeSong: Bool?
|
||||
public var hasThemeVideo: Bool?
|
||||
@ -48,13 +48,13 @@ extension Paths {
|
||||
public var isNews: Bool?
|
||||
public var isKids: Bool?
|
||||
public var isSports: Bool?
|
||||
public var excludeItemIDs: [UUID]?
|
||||
public var excludeItemIDs: [String]?
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var isRecursive: Bool?
|
||||
public var searchTerm: String?
|
||||
public var sortOrder: [JellyfinAPI.SortOrder]?
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var excludeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var includeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
@ -72,17 +72,17 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
public var person: String?
|
||||
public var personIDs: [UUID]?
|
||||
public var personIDs: [String]?
|
||||
public var personTypes: [String]?
|
||||
public var studios: [String]?
|
||||
public var artists: [String]?
|
||||
public var excludeArtistIDs: [UUID]?
|
||||
public var artistIDs: [UUID]?
|
||||
public var albumArtistIDs: [UUID]?
|
||||
public var contributingArtistIDs: [UUID]?
|
||||
public var excludeArtistIDs: [String]?
|
||||
public var artistIDs: [String]?
|
||||
public var albumArtistIDs: [String]?
|
||||
public var contributingArtistIDs: [String]?
|
||||
public var albums: [String]?
|
||||
public var albumIDs: [UUID]?
|
||||
public var ids: [UUID]?
|
||||
public var albumIDs: [String]?
|
||||
public var ids: [String]?
|
||||
public var videoTypes: [JellyfinAPI.VideoType]?
|
||||
public var minOfficialRating: String?
|
||||
public var isLocked: Bool?
|
||||
@ -98,12 +98,12 @@ extension Paths {
|
||||
public var nameStartsWithOrGreater: String?
|
||||
public var nameStartsWith: String?
|
||||
public var nameLessThan: String?
|
||||
public var studioIDs: [UUID]?
|
||||
public var genreIDs: [UUID]?
|
||||
public var studioIDs: [String]?
|
||||
public var genreIDs: [String]?
|
||||
public var enableTotalRecordCount: Bool?
|
||||
public var enableImages: Bool?
|
||||
|
||||
public init(userID: UUID? = nil, maxOfficialRating: String? = nil, hasThemeSong: Bool? = nil, hasThemeVideo: Bool? = nil, hasSubtitles: Bool? = nil, hasSpecialFeature: Bool? = nil, hasTrailer: Bool? = nil, adjacentTo: String? = nil, parentIndexNumber: Int32? = nil, hasParentalRating: Bool? = nil, isHd: Bool? = nil, isIs4K: Bool? = nil, locationTypes: [JellyfinAPI.LocationType]? = nil, excludeLocationTypes: [JellyfinAPI.LocationType]? = nil, isMissing: Bool? = nil, isUnaired: Bool? = nil, minCommunityRating: Double? = nil, minCriticRating: Double? = nil, minPremiereDate: Date? = nil, minDateLastSaved: Date? = nil, minDateLastSavedForUser: Date? = nil, maxPremiereDate: Date? = nil, hasOverview: Bool? = nil, hasImdbID: Bool? = nil, hasTmdbID: Bool? = nil, hasTvdbID: Bool? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, excludeItemIDs: [UUID]? = nil, startIndex: Int32? = nil, limit: Int32? = nil, isRecursive: Bool? = nil, searchTerm: String? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, parentID: UUID? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, isFavorite: Bool? = nil, mediaTypes: [String]? = nil, imageTypes: [JellyfinAPI.ImageType]? = nil, sortBy: [String]? = nil, isPlayed: Bool? = nil, genres: [String]? = nil, officialRatings: [String]? = nil, tags: [String]? = nil, years: [Int32]? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, person: String? = nil, personIDs: [UUID]? = nil, personTypes: [String]? = nil, studios: [String]? = nil, artists: [String]? = nil, excludeArtistIDs: [UUID]? = nil, artistIDs: [UUID]? = nil, albumArtistIDs: [UUID]? = nil, contributingArtistIDs: [UUID]? = nil, albums: [String]? = nil, albumIDs: [UUID]? = nil, ids: [UUID]? = nil, videoTypes: [JellyfinAPI.VideoType]? = nil, minOfficialRating: String? = nil, isLocked: Bool? = nil, isPlaceHolder: Bool? = nil, hasOfficialRating: Bool? = nil, isCollapseBoxSetItems: Bool? = nil, minWidth: Int32? = nil, minHeight: Int32? = nil, maxWidth: Int32? = nil, maxHeight: Int32? = nil, isIs3D: Bool? = nil, seriesStatus: [JellyfinAPI.SeriesStatus]? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, studioIDs: [UUID]? = nil, genreIDs: [UUID]? = nil, enableTotalRecordCount: Bool? = nil, enableImages: Bool? = nil) {
|
||||
public init(userID: String? = nil, maxOfficialRating: String? = nil, hasThemeSong: Bool? = nil, hasThemeVideo: Bool? = nil, hasSubtitles: Bool? = nil, hasSpecialFeature: Bool? = nil, hasTrailer: Bool? = nil, adjacentTo: String? = nil, parentIndexNumber: Int32? = nil, hasParentalRating: Bool? = nil, isHd: Bool? = nil, isIs4K: Bool? = nil, locationTypes: [JellyfinAPI.LocationType]? = nil, excludeLocationTypes: [JellyfinAPI.LocationType]? = nil, isMissing: Bool? = nil, isUnaired: Bool? = nil, minCommunityRating: Double? = nil, minCriticRating: Double? = nil, minPremiereDate: Date? = nil, minDateLastSaved: Date? = nil, minDateLastSavedForUser: Date? = nil, maxPremiereDate: Date? = nil, hasOverview: Bool? = nil, hasImdbID: Bool? = nil, hasTmdbID: Bool? = nil, hasTvdbID: Bool? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, excludeItemIDs: [String]? = nil, startIndex: Int32? = nil, limit: Int32? = nil, isRecursive: Bool? = nil, searchTerm: String? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, parentID: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, isFavorite: Bool? = nil, mediaTypes: [String]? = nil, imageTypes: [JellyfinAPI.ImageType]? = nil, sortBy: [String]? = nil, isPlayed: Bool? = nil, genres: [String]? = nil, officialRatings: [String]? = nil, tags: [String]? = nil, years: [Int32]? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, person: String? = nil, personIDs: [String]? = nil, personTypes: [String]? = nil, studios: [String]? = nil, artists: [String]? = nil, excludeArtistIDs: [String]? = nil, artistIDs: [String]? = nil, albumArtistIDs: [String]? = nil, contributingArtistIDs: [String]? = nil, albums: [String]? = nil, albumIDs: [String]? = nil, ids: [String]? = nil, videoTypes: [JellyfinAPI.VideoType]? = nil, minOfficialRating: String? = nil, isLocked: Bool? = nil, isPlaceHolder: Bool? = nil, hasOfficialRating: Bool? = nil, isCollapseBoxSetItems: Bool? = nil, minWidth: Int32? = nil, minHeight: Int32? = nil, maxWidth: Int32? = nil, maxHeight: Int32? = nil, isIs3D: Bool? = nil, seriesStatus: [JellyfinAPI.SeriesStatus]? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, studioIDs: [String]? = nil, genreIDs: [String]? = nil, enableTotalRecordCount: Bool? = nil, enableImages: Bool? = nil) {
|
||||
self.userID = userID
|
||||
self.maxOfficialRating = maxOfficialRating
|
||||
self.hasThemeSong = hasThemeSong
|
||||
|
@ -47,13 +47,13 @@ extension Paths {
|
||||
public var isNews: Bool?
|
||||
public var isKids: Bool?
|
||||
public var isSports: Bool?
|
||||
public var excludeItemIDs: [UUID]?
|
||||
public var excludeItemIDs: [String]?
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var isRecursive: Bool?
|
||||
public var searchTerm: String?
|
||||
public var sortOrder: [JellyfinAPI.SortOrder]?
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var excludeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var includeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
@ -71,17 +71,17 @@ extension Paths {
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
public var person: String?
|
||||
public var personIDs: [UUID]?
|
||||
public var personIDs: [String]?
|
||||
public var personTypes: [String]?
|
||||
public var studios: [String]?
|
||||
public var artists: [String]?
|
||||
public var excludeArtistIDs: [UUID]?
|
||||
public var artistIDs: [UUID]?
|
||||
public var albumArtistIDs: [UUID]?
|
||||
public var contributingArtistIDs: [UUID]?
|
||||
public var excludeArtistIDs: [String]?
|
||||
public var artistIDs: [String]?
|
||||
public var albumArtistIDs: [String]?
|
||||
public var contributingArtistIDs: [String]?
|
||||
public var albums: [String]?
|
||||
public var albumIDs: [UUID]?
|
||||
public var ids: [UUID]?
|
||||
public var albumIDs: [String]?
|
||||
public var ids: [String]?
|
||||
public var videoTypes: [JellyfinAPI.VideoType]?
|
||||
public var minOfficialRating: String?
|
||||
public var isLocked: Bool?
|
||||
@ -97,12 +97,12 @@ extension Paths {
|
||||
public var nameStartsWithOrGreater: String?
|
||||
public var nameStartsWith: String?
|
||||
public var nameLessThan: String?
|
||||
public var studioIDs: [UUID]?
|
||||
public var genreIDs: [UUID]?
|
||||
public var studioIDs: [String]?
|
||||
public var genreIDs: [String]?
|
||||
public var enableTotalRecordCount: Bool?
|
||||
public var enableImages: Bool?
|
||||
|
||||
public init(maxOfficialRating: String? = nil, hasThemeSong: Bool? = nil, hasThemeVideo: Bool? = nil, hasSubtitles: Bool? = nil, hasSpecialFeature: Bool? = nil, hasTrailer: Bool? = nil, adjacentTo: String? = nil, parentIndexNumber: Int32? = nil, hasParentalRating: Bool? = nil, isHd: Bool? = nil, isIs4K: Bool? = nil, locationTypes: [JellyfinAPI.LocationType]? = nil, excludeLocationTypes: [JellyfinAPI.LocationType]? = nil, isMissing: Bool? = nil, isUnaired: Bool? = nil, minCommunityRating: Double? = nil, minCriticRating: Double? = nil, minPremiereDate: Date? = nil, minDateLastSaved: Date? = nil, minDateLastSavedForUser: Date? = nil, maxPremiereDate: Date? = nil, hasOverview: Bool? = nil, hasImdbID: Bool? = nil, hasTmdbID: Bool? = nil, hasTvdbID: Bool? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, excludeItemIDs: [UUID]? = nil, startIndex: Int32? = nil, limit: Int32? = nil, isRecursive: Bool? = nil, searchTerm: String? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, parentID: UUID? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, isFavorite: Bool? = nil, mediaTypes: [String]? = nil, imageTypes: [JellyfinAPI.ImageType]? = nil, sortBy: [String]? = nil, isPlayed: Bool? = nil, genres: [String]? = nil, officialRatings: [String]? = nil, tags: [String]? = nil, years: [Int32]? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, person: String? = nil, personIDs: [UUID]? = nil, personTypes: [String]? = nil, studios: [String]? = nil, artists: [String]? = nil, excludeArtistIDs: [UUID]? = nil, artistIDs: [UUID]? = nil, albumArtistIDs: [UUID]? = nil, contributingArtistIDs: [UUID]? = nil, albums: [String]? = nil, albumIDs: [UUID]? = nil, ids: [UUID]? = nil, videoTypes: [JellyfinAPI.VideoType]? = nil, minOfficialRating: String? = nil, isLocked: Bool? = nil, isPlaceHolder: Bool? = nil, hasOfficialRating: Bool? = nil, isCollapseBoxSetItems: Bool? = nil, minWidth: Int32? = nil, minHeight: Int32? = nil, maxWidth: Int32? = nil, maxHeight: Int32? = nil, isIs3D: Bool? = nil, seriesStatus: [JellyfinAPI.SeriesStatus]? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, studioIDs: [UUID]? = nil, genreIDs: [UUID]? = nil, enableTotalRecordCount: Bool? = nil, enableImages: Bool? = nil) {
|
||||
public init(maxOfficialRating: String? = nil, hasThemeSong: Bool? = nil, hasThemeVideo: Bool? = nil, hasSubtitles: Bool? = nil, hasSpecialFeature: Bool? = nil, hasTrailer: Bool? = nil, adjacentTo: String? = nil, parentIndexNumber: Int32? = nil, hasParentalRating: Bool? = nil, isHd: Bool? = nil, isIs4K: Bool? = nil, locationTypes: [JellyfinAPI.LocationType]? = nil, excludeLocationTypes: [JellyfinAPI.LocationType]? = nil, isMissing: Bool? = nil, isUnaired: Bool? = nil, minCommunityRating: Double? = nil, minCriticRating: Double? = nil, minPremiereDate: Date? = nil, minDateLastSaved: Date? = nil, minDateLastSavedForUser: Date? = nil, maxPremiereDate: Date? = nil, hasOverview: Bool? = nil, hasImdbID: Bool? = nil, hasTmdbID: Bool? = nil, hasTvdbID: Bool? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, excludeItemIDs: [String]? = nil, startIndex: Int32? = nil, limit: Int32? = nil, isRecursive: Bool? = nil, searchTerm: String? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, parentID: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, isFavorite: Bool? = nil, mediaTypes: [String]? = nil, imageTypes: [JellyfinAPI.ImageType]? = nil, sortBy: [String]? = nil, isPlayed: Bool? = nil, genres: [String]? = nil, officialRatings: [String]? = nil, tags: [String]? = nil, years: [Int32]? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, person: String? = nil, personIDs: [String]? = nil, personTypes: [String]? = nil, studios: [String]? = nil, artists: [String]? = nil, excludeArtistIDs: [String]? = nil, artistIDs: [String]? = nil, albumArtistIDs: [String]? = nil, contributingArtistIDs: [String]? = nil, albums: [String]? = nil, albumIDs: [String]? = nil, ids: [String]? = nil, videoTypes: [JellyfinAPI.VideoType]? = nil, minOfficialRating: String? = nil, isLocked: Bool? = nil, isPlaceHolder: Bool? = nil, hasOfficialRating: Bool? = nil, isCollapseBoxSetItems: Bool? = nil, minWidth: Int32? = nil, minHeight: Int32? = nil, maxWidth: Int32? = nil, maxHeight: Int32? = nil, isIs3D: Bool? = nil, seriesStatus: [JellyfinAPI.SeriesStatus]? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, studioIDs: [String]? = nil, genreIDs: [String]? = nil, enableTotalRecordCount: Bool? = nil, enableImages: Bool? = nil) {
|
||||
self.maxOfficialRating = maxOfficialRating
|
||||
self.hasThemeSong = hasThemeSong
|
||||
self.hasThemeVideo = hasThemeVideo
|
||||
|
@ -17,14 +17,14 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetLatestChannelItemsParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var filters: [JellyfinAPI.ItemFilter]?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var channelIDs: [UUID]?
|
||||
public var channelIDs: [String]?
|
||||
|
||||
public init(userID: UUID? = nil, startIndex: Int32? = nil, limit: Int32? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, fields: [JellyfinAPI.ItemFields]? = nil, channelIDs: [UUID]? = nil) {
|
||||
public init(userID: String? = nil, startIndex: Int32? = nil, limit: Int32? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, fields: [JellyfinAPI.ItemFields]? = nil, channelIDs: [String]? = nil) {
|
||||
self.userID = userID
|
||||
self.startIndex = startIndex
|
||||
self.limit = limit
|
||||
|
@ -17,7 +17,7 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetLatestMediaParameters {
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var includeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var isPlayed: Bool?
|
||||
@ -28,7 +28,7 @@ extension Paths {
|
||||
public var limit: Int32?
|
||||
public var isGroupItems: Bool?
|
||||
|
||||
public init(parentID: UUID? = nil, fields: [JellyfinAPI.ItemFields]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, isPlayed: Bool? = nil, enableImages: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, enableUserData: Bool? = nil, limit: Int32? = nil, isGroupItems: Bool? = nil) {
|
||||
public init(parentID: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, isPlayed: Bool? = nil, enableImages: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, enableUserData: Bool? = nil, limit: Int32? = nil, isGroupItems: Bool? = nil) {
|
||||
self.parentID = parentID
|
||||
self.fields = fields
|
||||
self.includeItemTypes = includeItemTypes
|
||||
|
@ -18,7 +18,7 @@ extension Paths {
|
||||
|
||||
public struct GetLiveTvChannelsParameters {
|
||||
public var type: `Type`?
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var startIndex: Int32?
|
||||
public var isMovie: Bool?
|
||||
public var isSeries: Bool?
|
||||
@ -43,7 +43,7 @@ extension Paths {
|
||||
|
||||
public typealias SortOrder = JellyfinAPI.SortOrder
|
||||
|
||||
public init(type: `Type`? = nil, userID: UUID? = nil, startIndex: Int32? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, limit: Int32? = nil, isFavorite: Bool? = nil, isLiked: Bool? = nil, isDisliked: Bool? = nil, enableImages: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableUserData: Bool? = nil, sortBy: [String]? = nil, sortOrder: SortOrder? = nil, enableFavoriteSorting: Bool? = nil, isAddCurrentProgram: Bool? = nil) {
|
||||
public init(type: `Type`? = nil, userID: String? = nil, startIndex: Int32? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, limit: Int32? = nil, isFavorite: Bool? = nil, isLiked: Bool? = nil, isDisliked: Bool? = nil, enableImages: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableUserData: Bool? = nil, sortBy: [String]? = nil, sortOrder: SortOrder? = nil, enableFavoriteSorting: Bool? = nil, isAddCurrentProgram: Bool? = nil) {
|
||||
self.type = type
|
||||
self.userID = userID
|
||||
self.startIndex = startIndex
|
||||
|
@ -17,8 +17,8 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetLiveTvProgramsParameters {
|
||||
public var channelIDs: [UUID]?
|
||||
public var userID: UUID?
|
||||
public var channelIDs: [String]?
|
||||
public var userID: String?
|
||||
public var minStartDate: Date?
|
||||
public var hasAired: Bool?
|
||||
public var isAiring: Bool?
|
||||
@ -35,17 +35,17 @@ extension Paths {
|
||||
public var sortBy: [String]?
|
||||
public var sortOrder: [JellyfinAPI.SortOrder]?
|
||||
public var genres: [String]?
|
||||
public var genreIDs: [UUID]?
|
||||
public var genreIDs: [String]?
|
||||
public var enableImages: Bool?
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
public var enableUserData: Bool?
|
||||
public var seriesTimerID: String?
|
||||
public var librarySeriesID: UUID?
|
||||
public var librarySeriesID: String?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var enableTotalRecordCount: Bool?
|
||||
|
||||
public init(channelIDs: [UUID]? = nil, userID: UUID? = nil, minStartDate: Date? = nil, hasAired: Bool? = nil, isAiring: Bool? = nil, maxStartDate: Date? = nil, minEndDate: Date? = nil, maxEndDate: Date? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, startIndex: Int32? = nil, limit: Int32? = nil, sortBy: [String]? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, genres: [String]? = nil, genreIDs: [UUID]? = nil, enableImages: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, enableUserData: Bool? = nil, seriesTimerID: String? = nil, librarySeriesID: UUID? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableTotalRecordCount: Bool? = nil) {
|
||||
public init(channelIDs: [String]? = nil, userID: String? = nil, minStartDate: Date? = nil, hasAired: Bool? = nil, isAiring: Bool? = nil, maxStartDate: Date? = nil, minEndDate: Date? = nil, maxEndDate: Date? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, startIndex: Int32? = nil, limit: Int32? = nil, sortBy: [String]? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, genres: [String]? = nil, genreIDs: [String]? = nil, enableImages: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, enableUserData: Bool? = nil, seriesTimerID: String? = nil, librarySeriesID: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, enableTotalRecordCount: Bool? = nil) {
|
||||
self.channelIDs = channelIDs
|
||||
self.userID = userID
|
||||
self.minStartDate = minStartDate
|
||||
|
@ -17,13 +17,13 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetMovieRecommendationsParameters {
|
||||
public var userID: UUID?
|
||||
public var parentID: UUID?
|
||||
public var userID: String?
|
||||
public var parentID: String?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var categoryLimit: Int32?
|
||||
public var itemLimit: Int32?
|
||||
|
||||
public init(userID: UUID? = nil, parentID: UUID? = nil, fields: [JellyfinAPI.ItemFields]? = nil, categoryLimit: Int32? = nil, itemLimit: Int32? = nil) {
|
||||
public init(userID: String? = nil, parentID: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, categoryLimit: Int32? = nil, itemLimit: Int32? = nil) {
|
||||
self.userID = userID
|
||||
self.parentID = parentID
|
||||
self.fields = fields
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Gets a music genre, by name.
|
||||
static public func getMusicGenre(genreName: String, userID: UUID? = nil) -> Request<JellyfinAPI.BaseItemDto> {
|
||||
static public func getMusicGenre(genreName: String, userID: String? = nil) -> Request<JellyfinAPI.BaseItemDto> {
|
||||
Request(method: "GET", url: "/MusicGenres/\(genreName)", query: makeGetMusicGenreQuery(userID), id: "GetMusicGenre")
|
||||
}
|
||||
|
||||
private static func makeGetMusicGenreQuery(_ userID: UUID?) -> [(String, String?)] {
|
||||
private static func makeGetMusicGenreQuery(_ userID: String?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
return encoder.items
|
||||
|
@ -21,14 +21,14 @@ extension Paths {
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var searchTerm: String?
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var excludeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var includeItemTypes: [JellyfinAPI.BaseItemKind]?
|
||||
public var isFavorite: Bool?
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var nameStartsWithOrGreater: String?
|
||||
public var nameStartsWith: String?
|
||||
public var nameLessThan: String?
|
||||
@ -37,7 +37,7 @@ extension Paths {
|
||||
public var enableImages: Bool?
|
||||
public var enableTotalRecordCount: Bool?
|
||||
|
||||
public init(startIndex: Int32? = nil, limit: Int32? = nil, searchTerm: String? = nil, parentID: UUID? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, isFavorite: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, userID: UUID? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, sortBy: [String]? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, enableImages: Bool? = nil, enableTotalRecordCount: Bool? = nil) {
|
||||
public init(startIndex: Int32? = nil, limit: Int32? = nil, searchTerm: String? = nil, parentID: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, excludeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, includeItemTypes: [JellyfinAPI.BaseItemKind]? = nil, isFavorite: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, userID: String? = nil, nameStartsWithOrGreater: String? = nil, nameStartsWith: String? = nil, nameLessThan: String? = nil, sortBy: [String]? = nil, sortOrder: [JellyfinAPI.SortOrder]? = nil, enableImages: Bool? = nil, enableTotalRecordCount: Bool? = nil) {
|
||||
self.startIndex = startIndex
|
||||
self.limit = limit
|
||||
self.searchTerm = searchTerm
|
||||
|
@ -17,12 +17,12 @@ extension Paths {
|
||||
}
|
||||
|
||||
public struct GetNextUpParameters {
|
||||
public var userID: UUID?
|
||||
public var userID: String?
|
||||
public var startIndex: Int32?
|
||||
public var limit: Int32?
|
||||
public var fields: [JellyfinAPI.ItemFields]?
|
||||
public var seriesID: String?
|
||||
public var parentID: UUID?
|
||||
public var parentID: String?
|
||||
public var enableImages: Bool?
|
||||
public var imageTypeLimit: Int32?
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
@ -32,7 +32,7 @@ extension Paths {
|
||||
public var isDisableFirstEpisode: Bool?
|
||||
public var enableRewatching: Bool?
|
||||
|
||||
public init(userID: UUID? = nil, startIndex: Int32? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, seriesID: String? = nil, parentID: UUID? = nil, enableImages: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, enableUserData: Bool? = nil, nextUpDateCutoff: Date? = nil, enableTotalRecordCount: Bool? = nil, isDisableFirstEpisode: Bool? = nil, enableRewatching: Bool? = nil) {
|
||||
public init(userID: String? = nil, startIndex: Int32? = nil, limit: Int32? = nil, fields: [JellyfinAPI.ItemFields]? = nil, seriesID: String? = nil, parentID: String? = nil, enableImages: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, enableUserData: Bool? = nil, nextUpDateCutoff: Date? = nil, enableTotalRecordCount: Bool? = nil, isDisableFirstEpisode: Bool? = nil, enableRewatching: Bool? = nil) {
|
||||
self.userID = userID
|
||||
self.startIndex = startIndex
|
||||
self.limit = limit
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Gets a package by name or assembly GUID.
|
||||
static public func getPackageInfo(name: String, assemblyGuid: UUID? = nil) -> Request<JellyfinAPI.PackageInfo> {
|
||||
static public func getPackageInfo(name: String, assemblyGuid: String? = nil) -> Request<JellyfinAPI.PackageInfo> {
|
||||
Request(method: "GET", url: "/Packages/\(name)", query: makeGetPackageInfoQuery(assemblyGuid), id: "GetPackageInfo")
|
||||
}
|
||||
|
||||
private static func makeGetPackageInfoQuery(_ assemblyGuid: UUID?) -> [(String, String?)] {
|
||||
private static func makeGetPackageInfoQuery(_ assemblyGuid: String?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(assemblyGuid, forKey: "assemblyGuid")
|
||||
return encoder.items
|
||||
|
@ -12,11 +12,11 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Get person by name.
|
||||
static public func getPerson(name: String, userID: UUID? = nil) -> Request<JellyfinAPI.BaseItemDto> {
|
||||
static public func getPerson(name: String, userID: String? = nil) -> Request<JellyfinAPI.BaseItemDto> {
|
||||
Request(method: "GET", url: "/Persons/\(name)", query: makeGetPersonQuery(userID), id: "GetPerson")
|
||||
}
|
||||
|
||||
private static func makeGetPersonQuery(_ userID: UUID?) -> [(String, String?)] {
|
||||
private static func makeGetPersonQuery(_ userID: String?) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
return encoder.items
|
||||
|
@ -27,11 +27,11 @@ extension Paths {
|
||||
public var enableImageTypes: [JellyfinAPI.ImageType]?
|
||||
public var excludePersonTypes: [String]?
|
||||
public var personTypes: [String]?
|
||||
public var appearsInItemID: UUID?
|
||||
public var userID: UUID?
|
||||
public var appearsInItemID: String?
|
||||
public var userID: String?
|
||||
public var enableImages: Bool?
|
||||
|
||||
public init(limit: Int32? = nil, searchTerm: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, isFavorite: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, excludePersonTypes: [String]? = nil, personTypes: [String]? = nil, appearsInItemID: UUID? = nil, userID: UUID? = nil, enableImages: Bool? = nil) {
|
||||
public init(limit: Int32? = nil, searchTerm: String? = nil, fields: [JellyfinAPI.ItemFields]? = nil, filters: [JellyfinAPI.ItemFilter]? = nil, isFavorite: Bool? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int32? = nil, enableImageTypes: [JellyfinAPI.ImageType]? = nil, excludePersonTypes: [String]? = nil, personTypes: [String]? = nil, appearsInItemID: String? = nil, userID: String? = nil, enableImages: Bool? = nil) {
|
||||
self.limit = limit
|
||||
self.searchTerm = searchTerm
|
||||
self.fields = fields
|
||||
|
@ -12,13 +12,7 @@ import URLQueryEncoder
|
||||
|
||||
extension Paths {
|
||||
/// Gets live playback media info for an item.
|
||||
static public func getPlaybackInfo(itemID: String, userID: UUID) -> Request<JellyfinAPI.PlaybackInfoResponse> {
|
||||
Request(method: "GET", url: "/Items/\(itemID)/PlaybackInfo", query: makeGetPlaybackInfoQuery(userID), id: "GetPlaybackInfo")
|
||||
}
|
||||
|
||||
private static func makeGetPlaybackInfoQuery(_ userID: UUID) -> [(String, String?)] {
|
||||
let encoder = URLQueryEncoder()
|
||||
encoder.encode(userID, forKey: "userId")
|
||||
return encoder.items
|
||||
static public func getPlaybackInfo(itemID: String, userID: String) -> Request<JellyfinAPI.PlaybackInfoResponse> {
|
||||
Request(method: "GET", url: "/Items/\(itemID)/PlaybackInfo", query: [("userId", userID)], id: "GetPlaybackInfo")
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user