- Tab wechselt zwischen Nav und Content - Player-Callback triggert UI-Refresh - Nach Aktionen wird refresh() aufgerufen - Key-Handling komplett neu (fokus-basiert)
99 lines
2.2 KiB
Markdown
99 lines
2.2 KiB
Markdown
# spotify-cli
|
|
|
|
Terminal-basierter Spotify Client im Stil von ncmpcpp.
|
|
|
|
## Voraussetzungen
|
|
|
|
- Python 3.8+
|
|
- Spotify Free oder Premium Account
|
|
- Spotify App in den [Spotify Developer Dashboard](https://developer.spotify.com/dashboard) angelegt
|
|
|
|
## Setup
|
|
|
|
### 1. Spotify App erstellen
|
|
|
|
1. Gehe zu https://developer.spotify.com/dashboard
|
|
2. Erstelle eine neue App
|
|
3. Setze den Redirect URI auf `http://127.0.0.1:8888/callback`
|
|
4. Kopiere die **Client ID**
|
|
|
|
### 2. Installation
|
|
|
|
```bash
|
|
cd spotify-cli
|
|
pip install -e .
|
|
```
|
|
|
|
Oder direkt:
|
|
|
|
```bash
|
|
pip install -r requirements.txt
|
|
python -m spotify_cli.main
|
|
```
|
|
|
|
### 3. Einloggen
|
|
|
|
```bash
|
|
spotify-cli --login
|
|
```
|
|
|
|
Beim ersten Start wirst du nach deiner Client ID gefragt. Der Browser öffnet sich zur Spotify-Authentifizierung.
|
|
|
|
**Wichtig:** Nach der Authentifizierung wirst du zu `http://127.0.0.1:8888/callback` weitergeleitet. Der Redirect wird fehlschlagen - das ist normal! Kopiere die **ganze URL** aus der Browser-Adresszeile und füge sie im Terminal ein.
|
|
|
|
## Benutzung
|
|
|
|
```bash
|
|
spotify-cli
|
|
```
|
|
|
|
### Tastenkombinationen
|
|
|
|
| Taste | Aktion |
|
|
|-------|--------|
|
|
| `Tab` | Zwischen Nav und Content wechseln |
|
|
| `j`/`k` oder `↑`/`↓` | Navigieren |
|
|
| `Enter` | Auswaehlen / Abspielen |
|
|
| `Space` | Play / Pause |
|
|
| `n` | Naechster Track |
|
|
| `p` | Vorheriger Track |
|
|
| `+`/`-` | Lautstaerke |
|
|
| `r` | Repeat togglen |
|
|
| `s` | Shuffle togglen |
|
|
| `/` | Suche oeffnen |
|
|
| `h` oder `Esc` | Zurueck |
|
|
| `1`-`8` | Schnellauswahl (Nav) |
|
|
| `L` | Library |
|
|
| `q` | Beenden |
|
|
|
|
**Fokus:** Mit `Tab` wechselst du zwischen der Navigation (links) und dem Content-Bereich (rechts). Die Statusleiste zeigt an, welcher Bereich aktiv ist.
|
|
|
|
### Views
|
|
|
|
- **Home**: Kuerzlich gespielte Tracks
|
|
- **Playlists**: Alle deine Playlists
|
|
- **Liked Songs**: Deine gelikten Songs
|
|
- **Recently Played**: Verlauf
|
|
- **Library**: Liked Songs, Alben, Kuenstler
|
|
- **Queue**: Warteschlange
|
|
- **Devices**: Geraete wechseln
|
|
- **Search**: Songs, Alben, Kuenstler, Playlists suchen
|
|
|
|
## Config
|
|
|
|
Config-Datei: `~/.config/spotify-cli/config.json`
|
|
|
|
```json
|
|
{
|
|
"client_id": "deine-client-id"
|
|
}
|
|
```
|
|
|
|
Token wird in `~/.config/spotify-cli/token.json` gespeichert.
|
|
|
|
## Logout
|
|
|
|
```bash
|
|
spotify-cli --logout
|
|
```
|