-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Non-Fixed Width Integers, Hashable, Inline Patching, and 10.8.9 (#18)
- Loading branch information
Showing
705 changed files
with
3,617 additions
and
3,370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "Get", | ||
"repositoryURL": "https://github.com/kean/Get", | ||
"state": { | ||
"branch": null, | ||
"revision": "db5248ce985c703c5ea0030b7c4d3f908db304c9", | ||
"version": "1.0.2" | ||
} | ||
}, | ||
{ | ||
"package": "URLQueryEncoder", | ||
"repositoryURL": "https://github.com/CreateAPI/URLQueryEncoder", | ||
"state": { | ||
"branch": null, | ||
"revision": "4cc975d4d075d0e62699a796a08284e217d4ee93", | ||
"version": "0.2.0" | ||
} | ||
"pins" : [ | ||
{ | ||
"identity" : "get", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/kean/Get", | ||
"state" : { | ||
"revision" : "a7dd8e0233d4041330591445de21b7e5d4c953c6", | ||
"version" : "1.0.4" | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
}, | ||
{ | ||
"identity" : "urlqueryencoder", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/CreateAPI/URLQueryEncoder", | ||
"state" : { | ||
"revision" : "4cc975d4d075d0e62699a796a08284e217d4ee93", | ||
"version" : "0.2.0" | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// | ||
// jellyfin-sdk-swift is subject to the terms of the Mozilla Public | ||
// License, v2.0. If a copy of the MPL was not distributed with this | ||
// file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
// | ||
// Copyright (c) 2023 Jellyfin & Jellyfin Contributors | ||
// | ||
|
||
import Foundation | ||
|
||
public enum AnyJSON: Hashable, Codable { | ||
case string(String) | ||
case number(Double) | ||
case object([String: AnyJSON]) | ||
case array([AnyJSON]) | ||
case bool(Bool) | ||
var value: Any { | ||
switch self { | ||
case let .string(string): return string | ||
case let .number(double): return double | ||
case let .object(dictionary): return dictionary | ||
case let .array(array): return array | ||
case let .bool(bool): return bool | ||
} | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.singleValueContainer() | ||
switch self { | ||
case let .array(array): try container.encode(array) | ||
case let .object(object): try container.encode(object) | ||
case let .string(string): try container.encode(string) | ||
case let .number(number): try container.encode(number) | ||
case let .bool(bool): try container.encode(bool) | ||
} | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let container = try decoder.singleValueContainer() | ||
if let object = try? container.decode([String: AnyJSON].self) { | ||
self = .object(object) | ||
} else if let array = try? container.decode([AnyJSON].self) { | ||
self = .array(array) | ||
} else if let string = try? container.decode(String.self) { | ||
self = .string(string) | ||
} else if let bool = try? container.decode(Bool.self) { | ||
self = .bool(bool) | ||
} else if let number = try? container.decode(Double.self) { | ||
self = .number(number) | ||
} else { | ||
throw DecodingError.dataCorrupted( | ||
.init(codingPath: decoder.codingPath, debugDescription: "Invalid JSON value.") | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// jellyfin-sdk-swift is subject to the terms of the Mozilla Public | ||
// License, v2.0. If a copy of the MPL was not distributed with this | ||
// file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
// | ||
// Copyright (c) 2023 Jellyfin & Jellyfin Contributors | ||
// | ||
|
||
import Foundation | ||
|
||
public enum SpecialFeatureType: String, Codable, CaseIterable { | ||
case unknown = "Unknown" | ||
case clip = "Clip" | ||
case trailer = "Trailer" | ||
case behindTheScenes = "BehindTheScenes" | ||
case deletedScene = "DeletedScene" | ||
case interview = "Interview" | ||
case scene = "Scene" | ||
case sample = "Sample" | ||
case themeSong = "ThemeSong" | ||
case themeVideo = "ThemeVideo" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.