144 lines
3.4 KiB
Markdown
144 lines
3.4 KiB
Markdown
# Lidarr Spotify Frontend
|
|
|
|
Web-Frontend, um Alben aus Spotify zu suchen und an Lidarr zu uebergeben.
|
|
|
|
## Features
|
|
|
|
- Albumsuche ueber Spotify API
|
|
- Track-Auswahl pro Album
|
|
- Uebergabe an Lidarr als Album-Download (MissingAlbumSearch)
|
|
- Einstellung im Frontend: ueberfluessige Dateien nach Download loeschen (optional)
|
|
- Button fuer Lidarr Bibliothek-Update
|
|
- Button fuer Frontend Git-Update (fetch/pull)
|
|
- Bibliotheksscan und \"Vorhanden/Fehlt\" Markierung
|
|
- Playlist-Import (Spotify, YouTube mit API-Key)
|
|
- Job-Statusanzeige fuer Downloads
|
|
- Docker-ready
|
|
|
|
## Voraussetzungen
|
|
|
|
- Spotify App mit `Client ID` und `Client Secret`
|
|
- Laufendes Lidarr mit API-Key
|
|
- In Lidarr existierender `Root Folder` (z. B. `/music`)
|
|
|
|
## Konfiguration
|
|
|
|
1. Beispiel kopieren:
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
```
|
|
|
|
2. Werte in `.env` setzen.
|
|
|
|
## Start mit Docker Compose
|
|
|
|
```bash
|
|
docker compose up --build -d
|
|
```
|
|
|
|
Danach erreichbar unter: [http://localhost:3000](http://localhost:3000)
|
|
|
|
## Unraid: Build + Template automatisch aktualisieren/anlegen
|
|
|
|
Du brauchst am Anfang nur `start.sh` auf dem Host.
|
|
|
|
Beispiel:
|
|
|
|
```bash
|
|
mkdir -p /mnt/user/appdata/Lidarr-Frontend
|
|
cd /mnt/user/appdata/Lidarr-Frontend
|
|
# start.sh hier ablegen
|
|
bash start.sh
|
|
```
|
|
|
|
Danach macht das Skript automatisch:
|
|
|
|
- Repo in diesem Ordner clonen (oder aktualisieren)
|
|
- Docker-Image bauen
|
|
- Unraid-Template erstellen/aktualisieren
|
|
- Template-Seite in Unraid oeffnen
|
|
|
|
Alternativ (wenn du schon im Repo bist), einmalig:
|
|
|
|
```bash
|
|
chmod +x start.sh scripts/run-unraid.sh
|
|
```
|
|
|
|
Danach reicht:
|
|
|
|
```bash
|
|
./start.sh
|
|
```
|
|
|
|
`start.sh` macht:
|
|
|
|
- legt automatisch den Zielordner an (`/boot/config/custom/lidarr-spotify-frontend`)
|
|
- cloned das Repo dorthin (oder pullt Updates)
|
|
- Build vom Docker-Image
|
|
- Unraid-Template automatisch erstellen/aktualisieren
|
|
- direkten Sprung zur Unraid Template-Seite: `Docker/AddContainer?xmlTemplate=user/...`
|
|
|
|
Defaults fuer das Bootstrap-Verhalten:
|
|
|
|
```bash
|
|
INSTALL_DIR=/boot/config/custom/lidarr-spotify-frontend
|
|
REPO_URL=https://forgejo.tailef61c0.ts.net/openclaw/lidarr-spotify-frontend.git
|
|
REPO_BRANCH=main
|
|
```
|
|
|
|
Optional:
|
|
|
|
- `SKIP_GIT_PULL=1` ueberspringt das Pull bei vorhandenem Repo
|
|
|
|
Optional kannst du Werte in `.env.unraid` (oder `.env`) ablegen, z. B.:
|
|
|
|
```bash
|
|
SPOTIFY_CLIENT_ID=xxx
|
|
SPOTIFY_CLIENT_SECRET=yyy
|
|
LIDARR_URL=http://192.168.1.50:8686
|
|
LIDARR_API_KEY=zzz
|
|
LIDARR_ROOT_FOLDER=/music
|
|
IMAGE_REPO=ghcr.io/dein-user/lidarr-spotify-frontend
|
|
IMAGE_TAG=latest
|
|
UNRAID_URL=http://tower
|
|
```
|
|
|
|
Alternativ direkt per Umgebungsvariablen:
|
|
|
|
```bash
|
|
SPOTIFY_CLIENT_ID=xxx \
|
|
SPOTIFY_CLIENT_SECRET=yyy \
|
|
LIDARR_URL=http://192.168.1.50:8686 \
|
|
LIDARR_API_KEY=zzz \
|
|
LIDARR_ROOT_FOLDER=/music \
|
|
IMAGE_REPO=ghcr.io/dein-user/lidarr-spotify-frontend \
|
|
IMAGE_TAG=latest \
|
|
UNRAID_URL=http://tower \
|
|
./start.sh
|
|
```
|
|
|
|
Direkt `run-unraid.sh` ausführen (ohne Auto-Open/ohne git pull):
|
|
|
|
```bash
|
|
./scripts/run-unraid.sh
|
|
```
|
|
|
|
Das Skript:
|
|
|
|
- baut das Docker-Image
|
|
- aktualisiert ein vorhandenes Unraid-Template unter `/boot/config/plugins/dockerMan/templates-user/`
|
|
- legt das Template neu an, falls es noch nicht existiert
|
|
|
|
## Wichtige Hinweise
|
|
|
|
- Lidarr arbeitet artist-zentriert. Die App versucht den Artist zuerst anzulegen und danach das Album in Lidarr zu finden.
|
|
- Track-Auswahl wird auf Lidarr-Tracknamen gemappt. Bei stark abweichenden Titeln kann die Zuordnung unvollstaendig sein.
|
|
- Die Cleanup-Option versucht unselektierte Track-Dateien ueber die Lidarr API zu loeschen, falls diese bereits vorhanden sind.
|
|
|
|
## Lokaler Start ohne Docker
|
|
|
|
```bash
|
|
npm install
|
|
npm start
|
|
```
|