Hi there,
My local subsonic gonic instance is only exposed to the LAN. I don't use
a certificate for it. Currently the URL for the subsonic-host is
appended to 'https://' :
> (defun subsonic-build-url (endpoint extra-query)> "Build a valid subsonic url for a given ENDPOINT.> EXTRA-QUERY is used for any extra query parameters"> (if subsonic-auth> (concat "https://"
Could there be a defcustom to toggle https/http? Something like:
> (defgroup subsonic-ssl "https"> "Customization group for mpv."> :type 'string> :group 'subsonic)
and the function to build the url would be changed to:
> (defun subsonic-build-url (endpoint extra-query)> "Build a valid subsonic url for a given ENDPOINT.> EXTRA-QUERY is used for any extra query parameters"> (if subsonic-auth> (concat subsonic-ssl> "://"> (plist-get subsonic-auth :host)> "/rest" endpoint> (subsonic-alist->query (append `(("u" . ,(plist-get subsonic-auth :user))> ("p" . ,(funcall (plist-get subsonic-auth :secret)))> ("c" . "ElSonic")> ("v" . "1.16.0")> ("f" . "json"))> extra-query)))> (error "Failed to load .authinfo, please provide auth configuration for> subsonic, and ensure subsonic-host is set correctly")))
All a suggestion.
Thanks for the very useful package.
--
Philippe
Philippe Beliveau <pm@pbeliveau.me> writes:
> Hi there,>> My local subsonic gonic instance is only exposed to the LAN. I don't use> a certificate for it. Currently the URL for the subsonic-host is> appended to 'https://' :>>> (defun subsonic-build-url (endpoint extra-query)>> "Build a valid subsonic url for a given ENDPOINT.>> EXTRA-QUERY is used for any extra query parameters">> (if subsonic-auth>> (concat "https://">> Could there be a defcustom to toggle https/http? Something like:>>> (defgroup subsonic-ssl "https">> "Customization group for mpv.">> :type 'string>> :group 'subsonic)>> and the function to build the url would be changed to:>>> (defun subsonic-build-url (endpoint extra-query)>> "Build a valid subsonic url for a given ENDPOINT.>> EXTRA-QUERY is used for any extra query parameters">> (if subsonic-auth>> (concat subsonic-ssl>> "://">> (plist-get subsonic-auth :host)>> "/rest" endpoint>> (subsonic-alist->query (append `(("u" . ,(plist-get subsonic-auth :user))>> ("p" . ,(funcall (plist-get subsonic-auth :secret)))>> ("c" . "ElSonic")>> ("v" . "1.16.0")>> ("f" . "json"))>> extra-query)))>> (error "Failed to load .authinfo, please provide auth configuration for>> subsonic, and ensure subsonic-host is set correctly")))>> All a suggestion.>> Thanks for the very useful package.>> --> Philippe
Hi Philippe,
Thanks for the suggestion! I've added a defcustom, however I've used a
boolean rather than a string.
Hope it works as expected for you!
Alex