Skip to content

Commit

Permalink
Remove query parameters from URI (spotipy-dev#758)
Browse files Browse the repository at this point in the history
* made _get_id take account of ? in URI

* corrected typo

* changes to _get_id explained
  • Loading branch information
fcusson authored and IdmFoundInHim committed Dec 23, 2021
1 parent 9e5fb93 commit 10a1e00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
* Added `RedisCacheHandler`, a cache handler that stores the token info in Redis.
* Changed URI handling in `client.Spotify._get_id()` to remove qureies if provided by error.

## [2.19.0] - 2021-08-12

Expand Down
2 changes: 1 addition & 1 deletion spotipy/client.py
Expand Up @@ -1913,7 +1913,7 @@ def _get_id(self, type, id):
if type != fields[-2]:
logger.warning('Expected id of type %s but found type %s %s',
type, fields[-2], id)
return fields[-1]
return fields[-1].split("?")[0]
fields = id.split("/")
if len(fields) >= 3:
itype = fields[-2]
Expand Down

0 comments on commit 10a1e00

Please sign in to comment.