Skip to content
Merged
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
33 changes: 23 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
# AnimeBox runtime configuration
# Copy to .env. Never commit .env.
# Most of these can also be changed in the UI (Settings); UI values take precedence.

# Local web server. Keep loopback unless you intentionally expose AnimeBox to LAN.
# Local web server. Keep loopback unless you intentionally expose AnimeBox to your LAN.
HOST=127.0.0.1
PORT=8787
# Extra Host header values to accept besides 127.0.0.1/localhost (JSON list), e.g. a LAN hostname.
# Requests with any other Host are rejected to block DNS-rebinding attacks.
# ALLOWED_HOSTS=["animebox.lan"]

# Relative paths resolve from project root. Absolute paths also work.
# Relative paths resolve from the AnimeBox folder. Absolute paths also work.
LIBRARY_PATH=./library
DATA_PATH=./data
DATABASE_URL=sqlite+aiosqlite:///./data/animebox.db

# DEBUG, INFO, WARNING, ERROR
LOG_LEVEL=INFO

# Optional proxy for geo-restricted providers.
# Accepted examples: http://127.0.0.1:7890 or socks5://user:password@host:1080
# Optional proxy for search, playback and downloads (they always share one network path).
# Examples: http://127.0.0.1:7890 or socks5://user:password@host:1080
# HTTP_PROXY=

# Maximum time for each search provider. Slow or blocked providers are skipped.
# Per-stage time limits for each provider, in seconds. Slow providers are reported, not waited for.
PROVIDER_SEARCH_TIMEOUT=10
PROVIDER_DETAIL_TIMEOUT=25
PROVIDER_STREAM_TIMEOUT=25

# Voiceover names, comma-separated in priority order.
PREFERRED_VOICEOVERS=AniLibria,AnimeVost,Aniliberty,Animevost
# Voiceover names, comma-separated, in priority order (case-insensitive substring match).
PREFERRED_VOICEOVERS=AniLibria,AnimeVost,Aniliberty

# Closest available stream quality is selected.
# Closest available quality not above this value is selected (360, 480, 720, 1080).
DEFAULT_QUALITY=1080

# Steam Deck optimization defaults used when enabled in UI.
# Parallel downloads (1-6).
MAX_CONCURRENT_DOWNLOADS=2

# Steam Deck optimization defaults used when enabled in Settings.
STEAM_DECK_CRF=23
STEAM_DECK_HEIGHT=720

# CORS origins use pydantic JSON list syntax when overridden.
# Idle lifetime of a playback session (seconds). Expired sessions are re-resolved automatically.
MEDIA_SESSION_TTL=14400

# CORS origins for the Vite dev server (JSON list).
# CORS_ORIGINS=["http://127.0.0.1:5173","http://localhost:5173"]
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Auto detect text files and perform LF normalization
* text=auto
# Patches are applied with git apply against LF checkouts; keep them LF on every OS.
*.patch text eol=lf
*.sh text eol=lf
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_call:
outputs:
version:
description: AnimeBox version from backend/__init__.py
value: ${{ jobs.checks.outputs.version }}

permissions:
contents: read

jobs:
checks:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v5

- uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: pip

- uses: actions/setup-node@v5
with:
node-version: '24'
cache: npm
cache-dependency-path: frontend/package-lock.json

- name: Read version
id: version
run: |
version=$(python -c "import re,pathlib; print(re.search(r'__version__ = \"([^\"]+)\"', pathlib.Path('backend/__init__.py').read_text()).group(1))")
frontend=$(node -p "require('./frontend/package.json').version")
if [ "$version" != "$frontend" ]; then
echo "backend version $version != frontend/package.json $frontend" >&2
exit 1
fi
echo "version=$version" >> "$GITHUB_OUTPUT"

- name: Fetch pinned anicli-api and apply compatibility patch
run: python scripts/patch_anicli.py --checkout

- name: Install backend dependencies
run: python -m pip install -r backend/requirements.txt

- name: Backend tests
run: python -m pytest -q

- name: Frontend install
working-directory: frontend
run: npm ci

- name: Frontend type-check, lint and tests
working-directory: frontend
run: npm run check

- name: Frontend production build
working-directory: frontend
run: npm run build

- name: No agent or temporary files are tracked
run: |
if git ls-files | grep -E '^(\.tmp|\.claude|\.codex|\.cursor)/'; then
echo "Local agent/workspace files must not be committed" >&2
exit 1
fi
Loading
Loading