mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 01:03:53 +00:00
Removed requirement for examples/app.py to specify port multiple times (only SPOTIPY_REDIRECT_URI needs to contain the port) (#636)
This commit is contained in:
parent
a7b25d0f6e
commit
fa57f6d3e2
@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Changed docs for `search` to mention that you can provide multiple types to search for
|
||||
- The query parameters of requests are now logged
|
||||
- Deprecate specifing `cache_path` or `username` directly to `SpotifyOAuth`, `SpotifyPKCE`, and `SpotifyImplicitGrant` constructors, instead directing users to use the `CacheFileHandler` cache handler
|
||||
- Removed requirement for examples/app.py to specify port multiple times (only SPOTIPY_REDIRECT_URI needs to contain the port)
|
||||
|
||||
### Added
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ Prerequisites
|
||||
|
||||
Run app.py
|
||||
|
||||
python3 -m flask run --port=8080
|
||||
python3 app.py OR python3 -m flask run
|
||||
NOTE: If receiving "port already in use" error, try other ports: 5000, 8090, 8888, etc...
|
||||
(will need to be updated in your Spotify app and SPOTIPY_REDIRECT_URI variable)
|
||||
"""
|
||||
@ -123,4 +123,5 @@ Following lines allow application to be run more conveniently with
|
||||
(Also includes directive to leverage pythons threading capacity.)
|
||||
'''
|
||||
if __name__ == '__main__':
|
||||
app.run(threaded=True, port=int(os.environ.get("PORT", 8080)))
|
||||
app.run(threaded=True, port=int(os.environ.get("PORT",
|
||||
os.environ.get("SPOTIPY_REDIRECT_URI", 8080).split(":")[-1])))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user