diff options
author | Yoni Rabkin <yoni@rabkins.net> | 2021-04-07 11:10:30 -0400 |
---|---|---|
committer | Yoni Rabkin <yoni@rabkins.net> | 2021-04-07 11:10:30 -0400 |
commit | 5c72f041893a2a88aa01ccb7828c498145fe1ac1 (patch) | |
tree | 312dc91a0d163e858b917430b8214ae3a96b0593 | |
parent | 488d38b879867cf4c2df052cfda4a36a2ca1394f (diff) |
* emms-librefm-stream.el: authinfo for streaming
make `emms-librefm-stream-tune-handshake-string' use authinfo as well
-rw-r--r-- | emms-librefm-stream.el | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/emms-librefm-stream.el b/emms-librefm-stream.el index c46a060..bfab2af 100644 --- a/emms-librefm-stream.el +++ b/emms-librefm-stream.el @@ -87,19 +87,17 @@ point after the HTTP headers." (defun emms-librefm-stream-tune-handshake-string () "Create the tune handshake string." - (when (not emms-librefm-scrobbler-username) - (error "null username")) - (when (not emms-librefm-scrobbler-password) - (error "null password")) - (let ((url (concat emms-librefm-stream-connect-method - emms-librefm-stream-host-url - "/radio/handshake.php?" - "version=1.3.0.58" "&" - "platform=linux" "&" - "username=" (url-encode-url emms-librefm-scrobbler-username) "&" - "passwordmd5=" (md5 emms-librefm-scrobbler-password) "&" - "language=en"))) - url)) + (let ((username (emms-librefm-scrobbler--username)) + (password (emms-librefm-scrobbler--password))) + (let ((url (concat emms-librefm-stream-connect-method + emms-librefm-stream-host-url + "/radio/handshake.php?" + "version=1.3.0.58" "&" + "platform=linux" "&" + "username=" (url-encode-url username) "&" + "passwordmd5=" (md5 password) "&" + "language=en"))) + url))) (defun emms-librefm-stream-tune-handshake-call () "Make the tune handshake call." |