Support Rust librespot credential format in stored_file()
Adds fallback logic to load credentials from Rust librespot's OAuth flow. The stored_file() method now handles both Python and Rust credential formats. Related to #277
This commit is contained in:
12
README.md
12
README.md
@@ -91,6 +91,18 @@ session = Session.Builder() \
|
||||
.create()
|
||||
```
|
||||
|
||||
### Use Stored Credentials for Login
|
||||
|
||||
```python
|
||||
from librespot.core import Session
|
||||
|
||||
# Supports both Python and Rust librespot credential formats
|
||||
|
||||
session = Session.Builder() \
|
||||
.stored_file("/path/to/credentials.json") \
|
||||
.create()
|
||||
```
|
||||
|
||||
### Get Spotify's OAuth token
|
||||
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user