mirror of
https://github.com/Ferrite-iOS/Ferrite.git
synced 2026-01-11 20:10:27 +00:00
Premiumize: Fix service-specific errors
This parameter should be optional and errors if it isn't. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
90f44348b8
commit
796cc65016
2 changed files with 4 additions and 3 deletions
|
|
@ -203,9 +203,10 @@ public class Premiumize: OAuthDebridSource, ObservableObject {
|
|||
|
||||
let data = try await performRequest(request: &request, requestName: #function)
|
||||
let rawResponse = try jsonDecoder.decode(DDLResponse.self, from: data)
|
||||
let content = rawResponse.content ?? []
|
||||
|
||||
if !rawResponse.content.isEmpty {
|
||||
let files = rawResponse.content.map { file in
|
||||
if !content.isEmpty {
|
||||
let files = content.map { file in
|
||||
DebridIAFile(
|
||||
fileId: 0,
|
||||
name: file.path.split(separator: "/").last.flatMap { String($0) } ?? file.path,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public extension Premiumize {
|
|||
|
||||
struct DDLResponse: Codable {
|
||||
let status: String
|
||||
let content: [DDLData]
|
||||
let content: [DDLData]?
|
||||
let location: String
|
||||
let filename: String
|
||||
let filesize: Int
|
||||
|
|
|
|||
Loading…
Reference in a new issue