Skip to content

Commit

Permalink
feat(deep_links): add LocalSearchItemDeepLinks
Browse files Browse the repository at this point in the history
  • Loading branch information
tymmesyde committed Jan 2, 2024
1 parent f0c2dcf commit 49b40d8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/deep_links/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,3 +565,20 @@ impl From<&String> for SearchHistoryItemDeepLinks {
}
}
}

#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct LocalSearchItemDeepLinks {
pub search: String,
}

impl From<&String> for LocalSearchItemDeepLinks {
fn from(query: &String) -> Self {
LocalSearchItemDeepLinks {
search: format!(
"stremio:///search?query={}",
utf8_percent_encode(query, URI_COMPONENT_ENCODE_SET),
),
}
}
}

0 comments on commit 49b40d8

Please sign in to comment.