This guide covers all configuration options for the Audiobook Automation System.
All configuration files are located in the config/ directory:
config/
├── config.yaml # Main application configuration
├── config.yaml.example # Template for main config
├── mam_config.json # MAM credentials (optional)
└── mam_config.json.example # Template for MAM config
server:
host: "127.0.0.1"
port: 8080
debug: falsedatabase:
path: "db.sqlite"
backup_enabled: true
backup_interval_hours: 24security:
csrf_enabled: true
token_length: 32
rate_limit:
enabled: true
max_requests: 10
window_hours: 1metadata:
rate_limit_seconds: 120 # Production: 120s, Testing: 30s
sources:
mam:
enabled: true
timeout_seconds: 30
audnex:
enabled: true
base_url: "https://api.audnex.us"
timeout_seconds: 10
audible:
enabled: true
timeout_seconds: 15notifications:
discord:
enabled: false
webhook_url: "" # Set in .env as DISCORD_WEBHOOK_URL
pushover:
enabled: false
user_key: "" # Set in .env as PUSHOVER_USER_KEY
api_token: "" # Set in .env as PUSHOVER_API_TOKENCreate a .env file for sensitive configuration:
# Required for webhook authentication
AUTOBRR_TOKEN=your-autobrr-webhook-token
# Notification services (optional)
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your/webhook/url
PUSHOVER_USER_KEY=your-pushover-user-key
PUSHOVER_API_TOKEN=your-pushover-api-token
GOTIFY_URL=https://gotify.example.com
GOTIFY_TOKEN=your-gotify-token
NTFY_URL=https://ntfy.sh/your-topicFor full MAM integration with ASIN extraction:
# Copy the example
cp config/mam_config.json.example config/mam_config.json
# Or use the setup helper
python setup_mam_config.pyEdit config/mam_config.json:
{
"email": "your-mam-email@example.com",
"password": "your-mam-password",
"base_url": "https://www.myanonamouse.net",
"timeout_seconds": 30,
"browser_settings": {
"headless": true,
"user_agent": "Mozilla/5.0 (compatible; AudiobookBot/1.0)"
}
}mam_config.json is excluded from git for security.
metadata:
rate_limit_seconds: 30 # Faster testing
server:
debug: true # Enable debug modemetadata:
rate_limit_seconds: 120 # Respectful API usage
server:
debug: false # Disable debug mode
security:
rate_limit:
max_requests: 5 # Stricter rate limitingTest your configuration:
# Test main config
python -c "from src.config import load_config; print('✅ Config valid')"
# Test MAM config (if configured)
python test_mam_login.py
# Test metadata workflow
python tests/test_metadata_workflow.pyConfig file not found:
cp config/config.yaml.example config/config.yamlMAM login fails:
- Verify credentials in
config/mam_config.json - Check if MAM requires 2FA (not currently supported)
- Test login manually on MAM website
Rate limiting too slow:
- Adjust
metadata.rate_limit_secondsin config.yaml - Use 30s for testing, 120s for production
Webhook authentication fails:
- Verify
AUTOBRR_TOKENin.envfile - Check autobrr webhook configuration
-
config/config.yamlcreated and configured -
.envfile created with required tokens -
config/mam_config.jsoncreated (if using MAM) - Configuration validated with test scripts
- Notification services tested (if enabled)
- Rate limiting configured appropriately