WIP: improve search #1
|
@ -253,21 +253,21 @@ fn torrent_search(
|
||||||
let mut stmt = conn.prepare(&stmt_str)?;
|
let mut stmt = conn.prepare(&stmt_str)?;
|
||||||
|
|
||||||
let torrent_iter = stmt.query_map(
|
let torrent_iter = stmt.query_map(
|
||||||
params!{
|
params![
|
||||||
query.replace(" ", "%"),
|
query.replace(" ", "%"),
|
||||||
offset.to_string(),
|
offset.to_string(),
|
||||||
size.to_string(),
|
size.to_string(),
|
||||||
},
|
],
|
||||||
|row| {
|
|row| {
|
||||||
Ok(Torrent {
|
Ok(Torrent {
|
||||||
infohash: row.get(0)?,
|
infohash: row.get(0)?,
|
||||||
name: row.get(1)?,
|
name: row.get(1)?,
|
||||||
size_bytes: row.get(2)?,
|
size_bytes: row.get(2)?,
|
||||||
created_unix: row.get(3)?,
|
created_unix: row.get(3)?,
|
||||||
seeders: row.get(4)?,
|
seeders: row.get(4)?,
|
||||||
leechers: row.get(5)?,
|
leechers: row.get(5)?,
|
||||||
completed: row.get(6)?,
|
completed: row.get(6)?,
|
||||||
scraped_date: row.get(7)?,
|
scraped_date: row.get(7)?,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
|
|
Loading…
Reference in New Issue