fix an issue in list output

This commit is contained in:
2026-08-31 22:11:01 +02:00
parent 5573e945c7
commit 6d9c969b8c
2 changed files with 3 additions and 5 deletions
+2 -4
View File
@@ -41,9 +41,7 @@ extension Aria {
let gids = await latestGids.current() let gids = await latestGids.current()
if gids.indices.contains(selectedIndex) { if gids.indices.contains(selectedIndex) {
print("Picked download: \(gids[selectedIndex])") print(gids[selectedIndex])
} else {
print("Picked download at index \(selectedIndex)")
} }
} catch { } catch {
noora.error(.alert("\(error)")) noora.error(.alert("\(error)"))
@@ -70,7 +68,7 @@ extension Aria {
} }
private static func gids(from data: TableData) -> [String] { private static func gids(from data: TableData) -> [String] {
data.rows.map { $0.first?.plain() ?? "-" } data.rows.map { $0.last?.plain() ?? "-" }
} }
} }
} }
+1 -1
View File
@@ -5,7 +5,7 @@ enum Config {
static let port: Int = 6800 static let port: Int = 6800
static let secret: String = "my_secret" static let secret: String = "pizza"
static var endpoint: URL { static var endpoint: URL {
URL(string: "http://\(host):\(port)/jsonrpc")! URL(string: "http://\(host):\(port)/jsonrpc")!