Closed jkdufair closed 3 years ago
Just occurred to me I need to update the readme with the new name and use-package
instructions. Putting this into draft.
I believe you might also need to specify the dependencies (oauth2, request, simple-httpd AFAIK) with Package-Requires headers.
@jkdufair I've made a PR to your fork with the Package-Requires
headers. With those changes, I'm able to install directly from my fork with dependencies built using straight.el (other package managers should probably work, although I haven't tested them).
@danielfm Well I think this is ready to go! Smudge is growing on me 😂. I fixed some concurrency issues as well with the initial fetch of the oauth2 token. I guess we'll want to rename the repo?
@jkdufair Done!
@danielfm Fabulous! Let me know how it's working for you. Pretty solid here. I did discover that the initial fetch to get the active device isn't terribly effective. Even though spotify indicates there is a device active in the app itself, the API does not indicate it is active until it is actually playing music. Not much we can do about that, sadly. Otherwise I believe we are good to go!
I'm hitting this error:
Debugger entered--Lisp error: (void-function browse-url-with-browser-kind)
(browse-url-with-browser-kind 'external (concat auth-url (if (string-match-p "?" auth-url) "&" "?") "client_id=" (url-hexify-string client-id) "&response_type=code" "&redirect_$
(let ((is-already-running (smudge-api-start-httpd)) (oauth-code nil)) (defalias 'httpd/smudge-api-callback #'(lambda (proc G0 G1 G2 &rest G3) (let ((--proc-- proc)) (let ((temp$
smudge-api-oauth2-request-authorization("https://accounts.spotify.com/authorize" "xxx" "playlist-read-private playlist-read-collaborative ..." nil $
(oauth2-request-access token-url client-id client-secret (smudge-api-oauth2-request-authorization auth-url client-id scope state redirect-uri) redirect-uri)
...
This is my init file:
(require 'smudge)
;; Settings
(setq smudge-oauth2-client-secret "xxx")
(setq smudge-oauth2-client-id "xxx")
(define-key smudge-mode-map (kbd "M-p") 'smudge-command-map)
(global-smudge-remote-mode)
Emacs version is 27.1.
Not sure if I'm doing something wrong.
Well, apparently that function is an Emacs 28 function. Bummer. It's so nice. Lemme try to find something else that will not try to launch eww
to do oauth2 stuff.
@danielfm Ok, I found the emacs 27 function that should work. LMK how it goes.
Testing now. Seems solid. Great work @jkdufair!
Will submit a more thorough review later.
The screenshot (smudge-api/callback
) is still different from the code (smudge-api-callback
)
Oh FFS. Fixed. And resized. Thanks @danielfm
Awesome!
Fabulous. I'll get a PR submitted to MELPA!
Looks like we are in @danielfm! Woo! Mind if I do a write up for Reddit?
Go ahead 😄
Closes #44
@danielfm I think this should address all the requirements laid out in https://github.com/melpa/melpa/blob/master/CONTRIBUTING.org.
I've tested creating a recipe from my branch and it is working correctly when installed locally. If/when you accept this PR, I can make the PR to melpa. If you want to test the recipe, it's pretty straightforward:
We will submit to melpa with your canonical repo, of course. Which may warrant a repo rename also?
There's a lot here. All renames. Every defun in every file is prefixed by spotify-client-filename. I renamed
spotify-playlist-search
tospotify-playlist
andspotify-track-search
tospotify-track
for brevity and to account for the fact those modules manage more than searching, even though they implement a search mode.Lmk if that sounds ok and/or if you see any other issues.
Thanks for considering!