ok.porn
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use std::vec;
|
||||
use std::{fs, vec};
|
||||
use error_chain::error_chain;
|
||||
use futures::future::join_all;
|
||||
use serde_json::error::Category;
|
||||
@@ -44,7 +44,13 @@ impl Provider for AllProvider {
|
||||
) -> Vec<VideoItem> {
|
||||
let mut sites_str = options.clone().sites.unwrap();
|
||||
if sites_str.is_empty() {
|
||||
sites_str = "perverzija,hanime,spankbang,pmvhaven,redtube,pornhub,rule34video".to_string();
|
||||
let files = fs::read_dir("./src/providers").unwrap();
|
||||
let providers = files.map(|entry| entry.unwrap().file_name())
|
||||
.filter(|name| name.to_str().unwrap().ends_with(".rs"))
|
||||
.filter(|name| !name.to_str().unwrap().contains("mod.rs") && !name.to_str().unwrap().contains("all.rs"))
|
||||
.map(|name| name.to_str().unwrap().replace(".rs", ""))
|
||||
.collect::<Vec<String>>();
|
||||
sites_str = providers.join(",");
|
||||
}
|
||||
let sites = sites_str
|
||||
.split(',')
|
||||
|
||||
Reference in New Issue
Block a user