summaryrefslogtreecommitdiff
path: root/qml_plugin/src/web
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-08-04 21:22:32 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-08-04 23:29:33 +0800
commit390aa8de50e36d69027c87d1670f5b73369526af (patch)
tree9650dec3c4f4ba928a6f7e86e71cb5e2245ce5d9 /qml_plugin/src/web
parent20231f0900c2fd07e40faafcd5cdbe4aff9f1375 (diff)
duckduckgo: preview_image -> image
Diffstat (limited to 'qml_plugin/src/web')
-rw-r--r--qml_plugin/src/web/duckduckgo.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/qml_plugin/src/web/duckduckgo.rs b/qml_plugin/src/web/duckduckgo.rs
index 3b73501..6de39af 100644
--- a/qml_plugin/src/web/duckduckgo.rs
+++ b/qml_plugin/src/web/duckduckgo.rs
@@ -14,7 +14,7 @@ const DUCKDUCKGO: &str = "https://duckduckgo.com";
pub struct DuckDuckGoContent {
title: String,
description_html: String,
- preview_image: Option<Url>,
+ image: Option<Url>,
}
impl From<DuckDuckGoContent> for QmlDuckDuckGo {
@@ -26,8 +26,8 @@ impl From<DuckDuckGoContent> for QmlDuckDuckGo {
description_html: value
.description_html
.into(),
- preview_image: value
- .preview_image
+ image: value
+ .image
.map(
|u| {
u.to_string()
@@ -143,7 +143,7 @@ pub async fn query(input: &str) -> anyhow::Result<DuckDuckGoContent> {
.unwrap_or(alt_desc),
),
// TODO: try also Results[*].Icon.URL and RelatedTopics[*].Icon.URL
- preview_image: resp
+ image: resp
.image
.and_then(|i| Url::parse(&format!("{DUCKDUCKGO}{i}",)).ok()),
},