Giter Club home page Giter Club logo

Comments (28)

welkeletter avatar welkeletter commented on May 30, 2024 6

Just found this little project. It's awesome! I was also hoping that a save song button would de awesome, but I see you're already working on that.
Keep up the good work! Cheers!

from spotmenu.

IgorAdams avatar IgorAdams commented on May 30, 2024 3

I really love SpotMenu but need so much like button, +100500 on this feature

from spotmenu.

camdenb avatar camdenb commented on May 30, 2024 1

Looks great! Anything I can do to help?

from spotmenu.

kmikiy avatar kmikiy commented on May 30, 2024

Hi, currently I use the AppleScript API to get information from Spotify, unfortunately it does not provide an endpoint to save / modify / delete tracks from a users playlist / saved library.
A plausible way to add this feature anyhow would be to use the Web API, but this would require the user to authenticate the application with their Spotify account.

from spotmenu.

camdenb avatar camdenb commented on May 30, 2024

I'd also like this feature. What are your thoughts on allowing the user to sign in for additional features such as this? I'd be willing to work on this functionality, it's just a matter of whether you think that this is "in-scope" for SpotMenu. :)

from spotmenu.

kmikiy avatar kmikiy commented on May 30, 2024

I think it would be a neat feature as well, I sometimes wish I had this feature too 😄. But since this is an open source project, I don't know how I could securely store a client_id and client_secret. I wouldn't to ask users to create their own Spotify App just to use this feature. If you have any ideas that would be great!

from spotmenu.

camdenb avatar camdenb commented on May 30, 2024

That's a really good point that I hadn't thought of. I suppose we could spin up a small server solely to serve these keys (maybe using https://aws.amazon.com/lambda/)? Looks like Lambda has a pretty sweet free tier. I haven't used it myself but I've heard good things. Let me know what you think!

from spotmenu.

kmikiy avatar kmikiy commented on May 30, 2024

I've never used Lambda before either.

Spotify authorization flows
So you think we should set up a Lambda server so we can use the Authorization Code Flow?

from spotmenu.

camdenb avatar camdenb commented on May 30, 2024

Actually, looks like we won't need to. Check this out: https://developer.spotify.com/web-api/authorization-guide/#implicit-grant-flow

Whoop, looks like we still need to store an ID somewhere.

Reviewing the docs for a third time, it looks like we don't need a secret key. Hooray!

These are some stellar docs, btw.

from spotmenu.

kmikiy avatar kmikiy commented on May 30, 2024

I haven't read the documentation thoroughly yet, but I think the problem with the Implicit Grand Flow is that the user won't receive a refresh token and once the access token expires the user will have to login again, which would be really annoying. I don't know how long an issued access token is valid. If it's valid for more than a couple a months, then this is ok, but using a toking that expires weekly or even hourly wouldn't be such a great idea.

from spotmenu.

camdenb avatar camdenb commented on May 30, 2024

Ooh, yeah, good point. Looks like the token expires after one hour. Might not be the best solution. :)

Then yeah looks like Lambda might be a good option. I'm more of a web dev guy myself (I've played around with OS X dev but it's certainly not my strong suit), so perhaps I can work on the Lambda business and you can work on the OS X side (which besides the UI would include providing a callback URI)?

from spotmenu.

kmikiy avatar kmikiy commented on May 30, 2024

I started implementing this "add to your music" button feature.

Currently, this is the backend: https://github.com/kmikiy/kmikiy-for-spotify which runs on Heroku. I am using a free dyno for this. The url for the backend is this: http://kmikiy-for-spotify.herokuapp.com/

The client side is being developed on the save-button branch. Right now only logging in works, that is, retrieving access and refresh tokens, and nothing else.

I'll try to add the actual save feature as soon as possible. Also, there is a lot of boilerplate code to write for example refreshing access tokens, querying whether or not the current song is saved already and displaying a ✔︎ and ✘ accordingly, etc.

from spotmenu.

kmikiy avatar kmikiy commented on May 30, 2024

Checkout the save-button branch, build it and see how it works (follow the steps in the README.md to build it).

Known issues:

  • If you restart the SpotMenu you will have to login again
  • After you login the "save button" will only be updated when you skip to the next song
  • If the popover hasn't been open for more than an hour then the save button might show the correct symbol until you skip to the next song (this is due to the that the access token may have expired and might not have been refreshed yet)
  • There is no sign out button yet 😅

from spotmenu.

kmikiy avatar kmikiy commented on May 30, 2024

@camdenb

Looks great! Anything I can do to help?

If you could find out why it keeps hogging so much memory even after the webview has been dismissed that would be great 😃

from spotmenu.

ManWithBear avatar ManWithBear commented on May 30, 2024

Hi @kmikiy, how are you on this enhancement? I can try help in my free time, are you interested in it?

from spotmenu.

kmikiy avatar kmikiy commented on May 30, 2024

Hey @ManWithBear
I haven't really been working on it lately. But if youre willing to help id be glad to start working on it again.
The changes from the main branch need to be merged in to the save-button branch.
In my previous comments I mentioned the current state of the save-button branch and its issues.
Basically those need to be fixed and evrything should be working fine.
If youre good at debugging memory leaks then that would help because im concerned about the current way spotify login works now. I think it might be leaking

from spotmenu.

ZSaber1 avatar ZSaber1 commented on May 30, 2024

Update on this?
Would be keen on getting this as a feature, if at all possible now :))

from spotmenu.

kmikiy avatar kmikiy commented on May 30, 2024

@Zazerr To be honest I haven't worked on this feature for a while due to Spotify's limitations. I'll get back to this after I finish the requests that are currently in work in progress state

from spotmenu.

lyapustin avatar lyapustin commented on May 30, 2024

Hey, it would be amazing to see this feature. Thanks!

from spotmenu.

CasperVerswijvelt avatar CasperVerswijvelt commented on May 30, 2024

Would still love this aswell

from spotmenu.

deecypher avatar deecypher commented on May 30, 2024

+1...This would be a great feature!

from spotmenu.

ZSaber1 avatar ZSaber1 commented on May 30, 2024

I no longer use Mac, but I would just like to say that I think this feature would still be great if it is possible to implement.

from spotmenu.

swillsea avatar swillsea commented on May 30, 2024

+1 on this feature

from spotmenu.

fharper avatar fharper commented on May 30, 2024

+1

from spotmenu.

martin-888 avatar martin-888 commented on May 30, 2024

+1

from spotmenu.

JxxIT avatar JxxIT commented on May 30, 2024

Anything I can do to contribute to this?

from spotmenu.

rayepeng avatar rayepeng commented on May 30, 2024

up up up

from spotmenu.

martin-braun avatar martin-braun commented on May 30, 2024

I found an alternative that uses Spotifys API instead of their AppleScript API: https://github.com/Peter-Schorn/SoftPlayer

from spotmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.