Invidious is an alternative front-end to YouTube
Clarify crawl option
Omar Roth58410e09f7af
diff --git a/config/config.yml b/config/config.ymlindex ad8ccd98..e631793f 100644--- a/config/config.yml+++ b/config/config.yml@@ -1,4 +1,4 @@-threads: 5+crawl_threads: 5channel_threads: 5video_threads: 5db:diff --git a/src/helpers.cr b/src/helpers.crindex d0c74d5c..34224e24 100644--- a/src/helpers.cr+++ b/src/helpers.cr@@ -15,7 +15,7 @@ endclass ConfigYAML.mapping({- threads: Int32,+ crawl_threads: Int32,channel_threads: Int32,video_threads: Int32,db: NamedTuple(diff --git a/src/invidious.cr b/src/invidious.crindex bb6ccf20..a24ad3dc 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -25,15 +25,15 @@ require "./helpers"CONFIG = Config.from_yaml(File.read("config/config.yml"))-threads = CONFIG.threads+crawl_threads = CONFIG.crawl_threadschannel_threads = CONFIG.channel_threadsvideo_threads = CONFIG.video_threadsKemal.config.extra_options do |parser|parser.banner = "Usage: invidious [arguments]"- parser.on("-t THREADS", "--youtube-threads=THREADS", "Number of threads for crawling (default: #{threads})") do |number|+ parser.on("-t THREADS", "--crawl-threads=THREADS", "Number of threads for crawling (default: #{crawl_threads})") do |number|begin- threads = number.to_i+ crawl_threads = number.to_irescue exputs "THREADS must be integer"exit@@ -73,7 +73,7 @@ YT_URL = URI.parse("https://www.youtube.com")REDDIT_URL = URI.parse("https://api.reddit.com")LOGIN_URL = URI.parse("https://accounts.google.com")-threads.times do+crawl_threads.times dospawn doids = Deque(String).newrandom = Random.new