Skip to content

Commit

Permalink
Merge pull request #277 from Darkfull-Dante/master
Browse files Browse the repository at this point in the history
correction for #267
  • Loading branch information
fcusson committed Dec 17, 2021
2 parents fee0a26 + 148055f commit df2fd73
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/code_review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Docker
- [] spotcast integration load successfully
- [] spotcast sensor load successfully
- [] static uri request working
- [] search request working

## Raspberry Pi
- [] spotcast integration load successfully
- [] spotcast sensor load successfully
- [] static uri request working
- [] search request working
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__VERSION__ = "3.6.21"
__VERSION__ = "3.6.23"

bump:
bump2version --allow-dirty --current-version $(__VERSION__) patch Makefile custom_components/spotcast/manifest.json
Expand Down
2 changes: 1 addition & 1 deletion custom_components/spotcast/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"requirements": [
"spotify_token==1.0.0"
],
"version": "v3.6.22",
"version": "v3.6.23",
"dependencies": [
"spotify"
],
Expand Down
12 changes: 12 additions & 0 deletions custom_components/spotcast/spotcast_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,14 @@ def get_spotify_device_id(self, account, spotify_device_id, device_name, entity_
)
return spotify_device_id


def _clean_uri(self, uri):

# remove anything after ?
uri = uri.split("?")[0]

return uri

def play(
self,
client,
Expand All @@ -220,6 +228,10 @@ def play(
uri,
spotify_device_id,
)

# clean uri
uri = self._clean_uri(uri)

if uri.find("show") > 0:
show_episodes_info = client.show_episodes(uri)
if show_episodes_info and len(show_episodes_info["items"]) > 0:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.6.21
current_version = 3.6.23

[flake8]
exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build
Expand Down

0 comments on commit df2fd73

Please sign in to comment.