Restyled by prettier-markdown
This commit is contained in:
parent
adb111fa8b
commit
632fc07c00
66
README.md
66
README.md
|
@ -2,28 +2,50 @@
|
|||
![Stars](https://img.shields.io/github/stars/kokarare1212/librespot-python.svg)
|
||||
![Forks](https://img.shields.io/github/forks/kokarare1212/librespot-python.svg)
|
||||
[![DeepSource](https://deepsource.io/gh/kokarare1212/librespot-python.svg/?label=active+issues&show_trend=true)](https://deepsource.io/gh/kokarare1212/librespot-python/?ref=repository-badge)
|
||||
|
||||
# Librespot-Python
|
||||
|
||||
Open Source Spotify Client
|
||||
|
||||
## About The Project
|
||||
This project was developed to make the music streaming service Spotify available on any device.
|
||||
|
||||
This project was developed to make the music streaming service Spotify available
|
||||
on any device.
|
||||
|
||||
## Note
|
||||
It is still in the idea stage, so there is a possibility of unintended behavior or major specification changes.
|
||||
We **DO NOT** encourage piracy and **DO NOT** support any form of downloader/recorder designed with the help of this repository and in general anything that goes against the Spotify ToS.
|
||||
For other guidelines, please see [CODE_OF_CONDUCT.md](https://github.com/kokarare1212/librespot-python/blob/main/CODE_OF_CONDUCT.md).
|
||||
|
||||
It is still in the idea stage, so there is a possibility of unintended behavior
|
||||
or major specification changes.
|
||||
We **DO NOT** encourage piracy and **DO NOT** support any form of
|
||||
downloader/recorder designed with the help of this repository and in general
|
||||
anything that goes against the Spotify ToS.
|
||||
For other guidelines, please see
|
||||
[CODE_OF_CONDUCT.md](https://github.com/kokarare1212/librespot-python/blob/main/CODE_OF_CONDUCT.md).
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
* [Python](https://python.org/)
|
||||
|
||||
- [Python](https://python.org/)
|
||||
|
||||
### Installation
|
||||
|
||||
Stable Version **\*still not working.**
|
||||
|
||||
```commandline
|
||||
pip install librespot
|
||||
```
|
||||
|
||||
Snapshot Version \***Recommended**
|
||||
|
||||
```commandline
|
||||
pip install git+https://github.com/kokarare1212/librespot-python
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Get Spotify's OAuth token
|
||||
|
||||
```python
|
||||
from librespot.core import Session
|
||||
|
||||
|
@ -34,7 +56,9 @@ session = Session.Builder() \
|
|||
|
||||
aceess_token = session.tokens().get("playlist-read")
|
||||
```
|
||||
|
||||
### Get Music Stream
|
||||
|
||||
\*Currently, music streaming is supported, but it may cause unintended behavior.
|
||||
|
||||
```python
|
||||
|
@ -53,24 +77,44 @@ stream = session.content_feeder().load(track_id, VorbisOnlyAudioQuality(AudioQua
|
|||
# stream.input_stream.stream().read() to get one byte of the music stream.
|
||||
# ex: 1 (If there is no more voice data, -1 is received as the result.)
|
||||
```
|
||||
Other uses are [examples](https://github.com/kokarare1212/librespot-python/tree/main/examples) or read [this document](https://librespot-python.rtfd.io) for detailed specifications.
|
||||
|
||||
Other uses are
|
||||
[examples](https://github.com/kokarare1212/librespot-python/tree/main/examples)
|
||||
or read [this document](https://librespot-python.rtfd.io) for detailed
|
||||
specifications.
|
||||
|
||||
## Debug
|
||||
To display the debug information, you need to inject the following code at the top of the code.
|
||||
|
||||
To display the debug information, you need to inject the following code at the
|
||||
top of the code.
|
||||
|
||||
```python
|
||||
import logging
|
||||
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
```
|
||||
|
||||
## Roadmap
|
||||
Please read [ROADMAP.md](https://github.com/kokarare1212/librespot-python/blob/main/ROADMAP.md).
|
||||
|
||||
Please read
|
||||
[ROADMAP.md](https://github.com/kokarare1212/librespot-python/blob/main/ROADMAP.md).
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests are welcome.
|
||||
|
||||
## License
|
||||
Distributed under the Apache-2.0 License. See [LICENSE.txt](https://github.com/kokarare1212/librespot-python/blob/main/LICENSE.txt) for more information.
|
||||
|
||||
Distributed under the Apache-2.0 License. See
|
||||
[LICENSE.txt](https://github.com/kokarare1212/librespot-python/blob/main/LICENSE.txt)
|
||||
for more information.
|
||||
|
||||
## Related Projects
|
||||
* [Librespot](https://github.com/librespot-org/librespot) (Concept)
|
||||
* [Librespot-Java](https://github.com/librespot-org/librespot-java) (Core)
|
||||
|
||||
- [Librespot](https://github.com/librespot-org/librespot) (Concept)
|
||||
- [Librespot-Java](https://github.com/librespot-org/librespot-java) (Core)
|
||||
|
||||
## Special thanks
|
||||
|
||||
Coming soon
|
||||
|
|
|
@ -16,6 +16,5 @@ currently being supported with security updates.
|
|||
|
||||
Use this section to tell people how to report a vulnerability.
|
||||
|
||||
Tell them where to go, how often they can expect to get an update on a
|
||||
reported vulnerability, what to expect if the vulnerability is accepted or
|
||||
declined, etc.
|
||||
Tell them where to go, how often they can expect to get an update on a reported
|
||||
vulnerability, what to expect if the vulnerability is accepted or declined, etc.
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
# API Reference
|
||||
Coming soon :)
|
||||
|
||||
Coming soon :)
|
||||
|
|
|
@ -7,13 +7,14 @@
|
|||
|
||||
## Contents
|
||||
|
||||
* [Get Started](index.md)
|
||||
* [Supported Futures](supported.md)
|
||||
* [API Reference](api.md)
|
||||
- [Get Started](index.md)
|
||||
- [Supported Futures](supported.md)
|
||||
- [API Reference](api.md)
|
||||
|
||||
## What's librespot-python?
|
||||
|
||||
librespot-python is a python port of Spotify's open source client library [librespot](https://github.com/librespot-org/librespot).
|
||||
librespot-python is a python port of Spotify's open source client library
|
||||
[librespot](https://github.com/librespot-org/librespot).
|
||||
|
||||
It was created to play Spotify on various platforms and devices.
|
||||
|
||||
|
@ -29,19 +30,20 @@ Please keep in mind that this library is not like Spotify approved.
|
|||
|
||||
Therefore, the worst that can happen is that you will be banned from Spotify.
|
||||
|
||||
Also, please keep in mind that this library is in alpha and may behave in unintended ways.
|
||||
Also, please keep in mind that this library is in alpha and may behave in
|
||||
unintended ways.
|
||||
|
||||
## Installation
|
||||
|
||||
You can download this library in the following way.
|
||||
You can download this library in the following way.
|
||||
|
||||
Stable Version ***still not working.**
|
||||
Stable Version **\*still not working.**
|
||||
|
||||
```commandline
|
||||
pip install librespot
|
||||
```
|
||||
|
||||
Snapshot Version ***Recommended**
|
||||
Snapshot Version **\*Recommended**
|
||||
|
||||
```commandline
|
||||
pip install git+https://github.com/kokarare1212/librespot-python
|
||||
|
@ -64,7 +66,7 @@ aceess_token = session.tokens().get("playlist-read")
|
|||
|
||||
### Get Music Stream
|
||||
|
||||
*Currently, music streaming is supported, but it may cause unintended behavior.
|
||||
\*Currently, music streaming is supported, but it may cause unintended behavior.
|
||||
|
||||
```python
|
||||
from librespot.core import Session
|
||||
|
@ -85,11 +87,12 @@ stream = session.content_feeder().load(track_id, VorbisOnlyAudioQuality(AudioQua
|
|||
|
||||
## Debug
|
||||
|
||||
To display the debug information, you need to inject the following code at the top of the code.
|
||||
To display the debug information, you need to inject the following code at the
|
||||
top of the code.
|
||||
|
||||
```python
|
||||
import logging
|
||||
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
```
|
||||
```
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
|
||||
| Get Metadata | 〇 |
|
||||
|
||||
| Play Music | △*1 |
|
||||
| Play Music | △\*1 |
|
||||
|
||||
| Spotify Connect | ×*2 |
|
||||
| Spotify Connect | ×\*2 |
|
||||
|
||||
*1 It is currently possible to retrieve the music stream, but it requires separate software for decoding.
|
||||
\*1 It is currently possible to retrieve the music stream, but it requires
|
||||
separate software for decoding.
|
||||
|
||||
*2 This feature will be added in the future.
|
||||
\*2 This feature will be added in the future.
|
||||
|
|
Loading…
Reference in New Issue