background loading
This commit is contained in:
@@ -21,6 +21,8 @@ error_chain! {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct PerverzijaProvider {
|
||||
url: String,
|
||||
}
|
||||
@@ -31,12 +33,6 @@ impl PerverzijaProvider {
|
||||
}
|
||||
}
|
||||
async fn get(&self, cache:VideoCache, pool:DbPool, page: u8, featured: String) -> Result<Vec<VideoItem>> {
|
||||
//TODO
|
||||
// let mut url = Url::parse("https://example.net")?;
|
||||
// url.query_pairs_mut().append_pair("foo", "bar");
|
||||
// url.query_pairs_mut().append_pair("key", "dkhdsihdsaiufds");
|
||||
// url.query_pairs_mut().append_pair("hello", "world");
|
||||
// println!("{}", url.as_str());
|
||||
|
||||
let mut prefix_uri = "".to_string();
|
||||
if featured == "featured" {
|
||||
@@ -118,6 +114,9 @@ impl PerverzijaProvider {
|
||||
}
|
||||
}
|
||||
async fn query(&self, cache: VideoCache, pool:DbPool, page: u8, query: &str) -> Result<Vec<VideoItem>> {
|
||||
|
||||
|
||||
|
||||
let search_string = query.replace(" ", "+");
|
||||
let mut url = format!(
|
||||
"{}page/{}/?s={}",
|
||||
|
||||
Reference in New Issue
Block a user