Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ Run continuously with a delay between runs:
uv run load-data --continuous --delay 600
```

### Configure live Plex access

Provide the loader with your Plex and TMDb credentials when ingesting a live
library. You can pass them as CLI options or export the mirrored environment
variables before running the command:

```bash
uv run load-data \
--plex-url "https://plex.example.com" \
--plex-token "token-goes-here" \
--tmdb-api-key "tmdb-key" \
--qdrant-url http://localhost:6333
```

The flags above map directly to `PLEX_URL`, `PLEX_TOKEN`, and `TMDB_API_KEY`.
Setting the environment variables keeps secrets out of shell history while the
CLI options help with one-off runs. Specify `--plex-chunk-size` or its
environment twin `PLEX_CHUNK_SIZE` when Plex servers throttle large fetches;
smaller chunk sizes reduce request bursts at the cost of additional API calls.

### IMDb Retry Configuration
The loader exposes CLI flags (and mirrored environment variables) that control
how it retries IMDb lookups and how aggressively it backs off when hitting
Expand Down
26 changes: 23 additions & 3 deletions tests/test_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import pytest


def read_readme() -> str:
return Path("README.md").read_text(encoding="utf-8")


IMDB_RETRY_DOC_TOKENS = (
"--imdb-cache",
"IMDB_CACHE",
Expand All @@ -21,14 +25,30 @@


def test_readme_documents_server_cache_and_reranker_settings():
readme = Path(__file__).resolve().parent.parent / "README.md"
content = readme.read_text(encoding="utf-8")
content = read_readme()

for key in ("CACHE_SIZE", "USE_RERANKER", "PLEX_PLAYER_ALIASES"):
assert key in content


def test_readme_documents_live_plex_configuration_requirements() -> None:
readme = read_readme()

required_phrases = (
"### Configure live Plex access",
"--plex-url",
"--plex-token",
"--tmdb-api-key",
"PLEX_URL",
"PLEX_TOKEN",
"TMDB_API_KEY",
)

for phrase in required_phrases:
assert phrase in readme


@pytest.mark.parametrize("token", IMDB_RETRY_DOC_TOKENS)
def test_readme_documents_imdb_retry_controls(token: str) -> None:
readme = Path("README.md").read_text(encoding="utf-8")
readme = read_readme()
assert token in readme