use shared btracker-scrape library, update btracker-fs API to v0.2

This commit is contained in:
yggverse 2025-09-09 14:39:31 +03:00
parent 6bc739c0b3
commit ea9c632bad
7 changed files with 40 additions and 156 deletions

View file

@ -55,9 +55,9 @@ impl Feed {
/// Append `item` to the feed `channel`
pub fn push(&mut self, torrent: Torrent) {
let info_hash = torrent.info_hash.as_string();
self.buffer.push_str(&format!(
"<item><guid>{}</guid><title>{}</title><link>{}</link>",
torrent.info_hash,
"<item><guid>{info_hash}</guid><title>{}</title><link>{}</link>",
escape(
&torrent
.name
@ -65,7 +65,7 @@ impl Feed {
.map(|b| b.to_string())
.unwrap_or("?".into()) // @TODO
),
self.canonical.link(&torrent.info_hash)
self.canonical.link(&info_hash)
));
self.buffer.push_str("<description>");