diff options
| author | Omar Roth <omarroth@hotmail.com> | 2017-11-29 18:12:23 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2017-11-29 18:12:23 -0600 |
| commit | 383ed8b20986fcf1fbd120dba2db94697eecfe3a (patch) | |
| tree | f1d08972fb981746366e3573a82496732ce780bd /src | |
| parent | 8ee5423af6276433030fac04eee2627457e08b1d (diff) | |
| download | invidious-383ed8b20986fcf1fbd120dba2db94697eecfe3a.tar.gz invidious-383ed8b20986fcf1fbd120dba2db94697eecfe3a.tar.bz2 invidious-383ed8b20986fcf1fbd120dba2db94697eecfe3a.zip | |
Rename project
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr (renamed from src/visor.cr) | 12 | ||||
| -rw-r--r-- | src/views/layout.ecr | 3 | ||||
| -rw-r--r-- | src/views/watch.ecr | 1 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/visor.cr b/src/invidious.cr index 1a484c38..5a1c605a 100644 --- a/src/visor.cr +++ b/src/invidious.cr @@ -121,20 +121,16 @@ class VideoInfo ) end - macro templated(filename) render "src/views/#{{{filename}}}.ecr", "src/views/layout.ecr" end context = OpenSSL::SSL::Context::Client.insecure -client = HTTP::Client.new("www.youtube.com", 443, context) - - -video_id = "Vufba_ZcoR0" -video_info = client.get("/get_video_info?video_id=#{video_id}&el=info&ps=default&eurl=&gl=US&hl=en").body - -p VideoInfo.from_json(video_info) +# client = HTTP::Client.new("www.youtube.com", 443, context) +# video_id = "Vufba_ZcoR0" +# video_info = client.get("/get_video_info?video_id=#{video_id}&el=info&ps=default&eurl=&gl=US&hl=en").body +# p VideoInfo.from_json(video_info) get "/" do |env| templated "index" diff --git a/src/views/layout.ecr b/src/views/layout.ecr index 611cf691..93a40f5a 100644 --- a/src/views/layout.ecr +++ b/src/views/layout.ecr @@ -4,7 +4,6 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Visor</title> <meta content=""> <link rel="stylesheet" href="/css/pure-min.css"> <link rel="stylesheet" href="/css/grids-responsive-min.css"> @@ -12,7 +11,7 @@ <body> <div class="pure-menu pure-menu-horizontal"> - <a href="" class="pure-menu-heading pure-menu-link">VIDEO</a> + <a href="" class="pure-menu-heading pure-menu-link">Invidious</a> </div> <div class="pure-g"> <div class="pure-u-1 pure-u-md-1-5"></div> diff --git a/src/views/watch.ecr b/src/views/watch.ecr index 6894bf92..199643df 100644 --- a/src/views/watch.ecr +++ b/src/views/watch.ecr @@ -1,3 +1,4 @@ +<title><%= video_info["title"] %> - Invidious</title> <video style="width: 100%" poster="<%= video_info.has_key?("iurlhq720") ? video_info["iurlhq720"] : video_info["iurlmq"] %>" controls> <% fmt_stream.each do |fmt| %> <source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>"> |
