Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): add environment-only mode #167

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

s0up4200
Copy link

@s0up4200 s0up4200 commented Jan 16, 2025

Description

  • Add DISABLE_CONFIG_FILE env var to run without the need for config.yaml
  • Add missing environment variables support for all config options
  • Redact sensitive information in logs
  • Improve config loading logic and validation
# Core settings
SEASONPACKARR__DISABLE_CONFIG_FILE=false
SEASONPACKARR__HOST=0.0.0.0
SEASONPACKARR__PORT=42069
SEASONPACKARR__API_TOKEN=

# Logging settings
SEASONPACKARR__LOG_LEVEL=DEBUG
SEASONPACKARR__LOG_PATH=/config/logs/seasonpackarr.log
SEASONPACKARR__LOG_MAX_SIZE=50
SEASONPACKARR__LOG_MAX_BACKUPS=3

# Feature settings
SEASONPACKARR__SMART_MODE=false
SEASONPACKARR__SMART_MODE_THRESHOLD=0.75
SEASONPACKARR__PARSE_TORRENT_FILE=false

# Fuzzy matching settings
SEASONPACKARR__FUZZY_MATCHING_SKIP_REPACK_COMPARE=false
SEASONPACKARR__FUZZY_MATCHING_SIMPLIFY_HDR_COMPARE=false

# Notification settings
SEASONPACKARR__NOTIFICATIONS_DISCORD=
SEASONPACKARR__NOTIFICATIONS_NOTIFICATION_LEVEL=MATCH,ERROR

# Client settings (can have multiple clients by changing DEFAULT to another name)
SEASONPACKARR__CLIENTS_DEFAULT_HOST=127.0.0.1
SEASONPACKARR__CLIENTS_DEFAULT_PORT=8080
SEASONPACKARR__CLIENTS_DEFAULT_USERNAME=admin
SEASONPACKARR__CLIENTS_DEFAULT_PASSWORD=adminadmin
SEASONPACKARR__CLIENTS_DEFAULT_PREIMPORTPATH=/data/torrents/tv

@s0up4200

This comment was marked as resolved.

@nuxencs
Copy link
Owner

nuxencs commented Jan 16, 2025

this looks good to me, thanks for the contribution 😄
sure you can add env var support for notifications as well if you want to!
clients might be a bit more complex, but if you already have an idea on how to implement it, go for it 👍🏼

@s0up4200 s0up4200 changed the title feat(config): add fuzzy matching env vars support feat(config): add environment-only mode Jan 16, 2025
@s0up4200
Copy link
Author

this looks good to me, thanks for the contribution 😄 sure you can add env var support for notifications as well if you want to! clients might be a bit more complex, but if you already have an idea on how to implement it, go for it 👍🏼

Updated the OP. Works fine from my testing. Don't take my word for it though!

@s0up4200 s0up4200 force-pushed the feature/fuzzy-matching-env-vars branch from ad5ec18 to a408445 Compare January 16, 2025 21:49
@s0up4200
Copy link
Author

I notice a few changes that I should revert. I can deal with those in the morning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants