updated download command to use SearchResult struct
This commit is contained in:
parent
b00669a167
commit
d8c47bd905
|
@ -57,14 +57,14 @@ extension Seanut {
|
|||
let newPath = outputPath.appendingPathComponent(rootInfo.name!)
|
||||
createDirectory(String(newPath.absoluteString.suffix(newPath.absoluteString.count - 7)))
|
||||
|
||||
let childReq: Request<[Item]> = Seanut.jellyfinRequest(
|
||||
result: [Item()],
|
||||
let childReq: Request<SearchResult> = Seanut.jellyfinRequest(
|
||||
result: SearchResult(),
|
||||
config: DownloadCommand.config,
|
||||
path: "/Items",
|
||||
method: .get,
|
||||
query: [("userId", DownloadCommand.userId!), ("parentId", id)]
|
||||
)
|
||||
guard let childInfo = try? await DownloadCommand.client.send(childReq).value else {
|
||||
guard let childInfo = try? await DownloadCommand.client.send(childReq).value.items else {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -4,4 +4,8 @@ struct User: Codable {
|
|||
let id: String?
|
||||
|
||||
init() { id = nil }
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id = "Id"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue