Skip to content

Commit

Permalink
Fix issue with library blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
Radiicall committed Apr 20, 2023
1 parent a7a7b47 commit 43d3106
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Config {
.to_string()))
});
}
let mut library_blacklist: Vec<String> = vec!["none".to_string()];
let mut library_blacklist: Vec<String> = vec!["".to_string()];
if !Option::is_none(&jellyfin["LIBRARY_BLACKLIST"].get(0)) {
library_blacklist.pop();
jellyfin["LIBRARY_BLACKLIST"]
Expand Down
11 changes: 7 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
blacklist_check = &content.media_type != x
}
});
for library in &config.blacklist.libraries {
if blacklist_check && !content.media_type.is_none() {
blacklist_check =
library_check(&config.url, &config.api_key, &content.item_id, library).await;
if !config.blacklist.libraries[0].is_empty() {
for library in &config.blacklist.libraries {
if blacklist_check && !content.media_type.is_none() {
blacklist_check =
library_check(&config.url, &config.api_key, &content.item_id, library)
.await;
}
}
}

Expand Down

0 comments on commit 43d3106

Please sign in to comment.