From 32f4946530d03944bff5555d8e636db1e8dc8b40 Mon Sep 17 00:00:00 2001 From: spinline Date: Sun, 8 Feb 2026 05:28:14 +0300 Subject: [PATCH] fix: show N/A for magnet link dates Magnet links don't have creation_date, so timestamp is 0. Now shows 'N/A' instead of 01/01/1970 00:00 --- frontend/src/components/torrent/table.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/components/torrent/table.rs b/frontend/src/components/torrent/table.rs index e77c18b..bead9e0 100644 --- a/frontend/src/components/torrent/table.rs +++ b/frontend/src/components/torrent/table.rs @@ -46,6 +46,9 @@ fn format_duration(seconds: i64) -> String { } fn format_date(timestamp: i64) -> String { + if timestamp <= 0 { + return "N/A".to_string(); + } let dt = chrono::DateTime::from_timestamp(timestamp, 0); match dt { Some(dt) => dt.format("%d/%m/%Y %H:%M").to_string(),