Skip to content

Commit

Permalink
Remove temp fix for token
Browse files Browse the repository at this point in the history
  • Loading branch information
fondberg committed Oct 19, 2019
1 parent 74d9bcf commit 4579bcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Community post: https://community.home-assistant.io/t/spotcast-custom-component-
_Now with support for speaker groups, transferring playback to and between chromecast devices and using HA entity id instead of device_name_.

***Important***
Release 2.2 Uses a quick fix for getting the spotify webplayer token.
Release 2.1 requires Home Assistant 0.99 due to update in pychromecast version.
As of release 2 the sensor is optional. To add it add it to the configs sensor section.

Expand Down
6 changes: 3 additions & 3 deletions custom_components/spotcast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import random
import time

_VERSION = '2.3.0'
_VERSION = '2.4.0'
DOMAIN = 'spotcast'

_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -82,8 +82,8 @@ def get_chromecast_device(device_name):
raise HomeAssistantError('Could not find device with name {}'.format(device_name))

def get_spotify_token(username, password):
from .spotify_token import start_session
data = start_session(username, password)
import spotify_token as st
data = st.start_session(username, password)
access_token = data[0]
expires = data[1] - int(time.time())
return access_token, expires
Expand Down
3 changes: 1 addition & 2 deletions custom_components/spotcast/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"requirements": [
"fondberg-spotipy==2.4.5-dev2",
"pychromecast==4.0.1",
"beautifulsoup4==4.8.0",
"lxml==4.4.1"
"spotify_token==0.1.1"
],
"homeassistant": "0.99.0",
"dependencies": [
Expand Down

0 comments on commit 4579bcc

Please sign in to comment.