mirror of
https://github.com/YGGverse/btracker.git
synced 2026-04-01 01:25:33 +00:00
fix id conversion, hold parsed hex inf-hash as the String
This commit is contained in:
parent
b69973bdd5
commit
e7fe57a861
3 changed files with 10 additions and 8 deletions
|
|
@ -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>");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue