From 6d9c969b8c239f91bff59205901eb33b17eee7c4 Mon Sep 17 00:00:00 2001 From: Tommaso Negri Date: Mon, 31 Aug 2026 22:11:01 +0200 Subject: [PATCH] fix an issue in list output --- Sources/aria/Commands/List.swift | 6 ++---- Sources/aria/Config.swift | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Sources/aria/Commands/List.swift b/Sources/aria/Commands/List.swift index a5be2a3..34870b8 100644 --- a/Sources/aria/Commands/List.swift +++ b/Sources/aria/Commands/List.swift @@ -41,9 +41,7 @@ extension Aria { let gids = await latestGids.current() if gids.indices.contains(selectedIndex) { - print("Picked download: \(gids[selectedIndex])") - } else { - print("Picked download at index \(selectedIndex)") + print(gids[selectedIndex]) } } catch { noora.error(.alert("\(error)")) @@ -70,7 +68,7 @@ extension Aria { } private static func gids(from data: TableData) -> [String] { - data.rows.map { $0.first?.plain() ?? "-" } + data.rows.map { $0.last?.plain() ?? "-" } } } } diff --git a/Sources/aria/Config.swift b/Sources/aria/Config.swift index cc65b5f..96ae099 100644 --- a/Sources/aria/Config.swift +++ b/Sources/aria/Config.swift @@ -5,7 +5,7 @@ enum Config { static let port: Int = 6800 - static let secret: String = "my_secret" + static let secret: String = "pizza" static var endpoint: URL { URL(string: "http://\(host):\(port)/jsonrpc")!