mirror of
https://github.com/Steffo99/patched-porobot.git
synced 2024-12-23 01:54:22 +00:00
Add proper support to custom set codes
This commit is contained in:
parent
34c396b5de
commit
e6fc162578
2 changed files with 14 additions and 12 deletions
|
@ -19,18 +19,19 @@ pub async fn main() {
|
|||
debug!("Using {} locale!", &locale);
|
||||
|
||||
debug!("Detecting set codes to fetch...");
|
||||
let known_set_codes: Vec<String> = env::var("DATA_DRAGON_SET_CODES")
|
||||
.expect("DATA_DRAGON_SET_CODES to be set")
|
||||
.split(",")
|
||||
.into();
|
||||
debug!("Using set codes: {:#?}", &known_set_codes);
|
||||
let known_set_codes: String = env::var("DATA_DRAGON_SET_CODES")
|
||||
.expect("DATA_DRAGON_SET_CODES to be set");
|
||||
let known_set_codes: Vec<&str> = known_set_codes
|
||||
.rsplit(",")
|
||||
.collect();
|
||||
debug!("Detected set codes: {:?}", &known_set_codes);
|
||||
|
||||
debug!("Creating LocalizedGlobalIndexes...");
|
||||
let globals = create_globalindexes_from_dd_latest(&locale).await;
|
||||
debug!("Created LocalizedGlobalIndexes!");
|
||||
|
||||
debug!("Creating CardIndex...");
|
||||
let cards = create_cardindex_from_dd_latest(&locale, &known_set_codes).await;
|
||||
let cards = create_cardindex_from_dd_latest(&locale, known_set_codes.into_iter()).await;
|
||||
debug!("Created CardIndex!");
|
||||
|
||||
debug!("Creating CardSearchEngine...");
|
||||
|
|
|
@ -20,18 +20,19 @@ pub async fn main() {
|
|||
debug!("Using {} locale!", &locale);
|
||||
|
||||
debug!("Detecting set codes to fetch...");
|
||||
let known_set_codes: Vec<String> = env::var("DATA_DRAGON_SET_CODES")
|
||||
.expect("DATA_DRAGON_SET_CODES to be set")
|
||||
.split(",")
|
||||
.into();
|
||||
debug!("Using set codes: {:#?}", &known_set_codes);
|
||||
let known_set_codes: String = env::var("DATA_DRAGON_SET_CODES")
|
||||
.expect("DATA_DRAGON_SET_CODES to be set");
|
||||
let known_set_codes: Vec<&str> = known_set_codes
|
||||
.rsplit(",")
|
||||
.collect();
|
||||
debug!("Detected set codes: {:?}", &known_set_codes);
|
||||
|
||||
debug!("Creating LocalizedGlobalIndexes...");
|
||||
let globals = create_globalindexes_from_dd_latest(&locale).await;
|
||||
debug!("Created LocalizedGlobalIndexes!");
|
||||
|
||||
debug!("Creating CardIndex...");
|
||||
let cards = create_cardindex_from_dd_latest(&locale, &known_set_codes).await;
|
||||
let cards = create_cardindex_from_dd_latest(&locale, known_set_codes.into_iter()).await;
|
||||
debug!("Created CardIndex!");
|
||||
|
||||
debug!("Creating CardSearchEngine...");
|
||||
|
|
Loading…
Reference in a new issue