Spotify Lovelace Card

You are welcome to open a PR and fix it. I think it needs transpiling for older browsers

I wish I had the skills to fix such a thing. Would you consider FF and older browser?

I will add Firefox when I have time. What other browsers do you have in mind (and how old are they)?

The other one I am using, which is on my Ubuntu Touch mobile phone, is based on QtWebEngine afaik. I think it should be really up to date too.

Don’t get me wrong, I love your custom-card. I understand that you can’t fix everything at once.

Does lovelace cards normally work with that? Can you send me a link to a custom card resource you are using on that so I can see if it is transpiled?
And please continue this by adding an issue on the repo

Sure I’ll do that. Here are links to some of the cards I use, but all of them listed in my custom_updater image above, except spotify-card, work fine in Morph browser on my Ubuntu phone.



I figured this out…
It was the browser…
I’m either using Safari or Firefox on Mac

Switched to Chrome and got it working…

1 Like

Yes, see post from @tomoqv and the issue on Github

1 Like

How did you set up? I have tried it on lot of ways but doesn’t work.

If you are using Chrome then the instructions are on the Github repo page

I am using this setting in my config:

custom_updater:
  track:
    - cards
    - components
    - python_scripts
  card_urls:
    - https://raw.githubusercontent.com/kalkih/mini-media-player/master/tracker.json
    - https://raw.githubusercontent.com/kuuji/button-card/master/tracker.json
    - https://raw.githubusercontent.com/kalkih/simple-weather-card/master/tracker.json

I am also using the path specified in the custom_updater docs like this:

resources:
  - url: /customcards/lovelace/spotify-card.js
    type: module

And it just works.

I’ve made it before your answer and it is working now :slight_smile:
Thank you!

2 Likes

Hi,
Thanks a lot for the job… it is really interesting to be able to start listening to a playlist in one click.
But… would it be possible to only display 10 playlists owned by the related spotify user, instead of loading 10 suggested ones ? It seems that the API gives the possibility to specify an owner (as a user object) during the query…

Regards

Sure! I can look into this. Open an issue in the repo as I plan to work with this in the weekend
I was thinking about adding more stuff as well, any ideas?

I have a PR for the HASS chromecast library which will bring the feature of starting playback on a chromecast device and not be limited to the Spotify Connect API.

https://github.com/balloob/pychromecast/pull/275

2 Likes

Hello
I have the following error:
https://cdn.jsdelivr.net/gh/custom-cards/spotify-card@master/src/spotify-card.js:20:2 SyntaxError: fields are not currently supported
What is wrong :frowning:

@Woj which browser and version is it? And if it is Chrome or Chromium you can add a an issue ticket in the repo to followup

no - it is firefox :frowning:

If you know programming you can help me with the task of adding transpiling as a build step. Otherwise I have it on the things to do