Skip to content

Commit

Permalink
Merge pull request #4 from stekc/pixeebot/drip-2025-01-14-pixee-pytho…
Browse files Browse the repository at this point in the history
…n/remove-unnecessary-f-str
  • Loading branch information
stekc authored Jan 14, 2025
2 parents 1c3e83d + b5887d7 commit 9312344
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ def verify_admin(self, username: str, password: str) -> bool:


async def sanity_check():
logger.info(f"Performing sanity check...")
logger.info("Performing sanity check...")

addon_urls = [service.base_url for service in streaming_services]

logger.info(f"Addons | Checking addons...")
logger.info("Addons | Checking addons...")

for url in addon_urls:
try:
Expand All @@ -164,7 +164,7 @@ async def sanity_check():
logger.warning(f"Addons | ⚠️ {url} ({str(e)})")
continue

logger.info(f"Config | Checking config...")
logger.info("Config | Checking config...")

with open("config.json.example", "r") as f:
example_config = json.load(f)
Expand All @@ -183,18 +183,18 @@ def validate_config_structure(example: dict, current: dict, path: str = ""):

validate_config_structure(example_config, config._config)

logger.info(f"Config | ✅ The config is up to date")
logger.info("Config | ✅ The config is up to date")

if (
not config.debrid_service
and not os.getenv("MEDIAFUSION_OPTIONS")
and not (os.getenv("EASYNEWS_USERNAME") and os.getenv("EASYNEWS_PASSWORD"))
):
logger.warning(f"Config | ⚠️ No services configured")
logger.warning("Config | ⚠️ No services configured")
exit(1)

if config.debrid_service and not os.getenv("DEBRID_API_KEY"):
logger.warning(f"Config | ⚠️ Default debrid service is configured but no API key is set")
logger.warning("Config | ⚠️ Default debrid service is configured but no API key is set")
exit(1)

for service_name in config._config.get("addon_config", {}).keys():
Expand Down

0 comments on commit 9312344

Please sign in to comment.