From 89082b1448b26cc08cc39cf588ef246d7303476c Mon Sep 17 00:00:00 2001 From: Denis Date: Sat, 24 Apr 2021 17:50:43 +0700 Subject: [PATCH] Update examples ...just to make it clear. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4d74518..dbeaa55 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ from librespot.core import Session session = Session.Builder() \ - .user_pass("", "") \ + .user_pass("Username", "Password") \ .create() aceess_token = session.tokens().get("playlist-read") @@ -38,16 +38,16 @@ aceess_token = session.tokens().get("playlist-read") \*Currently, music streaming is supported, but it may cause unintended behavior. ```python from librespot.core import Session +from librespot.metadata import TrackId +from librespot.player.codecs import AudioQuality, VorbisOnlyAudioQuality session = Session.Builder() \ - .user_pass("", "") \ + .user_pass("Username", "Password") \ .create() -track_id = TrackId.from_uri("") - +track_id = TrackId.from_uri("spotify:track:xxxxxxxxxxxxxxxxxxxxxx") 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 ``` Please read [this document](https://librespot-python.rtfd.io) for detailed specifications.