diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-11-27 22:26:17 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-11-27 22:26:17 -0600 |
| commit | 4480e9c1bae261f41b132df1fb1a61695c488486 (patch) | |
| tree | 13db6f467d57f569c5a69409403d2452f80e2bc7 | |
| parent | 6033e8aed18fe44dc70641297f83857982bf9343 (diff) | |
| download | invidious-4480e9c1bae261f41b132df1fb1a61695c488486.tar.gz invidious-4480e9c1bae261f41b132df1fb1a61695c488486.tar.bz2 invidious-4480e9c1bae261f41b132df1fb1a61695c488486.zip | |
Don't downcase UCID when searching channels
| -rw-r--r-- | src/invidious.cr | 2 | ||||
| -rw-r--r-- | src/invidious/search.cr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 724ba3a6..8c57e419 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -578,7 +578,7 @@ get "/search" do |env| case key when "channel", "user" - channel = value + channel = operator.split(":")[-1] when "content_type", "type" content_type = value when "date" diff --git a/src/invidious/search.cr b/src/invidious/search.cr index 3f4274bb..97104b02 100644 --- a/src/invidious/search.cr +++ b/src/invidious/search.cr @@ -51,12 +51,12 @@ alias SearchItem = SearchVideo | SearchChannel | SearchPlaylist def channel_search(query, page, channel) client = make_client(YT_URL) - response = client.get("/user/#{channel}") + response = client.get("/user/#{channel}?disable_polymer=1&hl=en&gl=US") document = XML.parse_html(response.body) canonical = document.xpath_node(%q(//link[@rel="canonical"])) if !canonical - response = client.get("/channel/#{channel}") + response = client.get("/channel/#{channel}?disable_polymer=1&hl=en&gl=US") document = XML.parse_html(response.body) canonical = document.xpath_node(%q(//link[@rel="canonical"])) end |
