|
|
@ -27,7 +27,7 @@ CONFIG = Config.from_yaml(File.read("config/config.yml"))
|
|
|
|
|
|
|
|
|
|
|
|
pool_size = CONFIG.pool_size
|
|
|
|
pool_size = CONFIG.pool_size
|
|
|
|
threads = CONFIG.threads
|
|
|
|
threads = CONFIG.threads
|
|
|
|
channel_threads = 10
|
|
|
|
channel_threads = CONFIG.channel_threads
|
|
|
|
|
|
|
|
|
|
|
|
Kemal.config.extra_options do |parser|
|
|
|
|
Kemal.config.extra_options do |parser|
|
|
|
|
parser.banner = "Usage: invidious [arguments]"
|
|
|
|
parser.banner = "Usage: invidious [arguments]"
|
|
|
@ -47,6 +47,14 @@ Kemal.config.extra_options do |parser|
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
parser.on("-c THREADS", "--channel-threads=THREADS", "Number of threads for refreshing channels (default: #{channel_threads})") do |number|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
channel_threads = number.to_i
|
|
|
|
|
|
|
|
rescue ex
|
|
|
|
|
|
|
|
puts "THREADS must be integer"
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
Kemal::CLI.new
|
|
|
|
Kemal::CLI.new
|
|
|
|