Skip to content

Commit

Permalink
beets: add query-path method to Client
Browse files Browse the repository at this point in the history
  • Loading branch information
nmeum committed Apr 26, 2020
1 parent be7fe9d commit 494010a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion beets/client.hy
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@
[True (raise (TypeError "invalid argument type"))]))

(defn query-items [self query]
(get (.-send-req self (+ "/item/query/" query)) "results")))
(get (.-send-req self (+ "/item/query/" query)) "results"))

;; Requiries https://github.com/beetbox/beets/pull/3567
(defn query-path [self path]
(.query-items self (.format "path:{}" (.replace path "/" "\\")))))

0 comments on commit 494010a

Please sign in to comment.