mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Add local alternatives for video links
This commit is contained in:
parent
e9f214cdc0
commit
ebe51c91d7
3 changed files with 57 additions and 3 deletions
|
@ -218,11 +218,17 @@ get "/watch" do |env|
|
|||
headers = HTTP::Headers{"User-Agent" => "web:invidio.us:v0.1.0 (by /u/omarroth)"}
|
||||
begin
|
||||
reddit_comments, reddit_thread = get_reddit_comments(id, reddit_client, headers)
|
||||
reddit_html = template_comments(reddit_comments)
|
||||
|
||||
reddit_html = add_alt_links(reddit_html)
|
||||
rescue ex
|
||||
reddit_comments = JSON.parse("[]")
|
||||
reddit_thread = nil
|
||||
reddit_html = ""
|
||||
end
|
||||
|
||||
video.description = fill_links(video.description, "https", "www.youtube.com")
|
||||
video.description = add_alt_links(video.description)
|
||||
|
||||
templated "watch"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue