Expand description
Persistent download history.
Every download — successful or not — is appended to a JSON file in the OS config directory so the record survives app restarts.
File locations
- macOS:
~/Library/Application Support/kget/history.json - Linux:
~/.config/kget/history.json - Windows:
%APPDATA%\kget\history.json
§Example
use kget::queue::{DownloadHistory, EntryStatus, HistoryEntry};
let mut history = DownloadHistory::load();
let mut entry = HistoryEntry::new(
"https://example.com/file.iso",
"/home/user/Downloads",
None,
);
history.record(entry, EntryStatus::Completed, None);
history.save().unwrap();
for e in history.recent(10) {
println!("{} {} {}", e.created_at_display(), e.status, e.filename);
}Structs§
- Download
History - Persistent download history backed by a JSON file in the OS config dir.
- History
Entry - A single record in the download history.
Enums§
- Entry
Status - Outcome of a completed download attempt.
Functions§
- format_
unix - Format a Unix timestamp as
YYYY-MM-DD HH:MM UTCwithout external crates.