Also show cover in search results
This commit is contained in:
parent
dc3bd094b2
commit
a3b1d2571e
@ -33,7 +33,7 @@
|
||||
],
|
||||
"env" : {
|
||||
"CARGO_HOME" : "/run/build/Podcasts/cargo",
|
||||
"RUSTFLAGS" : "--error-format=short --remap-path-prefix =../",
|
||||
"RUSTFLAGS" : "--error-format=human --remap-path-prefix =../",
|
||||
"RUST_BACKTRACE" : "1"
|
||||
}
|
||||
},
|
||||
|
||||
@ -96,10 +96,19 @@ impl SearchProvider {
|
||||
|
||||
let episode = dbqueries::get_episode_from_pk(id[1], show_id).unwrap();
|
||||
|
||||
let image_uri = &dbqueries::get_podcast_cover_from_id(show_id)
|
||||
.map(|cover| {
|
||||
cover
|
||||
.image_uri()
|
||||
.unwrap_or("image-x-generic-symbolic")
|
||||
.to_owned()
|
||||
})
|
||||
.unwrap_or(String::from("image-x-generic-symbolic"));
|
||||
|
||||
let meta = ResultMetadata::new(
|
||||
sp_id,
|
||||
episode.title(),
|
||||
"folder-documents-symbolic",
|
||||
image_uri,
|
||||
episode.description().unwrap_or(""),
|
||||
);
|
||||
metas.insert(0, meta);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user