Skip to content

Commit

Permalink
fix wrong release
Browse files Browse the repository at this point in the history
  • Loading branch information
fondberg committed Jul 4, 2020
1 parent c4519db commit 4cf2bc2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
13 changes: 7 additions & 6 deletions dist/spotify-card.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/spotify-card.js.map

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions dist/spotify-card.umd.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default [
name: 'spotifyCard',
file: pkg.browser,
format: 'umd',
sourcemap: true
},
plugins: [
resolve(), // so Rollup can find `ms`
Expand Down
6 changes: 4 additions & 2 deletions src/SpotifyCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class SpotifyCard extends Component {

this.dataRefreshToken = setInterval(async () => {
await this.refreshPlayData();
}, 5000); // TODO: check if we can use the mp.spotify state instead?
}, 10000); // TODO: check if we can use the mp.spotify state instead?
}

componentWillUnmount() {
Expand Down Expand Up @@ -120,8 +120,10 @@ export default class SpotifyCard extends Component {
} else if (this.props.dailyMixes) {
const res = await this.props.hass.callWS({
type: 'spotcast/playlists',
playlist_type: 'discover-weekly'
});
playlists = res.content.items;
console.log("HERE:", res);
playlists = res.items;
} else {
playlists = await fetch('https://api.spotify.com/v1/me/playlists?limit=' + this.props.limit, { headers })
.then(r => r.json())
Expand Down
3 changes: 1 addition & 2 deletions src/spotify-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ styleElement.textContent = `
flex-flow: row nowrap;
align-items: center;
border-top: 1px solid ${styles.lightBlack};
height: 42px;
}
.playlist:active {
background-color: rgb(200, 200, 240);
Expand Down Expand Up @@ -220,7 +219,7 @@ class SpotifyCardWebComponent extends HTMLElement {
this.config.client_id = this.getAttribute('client_id');
}
const mountPoint = document.createElement('div');
this.shadow.appendChild(styleElement);
this.shadow.appendChild(styleElement.cloneNode(true));
this.shadow.appendChild(mountPoint);
render(
html`
Expand Down

0 comments on commit 4cf2bc2

Please sign in to comment.