mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-07-30 16:46:25 -04:00
Hey! @maxdorninger, could you please take a look on the other one ;) ? Closes #145 ; seems like a must have thing - Add `auth.registration_enabled` flag (default `false` — sounds safer default in current setup) - Password registration: `/auth/register` route will return 403 if disabled - OIDC registration: `UserManager.oauth_callback` is overridden to reject user without match; so no auto-provision - `/auth/metadata` exposes the flag to the frontend - Frontend: signup link hidden on the login card; direct navigation to `/login/signup` redirects to `/login` via a `+page.ts` load guard <img width="463" height="461" alt="Screenshot 2026-05-16 at 20 52 11" src="https://github.com/user-attachments/assets/1def5142-e930-4aa6-8771-cbff54250c1f" /> <img width="450" height="391" alt="Screenshot 2026-05-16 at 20 52 22" src="https://github.com/user-attachments/assets/b4013964-cace-4aeb-a848-48ced86fcc5f" /> Also this means uses need to be created somehow -- so.. - Add POST `/users` - admin-protected endpoint to create a new users (created user can be used with OIDC) - Fronted: Add new user button and modal dialog <img width="800" height="379" alt="Screenshot 2026-05-17 at 11 32 06" src="https://github.com/user-attachments/assets/048e6c43-a1c1-42ce-a19c-fd9d916a47d9" /> <img width="537" height="439" alt="Screenshot 2026-05-17 at 11 32 12" src="https://github.com/user-attachments/assets/3f83c2c1-027b-4279-b6a1-bbc8da77efed" /> --- <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Add config toggle to enable/disable user registration; when disabled sign-up endpoints return 403 and OIDC won’t auto-create unknown users. Added admin API to create users. * **Frontend** * Login UI hides signup link when registration is disabled; signup page redirects to login. Admin users list gains “Add User” modal to create users. * **Documentation** * Authentication docs and config examples updated to document the new option. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/maxdorninger/MediaManager/pull/543?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
173 lines
5.0 KiB
TOML
173 lines
5.0 KiB
TOML
# MediaManager Example Configuration File
|
|
# This file contains all available configuration options for MediaManager
|
|
# Documentation: https://maxdorninger.github.io/MediaManager/
|
|
#
|
|
# This is an example configuration file that gets copied to your config folder
|
|
# on first boot. You should modify the values below to match your setup.
|
|
|
|
[misc]
|
|
# it's very likely that you need to change this for MediaManager to work
|
|
frontend_url = "http://localhost:8000" # note the lack of a trailing slash
|
|
cors_urls = ["http://localhost:8000"] # note the lack of a trailing slash
|
|
|
|
image_directory = "/data/images"
|
|
tv_directory = "/data/tv"
|
|
movie_directory = "/data/movies"
|
|
torrent_directory = "/data/torrents" # this is where MediaManager will search for the downloaded torrents and usenet files
|
|
|
|
# you probaly don't need to change this
|
|
development = false
|
|
|
|
# Custom Media Libraries
|
|
# These paths should match your volume mounts in docker-compose.yaml
|
|
# Example: if you mount "./movies:/media/movies" then use path = "/media/movies/subdirectory"
|
|
[[misc.tv_libraries]]
|
|
name = "Live Action"
|
|
path = "/data/tv/live-action" # Change this to match your actual TV shows location
|
|
|
|
[[misc.movie_libraries]]
|
|
name = "Documentary"
|
|
path = "/data/movies/documentary" # Change this to match your actual movies location
|
|
|
|
[database]
|
|
host = "db"
|
|
port = 5432
|
|
user = "MediaManager"
|
|
password = "MediaManager"
|
|
dbname = "MediaManager"
|
|
|
|
[auth]
|
|
email_password_resets = false # if true, you also need to set up SMTP (notifications.smtp_config)
|
|
registration_enabled = false # if false, the sign-up page is disabled and OIDC will not auto-create new users
|
|
|
|
token_secret = "CHANGE_ME_GENERATE_RANDOM_STRING" # generate a random string with "openssl rand -hex 32", e.g. here https://www.cryptool.org/en/cto/openssl/
|
|
session_lifetime = 86400 # this is how long you will be logged in after loggin in, in seconds
|
|
|
|
# Admin users: Users who register with these email addresses will automatically become administrators
|
|
# If no users exist in the database, a default admin user will be created with the first email in this list
|
|
admin_emails = ["admin@example.com", "admin2@example.com"]
|
|
|
|
# OpenID Connect settings
|
|
[auth.openid_connect]
|
|
enabled = false
|
|
client_id = ""
|
|
client_secret = ""
|
|
configuration_endpoint = "https://openid.example.com/.well-known/openid-configuration"
|
|
name = "OpenID"
|
|
|
|
[notifications]
|
|
# SMTP settings for email notifications and email password resets
|
|
[notifications.smtp_config]
|
|
smtp_host = "smtp.example.com"
|
|
smtp_port = 587
|
|
smtp_user = "admin"
|
|
smtp_password = "admin"
|
|
from_email = "mediamanager@example.com"
|
|
use_tls = true
|
|
|
|
# Email notification settings
|
|
[notifications.email_notifications]
|
|
enabled = false
|
|
emails = ["admin@example.com", "admin2@example.com"] # List of email addresses to send notifications to
|
|
|
|
# Gotify notification settings
|
|
[notifications.gotify]
|
|
enabled = false
|
|
api_key = ""
|
|
url = "https://gotify.example.com"
|
|
|
|
# Ntfy notification settings
|
|
[notifications.ntfy]
|
|
enabled = false
|
|
url = "https://ntfy.sh/your-topic"
|
|
|
|
# Pushover notification settings
|
|
[notifications.pushover]
|
|
enabled = false
|
|
api_key = ""
|
|
user = ""
|
|
|
|
[torrents]
|
|
# qBittorrent settings
|
|
[torrents.qbittorrent]
|
|
enabled = false
|
|
host = "http://localhost"
|
|
port = 8080
|
|
username = "admin"
|
|
password = "admin"
|
|
|
|
# Transmission settings
|
|
[torrents.transmission]
|
|
enabled = false
|
|
username = "admin"
|
|
password = "admin"
|
|
https_enabled = true
|
|
host = "localhost"
|
|
port = 9091
|
|
path = "/transmission/rpc" # RPC request path target, usually "/transmission/rpc"
|
|
|
|
# SABnzbd settings
|
|
[torrents.sabnzbd]
|
|
enabled = false
|
|
host = "http://localhost"
|
|
port = 8080
|
|
api_key = ""
|
|
base_path = "/api"
|
|
|
|
[indexers]
|
|
# Prowlarr settings
|
|
[indexers.prowlarr]
|
|
enabled = false
|
|
url = "http://localhost:9696"
|
|
api_key = ""
|
|
timeout_seconds = 60
|
|
|
|
# Jackett settings
|
|
[indexers.jackett]
|
|
enabled = false
|
|
url = "http://localhost:9117"
|
|
api_key = ""
|
|
indexers = ["1337x", "torrentleech"] # List of indexer names to use
|
|
timeout_seconds = 60
|
|
|
|
# Title-based scoring rules
|
|
[[indexers.title_scoring_rules]]
|
|
name = "prefer_h265"
|
|
keywords = ["h265", "hevc", "x265", "h.265", "x.265"]
|
|
score_modifier = 100
|
|
negate = false
|
|
|
|
[[indexers.title_scoring_rules]]
|
|
name = "avoid_cam"
|
|
keywords = ["cam", "camrip", "bdscr", "ddc", "dvdscreener","dvdscr", "hdcam", "hdtc", "hdts", "scr", "screener","telesync", "ts", "webscreener", "tc", "telecine", "tvrip"]
|
|
score_modifier = -10000
|
|
negate = false
|
|
|
|
# Indexer flag-based scoring rules
|
|
[[indexers.indexer_flag_scoring_rules]]
|
|
name = "prefer_freeleech"
|
|
flags = ["freeleech", "freeleech75"]
|
|
score_modifier = 100
|
|
negate = false
|
|
|
|
[[indexers.indexer_flag_scoring_rules]]
|
|
name = "reject_nuked"
|
|
flags = ["nuked"]
|
|
score_modifier = -10000
|
|
negate = false
|
|
|
|
# Scoring rulesets
|
|
[[indexers.scoring_rule_sets]]
|
|
name = "default"
|
|
libraries = ["ALL_TV", "ALL_MOVIES"]
|
|
rule_names = ["prefer_h265", "avoid_cam", "reject_nuked", "prefer_freeleech"]
|
|
|
|
# its very unlikely that you need to change this
|
|
[metadata]
|
|
[metadata.tmdb]
|
|
tmdb_relay_url = "https://metadata-relay.dorninger.co/tmdb"
|
|
primary_languages = [""]
|
|
default_language = "en"
|
|
|
|
[metadata.tvdb]
|
|
tvdb_relay_url = "https://metadata-relay.dorninger.co/tvdb" |