Metadata-Version: 2.4
Name: librelyrics-spotify
Version: 2.0.0
Summary: Spotify lyrics provider plugin for LibreLyrics
Author-email: libre-lyrics <libre-lyrics@users.noreply.github.com>
License: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/libre-lyrics/librelyrics-spotify
Project-URL: Repository, https://github.com/libre-lyrics/librelyrics-spotify
Project-URL: Issues, https://github.com/libre-lyrics/librelyrics-spotify/issues
Keywords: lyrics,spotify,lrc,synced-lyrics,librelyrics,plugin
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: librelyrics>=1.2.0
Requires-Dist: requests>=2.28.0
Dynamic: license-file

# librelyrics-spotify

Spotify lyrics provider plugin for [LibreLyrics](https://github.com/libre-lyrics/librelyrics).

## Features

- Fetch synced and unsynced lyrics from Spotify
- Support for track, album, and playlist URLs
- TOTP-based authentication with Spotify's internal API

## Installation

```bash
pip install librelyrics-spotify
```

## Configuration

Requires a Spotify `sp_dc` cookie. The TOTP secret dictionary URL is built in
as the default, and you can override it in configuration if that source is
blocked in your environment. The configured value takes priority when set.
Set it up via:

```bash
librelyrics config edit
```

Or set it directly:

```bash
librelyrics config set plugins.Spotify.sp_dc "YOUR_SP_DC_COOKIE"
```

To override the TOTP secret source, set:

```bash
librelyrics config set plugins.Spotify.totp_secret_cipher_dict_url "https://github.com/xyloflake/spot-secrets-go/blob/main/secrets/secretDict.json?raw=true"
```

### Getting your `sp_dc` cookie

1. Open [Spotify Web Player](https://open.spotify.com) in your browser
2. Log in to your account
3. Open Developer Tools (F12) → Application → Cookies
4. Find the `sp_dc` cookie and copy its value

## Supported URLs

- `https://open.spotify.com/track/<id>`
- `https://open.spotify.com/album/<id>`
- `https://open.spotify.com/playlist/<id>`

## Usage

Once installed, the plugin is automatically discovered by LibreLyrics:

```bash
librelyrics "https://open.spotify.com/track/4PTG3Z6ehGkBFwjybzWkR8"
```

## License

GPL-3.0-or-later
