chore: gitea CI, README, non-root Doku
This commit is contained in:
1 parent
0537fa435a
commit
a7372bddf1
2 files changed
+71
-20
No files matched your search
@@ -0,0 +1,32 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
backend-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -r backend/requirements.txt
|
||||
python -m pip install "git+https://github.com/nathom/streamrip.git@v2.2.0"
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd backend && python -m pytest tests/ -v
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: backend-tests
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build backend image
|
||||
run: docker build ./backend -t streamrip-ui-backend:ci
|
||||
- name: Build frontend image
|
||||
run: docker build ./frontend -t streamrip-ui-frontend:ci
|
||||
@@ -1,28 +1,35 @@
|
||||
# streamrip-ui
|
||||
|
||||
Webapp für das CLI-Tool `streamrip` (nur **Deezer**, lokal Single-User ohne Login).
|
||||
Webapp für das CLI-Tool [`streamrip`](https://github.com/nathom/streamrip) (nur **Deezer**, lokal Single-User ohne Login).
|
||||
|
||||
## Struktur
|
||||
Suchen, stöbern, laden: Titel, Alben, Artists, Playlists und Podcasts finden, Alben/Playlists als Trackliste sehen, einzelne Lieder oder ganze Sammlungen per Sammelkorb laden — alles über eine dunkle/helle Weboberfläche mit Cover-Grid und Preview-Player.
|
||||
|
||||
- `backend/` — FastAPI (nutzt `streamrip` als Library, kein Subprocess)
|
||||
- `GET /api/health`, `GET /api/sources`
|
||||
- `GET /api/search?type=track|album|artist|playlist&q=..&limit=..`
|
||||
- `POST /api/downloads` `{source, media_type, id, quality, codec, folder, no_db}`
|
||||
- `GET /api/downloads`, `GET /api/downloads/{id}`, `GET /api/downloads/{id}/events` (SSE)
|
||||
- `GET /api/history` (downloads.db + failed_downloads.db, read-only)
|
||||
- `GET/PUT /api/config` (volle config.toml, mit `.bak`-Backup + TOML-Validierung)
|
||||
- `GET /api/files?path=..` (Download-Root, Path-Traversal blockiert)
|
||||
- `frontend/` — Next.js 14 (Suche mit 4 Tabs, Cover-Grid + Preview-Player, Download-Dialog, Queue, Verlauf mit Re-Download, Dateien, Einstellungen)
|
||||
## Features
|
||||
|
||||
- **Suche** über Titel, Alben, Artists, Playlists und Podcasts (mit Cover + Preview-Player)
|
||||
- **Artist-Seiten**: Alben/EPs/Singles (sortierbar), Featuring-Näherung, ähnliche Artists
|
||||
- **Album-/Playlist-Seiten**: Trackliste mit Einzeldownloads
|
||||
- **Podcast-Seiten**: Show-Infos + Episodenliste (nur Übersicht — streamrip kann keine Podcasts laden)
|
||||
- **Entdecken**: Neuheiten, Charts und Playlists nach Genre, Genre-Sender mit aufklappbarer Trackliste
|
||||
- **Download-Dialog** mit Server-Defaults (Qualität/Codec/Ordner), **URL-Import** für Deezer-Links
|
||||
- **Sammelkorb**: Treffer seitenübergreifend sammeln, als Batch laden
|
||||
- **Queue** mit Live-Status, Logs und **Stopp**-Button; **Verlauf** mit Re-Download
|
||||
- **Einstellungen** in 5 Gruppen (Deezer-Konto/ARL, Downloads, Verhalten, Netzwerk, config.toml-Editor) — mit Validierung, Backup und maskierter ARL
|
||||
- **Dateien**: Download-Ordner browsen und Dateien per URL herunterladen
|
||||
- Hell-/Dunkelmodus, Backend-Status im Header
|
||||
|
||||
## Start (lokal)
|
||||
|
||||
Backend braucht `streamrip` 2.2.0 aus dem System (nicht auf PyPI — venv mit Systempaketen anlegen):
|
||||
|
||||
```bash
|
||||
cd backend && python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
|
||||
.venv/bin/python -m uvicorn app.main:app --port 8000
|
||||
cd backend && python3 -m venv --system-site-packages .venv \
|
||||
&& .venv/bin/pip install -r requirements.txt \
|
||||
&& .venv/bin/python -m uvicorn app.main:app --port 8000
|
||||
cd ../frontend && npm install && npm run dev
|
||||
```
|
||||
|
||||
Frontend: http://localhost:3002, Backend: http://localhost:8000 (`/api/*` wird per Rewrite proxied, lokal via `127.0.0.1:8000`, in Docker via `BACKEND_URL=http://backend:8000`).
|
||||
UI: http://localhost:3000 · API: http://localhost:8000 (`/api/*` wird per Rewrite geproxyt).
|
||||
|
||||
## Start (Docker)
|
||||
|
||||
@@ -30,14 +37,26 @@ Frontend: http://localhost:3002, Backend: http://localhost:8000 (`/api/*` wird p
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
Volumes: `~/.config/streamrip:/config` (enthält `config.toml` + DBs), `~/StreamripDownloads:/downloads`.
|
||||
- UI: http://localhost:3002 · API: http://localhost:8000
|
||||
- Volumes: `~/.config/streamrip:/config` (`config.toml` + DBs), `~/StreamripDownloads:/downloads`
|
||||
- Beide Images laufen als Non-Root-User und haben Healthchecks
|
||||
- Backend baut `streamrip` exakt auf `v2.2.0` (Git-Tag, kein PyPI-Release)
|
||||
|
||||
## ARL
|
||||
CI (`.gitea/workflows/ci.yml`): Backend-Tests + Docker-Builds beider Images bei jedem Push auf `main`.
|
||||
|
||||
Einstellungen-Seite → „Deezer ARL“-Feld (zeigt nur Status + letzte 4 Zeichen, nie den vollen Wert). Speichern schreibt nur die `arl`-Zeile mit Backup. Alternativ weiter unten im vollen `config.toml`-Editor.
|
||||
## API-Überblick (Backend)
|
||||
|
||||
- `GET /api/search?type=track|album|artist|playlist|podcast&q=..`
|
||||
- `GET /api/artist/{id}`, `GET /api/artist/{id}/related`
|
||||
- `GET /api/album/{id}`, `GET /api/playlist/{id}`, `GET /api/podcast/{id}`
|
||||
- `GET /api/discover?kind=tracks|albums|artists|playlists|new&genre_id=..`, `GET /api/discover/genres`, `GET /api/discover/radios?genre_id=..`, `GET /api/discover/radios/{id}/tracks`
|
||||
- `POST /api/downloads` (`media_type`+`id` oder `url`), `POST /api/downloads/batch`, `DELETE /api/downloads/{id}`, SSE unter `GET /api/downloads/{id}/events`
|
||||
- `GET /api/history`, `GET/PUT /api/config` (ARL maskiert), `GET/PUT /api/config/arl`, `GET/PUT /api/config/ui`
|
||||
- `GET /api/files?path=..`, `GET /api/files/download?path=..`
|
||||
|
||||
## Hinweise
|
||||
|
||||
- `~/.local/bin/rip` (pipx-Shim) ist auf diesem Rechner kaputt; das Backend importiert `streamrip` direkt als Library und braucht den Shim nicht.
|
||||
- Fortschritt v1: Job-Status + Logs via SSE (Polling 0.5s im Backend, 2s-Refresh in der Queue-Seite). Echte %-Werte pro Track erfordern Hooks in streamrips Downloadable-Layer (Follow-up).
|
||||
- Defaults (Qualität/Codec) liegen im Browser-LocalStorage (`srip-defaults`), Qualität Default 2 (FLAC) + Fallback laut config.
|
||||
- Lokal gehostet gedacht (kein Login) — nicht ins Internet stellen.
|
||||
- Echte %-Fortschritte pro Track gibt es nicht (Job-Status + Logs); Abbrüche landen als `cancelled`.
|
||||
- Podcasts: Übersicht + Episodenliste, kein Download (streamrip kann das technisch nicht).
|
||||
- Manche Deezer-Chart-Endpoints sind leer — Entdecken nutzt dann Fallbacks (z. B. Top-Playlist-Tracks).
|
||||
Reference in new issue
Block a user