From 43d31064e71e13a8bc79fdd4ee9792d9c0f6c1da Mon Sep 17 00:00:00 2001 From: Radiicall <66682497+Radiicall@users.noreply.github.com> Date: Thu, 20 Apr 2023 09:40:38 +0200 Subject: [PATCH] Fix issue with library blacklist --- src/config.rs | 2 +- src/main.rs | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/config.rs b/src/config.rs index 2ffde35..b1ee432 100644 --- a/src/config.rs +++ b/src/config.rs @@ -106,7 +106,7 @@ impl Config { .to_string())) }); } - let mut library_blacklist: Vec = vec!["none".to_string()]; + let mut library_blacklist: Vec = vec!["".to_string()]; if !Option::is_none(&jellyfin["LIBRARY_BLACKLIST"].get(0)) { library_blacklist.pop(); jellyfin["LIBRARY_BLACKLIST"] diff --git a/src/main.rs b/src/main.rs index a93475c..fd76346 100644 --- a/src/main.rs +++ b/src/main.rs @@ -127,10 +127,13 @@ async fn main() -> Result<(), Box> { 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; + } } }