~amk/subsonic.el

42c2e0b5b81c78741c069c8cfdb9e5d494157dc8 — Alex McGrath 3 months ago 68ff526
Add an option to use non ssl connections
2 files changed, 12 insertions(+), 1 deletions(-)

M README.md
M subsonic.el
M README.md => README.md +4 -0
@@ 31,10 31,14 @@ Example use-package config:
Use the `subsonic` command to open a transient with commonly used
commands available.


Available settings:
- `subsonic-host` to the domain of the subsonic server, used to find
  the correct authinfo entry
- `subsonic-enable-art` to `t` to enable album art
- `subsonic-mpv-default-volume` to set default mpv volume
- `subsonic-ssl` set to `nil` to use a http connection when communcating
  with the subsonic server, defaults to `t`

## Info


M subsonic.el => subsonic.el +8 -1
@@ 69,6 69,11 @@ Used to find the correct authinfo entry."
  :type 'string
  :group 'subsonic)

(defcustom subsonic-ssl t
  "Chooose either a https or http connection to subsonic."
  :type 'boolean
  :group 'subsonic)

(defvar subsonic-mpv--volume subsonic-default-volume)
(defvar subsonic-mpv--process nil)
(defvar subsonic-mpv--queue nil)


@@ 191,7 196,9 @@ reverted upon image load and N specifies the index"
  "Build a valid subsonic url for a given ENDPOINT.
EXTRA-QUERY is used for any extra query parameters"
  (if subsonic-auth
      (concat "https://"
      (concat (if subsonic-ssl
				  "https://"
				"http://")
              (plist-get subsonic-auth :host)
              "/rest" endpoint
              (subsonic-alist->query (append `(("u" . ,(plist-get subsonic-auth :user))