Code style changes

This commit is contained in:
Arkadiusz Fal
2023-04-22 15:08:33 +02:00
parent afa0049333
commit a9e9fa3a6d
31 changed files with 52 additions and 46 deletions

View File

@@ -117,7 +117,7 @@ struct Video: Identifiable, Equatable, Hashable {
}
static func local(_ url: URL) -> Video {
Video(
Self(
app: .local,
videoID: url.absoluteString,
streams: [.init(localURL: url)]
@@ -167,7 +167,7 @@ struct Video: Identifiable, Equatable, Hashable {
static func from(_ json: JSON) -> Self {
let dateFormatter = ISO8601DateFormatter()
return Video(
return Self(
instanceID: json["instanceID"].stringValue,
app: .init(rawValue: json["app"].stringValue) ?? AccountsModel.shared.current.app ?? .local,
instanceURL: URL(string: json["instanceURL"].stringValue) ?? AccountsModel.shared.current.instance.apiURL,