|
|
|
|
@ -5,11 +5,11 @@
|
|
|
|
|
(eval-when (:compile-toplevel)
|
|
|
|
|
(declaim (inline json-request format-url generate-authorization download-media)))
|
|
|
|
|
|
|
|
|
|
(defun generate-authorization (token)
|
|
|
|
|
(defun generate-authorization (&optional token)
|
|
|
|
|
"generates a properly formatted authorization header"
|
|
|
|
|
(format nil *authorization-format*
|
|
|
|
|
(seanut-version) (uiop:hostname) (md5-string (uiop:hostname))
|
|
|
|
|
(seanut-version) token))
|
|
|
|
|
(seanut-version) (or token "")))
|
|
|
|
|
|
|
|
|
|
(defun format-url (domain slug &rest args)
|
|
|
|
|
"formats DOMAIN into a url, ensures we include the url scheme
|
|
|
|
|
@ -27,7 +27,7 @@ if EXTRA-HEADERS is non-nil, includes them in the headers alongside the X-Emby-A
|
|
|
|
|
if CONTENT is non-nil, passes that along to the request"
|
|
|
|
|
(parse (dex:request url :method method
|
|
|
|
|
:content content
|
|
|
|
|
:headers `(("X-Emby-Authorization" . ,auth)
|
|
|
|
|
:headers `(("Authorization" . ,auth)
|
|
|
|
|
,@extra-headers))))
|
|
|
|
|
|
|
|
|
|
(defun run-search-query (domain auth type name)
|
|
|
|
|
|