fix id conversion, hold parsed hex inf-hash as the String

This commit is contained in:
yggverse 2025-09-09 15:43:31 +03:00
parent b69973bdd5
commit e7fe57a861
3 changed files with 10 additions and 8 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>{info_hash}</guid><title>{}</title><link>{}</link>",
"<item><guid>{}</guid><title>{}</title><link>{}</link>",
&torrent.info_hash,
escape(
&torrent
.name
@ -65,7 +65,7 @@ impl Feed {
.map(|b| b.to_string())
.unwrap_or("?".into()) // @TODO
),
self.canonical.link(&info_hash)
self.canonical.link(&torrent.info_hash)
));
self.buffer.push_str("<description>");