class YtDownloader::Downloader::YtDl
Public Class Methods
new(**options)
click to toggle source
# File lib/yt_downloader/downloader/yt_dl.rb, line 8 def initialize(**options) @destination = options.fetch(:destination) @audio_format = options.fetch(:audio_format) end
Public Instance Methods
call(url)
click to toggle source
# File lib/yt_downloader/downloader/yt_dl.rb, line 13 def call(url) # `youtube-dl -x -o #{destination}/%\\(title\\)s.%\\(ext\\)s --audio-format #{format} -f best #{bookmark.url}` `youtube-dl -x -o #{@destination}/%\\(title\\)s.%\\(ext\\)s --audio-format #{@audio_format} -f best --external-downloader aria2c --external-downloader-args '-c -j 3 -x 3 -s 3 -k 1M' #{url}` end