mirror of
https://gitea.invidious.io/iv-org/invidious
synced 2024-12-22 14:35:46 +01:00
Rename project
This commit is contained in:
parent
8ee5423af6
commit
383ed8b209
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,4 +4,4 @@
|
|||||||
/.shards/
|
/.shards/
|
||||||
/video_info/
|
/video_info/
|
||||||
/.vscode/
|
/.vscode/
|
||||||
visor
|
invidious
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# visor
|
# Invidious
|
||||||
|
|
||||||
Alternative frontend for YouTube
|
Alternative frontend for YouTube
|
||||||
|
|
||||||
@ -11,12 +11,12 @@ crystal deps
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
```bash
|
```bash
|
||||||
crystal run src/visor.cr
|
crystal run src/invidious.cr
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
1. Fork it ( https://github.com/omarroth/visor/fork )
|
1. Fork it ( https://gitlab.com/omarroth/invidious/fork )
|
||||||
2. Create your feature branch (git checkout -b my-new-feature)
|
2. Create your feature branch (git checkout -b my-new-feature)
|
||||||
3. Commit your changes (git commit -am 'Add some feature')
|
3. Commit your changes (git commit -am 'Add some feature')
|
||||||
4. Push to the branch (git push origin my-new-feature)
|
4. Push to the branch (git push origin my-new-feature)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
name: visor
|
name: invidious
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Omar Roth <omarroth@hotmail.com>
|
- Omar Roth <omarroth@hotmail.com>
|
||||||
|
|
||||||
targets:
|
targets:
|
||||||
visor:
|
invidious:
|
||||||
main: src/visor.cr
|
main: src/invidious.cr
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
kemal:
|
kemal:
|
||||||
|
@ -121,20 +121,16 @@ class VideoInfo
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
macro templated(filename)
|
macro templated(filename)
|
||||||
render "src/views/#{{{filename}}}.ecr", "src/views/layout.ecr"
|
render "src/views/#{{{filename}}}.ecr", "src/views/layout.ecr"
|
||||||
end
|
end
|
||||||
|
|
||||||
context = OpenSSL::SSL::Context::Client.insecure
|
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|
|
get "/" do |env|
|
||||||
templated "index"
|
templated "index"
|
@ -4,7 +4,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>Visor</title>
|
|
||||||
<meta content="">
|
<meta content="">
|
||||||
<link rel="stylesheet" href="/css/pure-min.css">
|
<link rel="stylesheet" href="/css/pure-min.css">
|
||||||
<link rel="stylesheet" href="/css/grids-responsive-min.css">
|
<link rel="stylesheet" href="/css/grids-responsive-min.css">
|
||||||
@ -12,7 +11,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="pure-menu pure-menu-horizontal">
|
<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>
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-1 pure-u-md-1-5"></div>
|
<div class="pure-u-1 pure-u-md-1-5"></div>
|
||||||
|
@ -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>
|
<video style="width: 100%" poster="<%= video_info.has_key?("iurlhq720") ? video_info["iurlhq720"] : video_info["iurlmq"] %>" controls>
|
||||||
<% fmt_stream.each do |fmt| %>
|
<% fmt_stream.each do |fmt| %>
|
||||||
<source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>">
|
<source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>">
|
||||||
|
Loading…
Reference in New Issue
Block a user