|
|
@ -22,7 +22,7 @@ require "./helpers"
|
|
|
|
|
|
|
|
|
|
|
|
threads = 10
|
|
|
|
threads = 10
|
|
|
|
|
|
|
|
|
|
|
|
OptionParser.parse! do |parser|
|
|
|
|
Kemal.config.extra_options do |parser|
|
|
|
|
parser.banner = "Usage: invidious [arguments]"
|
|
|
|
parser.banner = "Usage: invidious [arguments]"
|
|
|
|
parser.on("-t THREADS", "--threads=THREADS", "Number of threads for crawling (default: 10)") do |number|
|
|
|
|
parser.on("-t THREADS", "--threads=THREADS", "Number of threads for crawling (default: 10)") do |number|
|
|
|
|
begin
|
|
|
|
begin
|
|
|
@ -111,7 +111,7 @@ 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
|
|
|
|
|
|
|
|
|
|
|
|
get "/" do |env|
|
|
|
|
get "/" do |env|
|
|
|
|
top = rank_videos(PG_DB, 120)
|
|
|
|
top = rank_videos(PG_DB, 120)
|
|
|
|