diff --git a/Writerside/Writerside_libraries.tree b/Writerside/Writerside_libraries.tree new file mode 100644 index 0000000..c396ef3 --- /dev/null +++ b/Writerside/Writerside_libraries.tree @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/Writerside/topics/Indexer-Settings.md b/Writerside/topics/Indexer-Settings.md index 5a61923..6c0dcfa 100644 --- a/Writerside/topics/Indexer-Settings.md +++ b/Writerside/topics/Indexer-Settings.md @@ -2,8 +2,21 @@ ## Prowlarr -| Variable | Description | Default | Example | Required (if Prowlarr enabled) | -|--------------------|-------------------------------------|-------------------------|------------------------|--------------------------------| -| `PROWLARR_ENABLED` | Set to `True` to enable Prowlarr. | `True` | `true` | No | -| `PROWLARR_API_KEY` | Your Prowlarr API key. | - | `prowlarr_api_key` | Yes | -| `PROWLARR_URL` | Base URL of your Prowlarr instance. | `http://localhost:9696` | `http://prowlarr:9696` | No | +| Variable | Description | Default | Example | +|--------------------|-------------------------------------|-------------------------|------------------------| +| `PROWLARR_ENABLED` | Set to `True` to enable Prowlarr. | `False` | `true` | +| `PROWLARR_API_KEY` | Your Prowlarr API key. | - | `prowlarr_api_key` | +| `PROWLARR_URL` | Base URL of your Prowlarr instance. | `http://localhost:9696` | `http://prowlarr:9696` | + +## Jackett + +| Variable | Description | Default | Example | +|--------------------|----------------------------------------------------|-------------------------|------------------------| +| `JACKETT_ENABLED` | Set to `True` to enable Jackett. | `False` | `true` | +| `JACKETT_API_KEY` | Your Prowlarr API key. | - | `jackett_api_key` | +| `JACKETT_URL` | Base URL of your Prowlarr instance. | `http://localhost:9117` | `http://prowlarr:9117` | +| `JACKETT_INDEXERS` | list of all indexers for Jackett to search through | `all` | `["1337x","0magnet"]` | + + + + \ No newline at end of file diff --git a/Writerside/topics/authentication-setup.md b/Writerside/topics/authentication-setup.md index 0e40c65..c7fd1e9 100644 --- a/Writerside/topics/authentication-setup.md +++ b/Writerside/topics/authentication-setup.md @@ -12,14 +12,18 @@ enable OpenID Connect (OAuth 2.0) for integration with external identity provide |-------------------------|--------------------------------------------------------------------------|-----------------|-------------------------------------------|----------| | `AUTH_TOKEN_SECRET` | Strong secret key for signing JWTs (create with `openssl rand -hex 32`). | - | `AUTH_TOKEN_SECRET=your_super_secret_key` | Yes | | `AUTH_SESSION_LIFETIME` | Lifetime of user sessions in seconds. | `86400` (1 day) | `AUTH_SESSION_LIFETIME=604800` (1 week) | No | -| `AUTH_ADMIN_EMAIL` | Email address of the administrator accounts. | - | `AUTH_ADMIN_EMAIL=admin@example.com` | Yes | +| `AUTH_ADMIN_EMAIL` | A list of email address of the administrator accounts. | - | `AUTH_ADMIN_EMAIL=admin@example.com` | Yes | | `FRONTEND_URL` | The url the frontend will be accessed from. | - | `https://mediamanager.example` | Yes | -On login/registration, every user whose email is in `AUTH_ADMIN_EMAIL` will be granted admin privileges. -Users whose email is not in `AUTH_ADMIN_EMAIL` will be regular users and will need to be verified by an administrator, +On login/registration, every user whose email is in AUTH_ADMIN_EMAIL will be granted admin privileges. +Users whose email is not in AUTH_ADMIN_EMAIL will be regular users and will need to be verified by an administrator, this can be done in the settings page. + + + + ## OpenID Connect (OAuth 2.0) | Variable | Description | Default | Example | diff --git a/Writerside/topics/configuration-backend.md b/Writerside/topics/configuration-backend.md index bd1e630..a98e486 100644 --- a/Writerside/topics/configuration-backend.md +++ b/Writerside/topics/configuration-backend.md @@ -2,12 +2,16 @@ These variables configure the core backend application, database connections, authentication, and integrations. + + + + ## General Settings -| Variable | Description | Default | -|-----------------|----------------------------------------------------------------------------------|-----------| -| `API_BASE_PATH` | The url base of the backend | `/api/v1` | -| `CORS_URLS` | Enter the origins you are going to access the api from (e.g. https://mm.example) | - | +| Variable | Description | Default | +|-----------------|----------------------------------------------------------------------------------------|-----------| +| `API_BASE_PATH` | The url base of the backend | `/api/v1` | +| `CORS_URLS` | Enter a list of origins you are going to access the api from (e.g. https://mm.example) | - | ## Database Settings @@ -65,7 +69,7 @@ generate a free API key in your account settings. ## Directory Settings - Normally you don't need to change these, as the default mountpoints are usually sufficient. In your `docker-compose.yaml`, you can just mount `/any/directory` to `/data/torrents`. + Normally you don't need to change these, as the default mountpoints are usually sufficient. In your docker-compose.yaml, you can just mount /any/directory to /data/torrents. | Variable | Description | Default | diff --git a/Writerside/topics/developer-guide.md b/Writerside/topics/developer-guide.md index 698fd7f..11a562f 100644 --- a/Writerside/topics/developer-guide.md +++ b/Writerside/topics/developer-guide.md @@ -27,19 +27,16 @@ This section is for those who want to contribute to Media Manager or understand ### Backend -- **Framework:** Python with FastAPI -- **Database ORM:** SQLAlchemy -- **Database Migrations:** Alembic -- **Dependency Management:** uv +- Python with FastAPI +- SQLAlchemy +- Pydantic and Pydantic-Settings ### Frontend -- **Framework:** SvelteKit -- **Language:** TypeScript -- **Styling:** Tailwind CSS -- **Components:** shadcn-svelte for UI components +- TypeScript with SvelteKit +- Tailwind CSS +- shadcn-svelte -### Deployment & CI/CD +### CI/CD -- Docker & Docker Compose - GitHub Actions \ No newline at end of file diff --git a/Writerside/topics/notes.topic b/Writerside/topics/notes.topic new file mode 100644 index 0000000..b289760 --- /dev/null +++ b/Writerside/topics/notes.topic @@ -0,0 +1,8 @@ + + + + + Lists have to be formatted like this: ["item1", "item2", "item3"]. Note the double quotes. + + \ No newline at end of file diff --git a/Writerside/writerside.cfg b/Writerside/writerside.cfg index baed983..2e8cca9 100644 --- a/Writerside/writerside.cfg +++ b/Writerside/writerside.cfg @@ -5,4 +5,5 @@ + \ No newline at end of file diff --git a/media_manager/auth/config.py b/media_manager/auth/config.py index 8e49eb7..1765c2e 100644 --- a/media_manager/auth/config.py +++ b/media_manager/auth/config.py @@ -7,7 +7,7 @@ class AuthConfig(BaseSettings): model_config = SettingsConfigDict(env_prefix="AUTH_") token_secret: str session_lifetime: int = 60 * 60 * 24 - admin_email: str + admin_email: list[str] = [] @property def jwt_signing_key(self): diff --git a/media_manager/indexer/config.py b/media_manager/indexer/config.py index 58c18ab..861e21e 100644 --- a/media_manager/indexer/config.py +++ b/media_manager/indexer/config.py @@ -8,7 +8,6 @@ class ProwlarrConfig(BaseSettings): url: str = "http://localhost:9696" -# TODO: add this to docs class JackettConfig(BaseSettings): model_config = SettingsConfigDict(env_prefix="JACKETT_") enabled: bool | None = False @@ -16,4 +15,4 @@ class JackettConfig(BaseSettings): url: str = "http://localhost:9696" indexers: list[str] = [ "all" - ] # needs to be formatted like this ["indexer1", "indexer2", "indexer3"] in env file (note double quotes!) + ] diff --git a/media_manager/indexer/schemas.py b/media_manager/indexer/schemas.py index d9b5ed0..dc685be 100644 --- a/media_manager/indexer/schemas.py +++ b/media_manager/indexer/schemas.py @@ -10,7 +10,6 @@ from media_manager.torrent.models import Quality IndexerQueryResultId = typing.NewType("IndexerQueryResultId", UUID) -# TODO: use something like strategy pattern to make sorting more user customizable class IndexerQueryResult(BaseModel): model_config = ConfigDict(from_attributes=True) diff --git a/web/src/lib/components/season-requests-table.svelte b/web/src/lib/components/season-requests-table.svelte index ea24305..58d02f2 100644 --- a/web/src/lib/components/season-requests-table.svelte +++ b/web/src/lib/components/season-requests-table.svelte @@ -124,6 +124,7 @@ {request.authorized_by?.email ?? 'N/A'} + {#if user().is_superuser}