Doplarr icon indicating copy to clipboard operation
Doplarr copied to clipboard

Request titles containing slashes unsearchable

Open ivybennett-ford opened this issue 2 years ago • 2 comments

Bot tells me the search does not return a result when I query targets with slashes in the body. Have not started to fix this, logging it here so I don't forget.

I expect to be able to default to a slash-less prompt, but a successful search is apparently unsuccessful for the examples I've tried (Except for Face/Off lol)

Entering command again with previous result of same query displayed above slash-command-log

For some reason going slashless works for this title, bot not others (specifically V/H/S. but also titles in this very helpful thread) slash-command-log2

ivybennett-ford avatar Sep 08 '22 08:09 ivybennett-ford

This also happens with titles that contain an apostrophe, ' , so it probably happens with other escapable characters too.

domainzero avatar Oct 21 '22 15:10 domainzero

Yup, just encountered this with a colon. The issue is utils.clj

(defn http-request [method url key & [params]]
  (let [chan (a/promise-chan)
        put (fn [v]
              (trace "HTTP Response " v)
              (a/put! chan v))]
    (trace "Performing HTTP request" method url params)
    (hc/request
     (deep-merge
      {:method method
       :url url
       :as :json-string-keys
       :coerce :always
       :async? true
       :headers {"X-API-Key" key}}
      params)
     put
     put)
    chan))

Query:

"http://192.168.20.20:5055/api/v1/search?query=Freeway: Crack in the System",

Response:

"Parameter 'query' must be url encoded. Its value may not contain reserved characters."}]}

The-Running-Dev avatar Feb 06 '24 15:02 The-Running-Dev