mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 17:15:35 +00:00
filter empty values to None (librqbit#452)
This commit is contained in:
parent
0d38aa5c06
commit
3f549e2077
1 changed files with 8 additions and 2 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -235,7 +235,13 @@ async fn main() -> Result<()> {
|
|||
println!("\t\t\tadd `{i}` to index.")
|
||||
}
|
||||
|
||||
index.insert(i, only_files_size, size, list, name)
|
||||
index.insert(
|
||||
i,
|
||||
only_files_size,
|
||||
size,
|
||||
list,
|
||||
name.map(|n| n.to_string()).filter(|s| !s.is_empty()), // librqbit#452
|
||||
)
|
||||
}
|
||||
Ok(AddTorrentResponse::ListOnly(r)) => {
|
||||
if let Some(ref t) = torrent {
|
||||
|
|
@ -255,7 +261,7 @@ async fn main() -> Result<()> {
|
|||
0,
|
||||
size(&r.info),
|
||||
list(&r.info, config.index_list_limit),
|
||||
r.info.name.map(|n| n.to_string()),
|
||||
r.info.name.map(|n| n.to_string()).filter(|s| !s.is_empty()), // librqbit#452
|
||||
)
|
||||
}
|
||||
// unexpected as should be deleted
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue