Change README.md

This commit is contained in:
kokarare1212 2021-09-12 13:33:39 +09:00
parent d9078983f4
commit 2790f484c8
No known key found for this signature in database
GPG Key ID: 9FB32C7C7D874F7A
3 changed files with 19 additions and 37 deletions

View File

@ -16,17 +16,14 @@ on any device.
This repository has been completely rewritten from the transplant.<br>
There may be some functions that are not implemented yet.<br>
If so, please feel free to open an issue.
If so, please feel free to open an issue.<br>
## 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).
or major specification changes.<br>
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.<br>
For other guidelines, please see [CODE_OF_CONDUCT.md](https://github.com/kokarare1212/librespot-python/blob/main/CODE_OF_CONDUCT.md).<br>
## Getting Started
@ -65,7 +62,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.<br>
```python
from librespot.core import Session
@ -73,15 +70,13 @@ from librespot.metadata import TrackId
from librespot.player.codecs import VorbisOnlyAudioQuality
from librespot.audio.decoders import AudioQuality
session = Session.Builder()
.user_pass("Username", "Password")
session = Session.Builder() \
.user_pass("Username", "Password") \
.create()
track_id = TrackId.from_uri("spotify:track:xxxxxxxxxxxxxxxxxxxxxx")
stream = session.content_feeder().load(track_id, VorbisOnlyAudioQuality(AudioQuality.AudioQuality.VERY_HIGH), False,
None)
stream = session.content_feeder().load(track_id, VorbisOnlyAudioQuality(AudioQuality.AudioQuality.VERY_HIGH), False, None)
# 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
@ -101,11 +96,6 @@ import logging
logging.basicConfig(level=logging.DEBUG)
```
## Roadmap
Please read
[ROADMAP.md](https://github.com/kokarare1212/librespot-python/blob/main/ROADMAP.md).
## Contributing
Pull requests are welcome.

View File

@ -1,2 +0,0 @@
# Roadmap
2021/03/28: **\*Eliminate circular importing.**

View File

@ -14,29 +14,23 @@
## What's librespot-python?
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.
[librespot](https://github.com/librespot-org/librespot). <br>
It was created to play Spotify on various platforms and devices.<br>
## What do you need?
In order to develop with this library, you need to use Python.
Python can be downloaded from [the official website here](https://python.org/).
In order to develop with this library, you need to use Python.<br>
Python can be downloaded from [the official website here](https://python.org/). <br>
## Disclaimer
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.
Please keep in mind that this library is not like Spotify approved.<br>
Therefore, the worst that can happen is that you will be banned from Spotify.<br>
Also, please keep in mind that this library is in alpha and may behave in unintended ways.<br>
## Installation
You can download this library in the following way.
You can download this library in the following way.<br><br>
Stable Version **\*still not working.**
```commandline
@ -66,7 +60,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.<br>
```python
from librespot.core import Session
@ -74,8 +68,8 @@ from librespot.metadata import TrackId
from librespot.player.codecs import VorbisOnlyAudioQuality
from librespot.audio.decoders import AudioQuality
session = Session.Builder()
.user_pass("Username", "Password")
session = Session.Builder() \
.user_pass("Username", "Password") \
.create()
track_id = TrackId.from_uri("spotify:track:xxxxxxxxxxxxxxxxxxxxxx")