Fix logging for /watch URLs

This commit is contained in:
Omar Roth 2019-07-01 10:07:19 -05:00
parent 9f40b3a873
commit 0632a2d3c8
No known key found for this signature in database
GPG key ID: B8254FB7EC3D37F2

View file

@ -483,8 +483,6 @@ get "/watch" do |env|
video.description_html = replace_links(video.description_html) video.description_html = replace_links(video.description_html)
host_url = make_host_url(config, Kemal.config) host_url = make_host_url(config, Kemal.config)
host_params = env.request.query_params
host_params.delete_all("v")
if video.player_response["streamingData"]?.try &.["hlsManifestUrl"]? if video.player_response["streamingData"]?.try &.["hlsManifestUrl"]?
hlsvp = video.player_response["streamingData"]["hlsManifestUrl"].as_s hlsvp = video.player_response["streamingData"]["hlsManifestUrl"].as_s
@ -659,8 +657,6 @@ get "/embed/:id" do |env|
video.description_html = replace_links(video.description_html) video.description_html = replace_links(video.description_html)
host_url = make_host_url(config, Kemal.config) host_url = make_host_url(config, Kemal.config)
host_params = env.request.query_params
host_params.delete_all("v")
if video.player_response["streamingData"]?.try &.["hlsManifestUrl"]? if video.player_response["streamingData"]?.try &.["hlsManifestUrl"]?
hlsvp = video.player_response["streamingData"]["hlsManifestUrl"].as_s hlsvp = video.player_response["streamingData"]["hlsManifestUrl"].as_s