Class: AppleEpf::AriaDownloadProcessor
Instance Method Summary
collapse
#get_file_md5, #initialize
Instance Method Details
#download ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'lib/apple_epf/download_processor/aria_download_processor.rb', line 7
def download
command = "cd #{File.dirname(@download_to)} && aria2c --continue --check-integrity=true --checksum=md5=#{@md5_checksum} -x#{AppleEpf.concurrent_downloads} -j#{AppleEpf.concurrent_downloads} -s#{AppleEpf.concurrent_downloads} --http-user=#{AppleEpf.apple_id} --http-passwd=#{AppleEpf.apple_password} -o #{File.basename(@download_to)} #{@apple_filename_full}"
result = system(command)
unless result
raise AppleEpf::DownloaderError.new("Unable to download file. #{$?}")
end
end
|
#download_and_check ⇒ Object
2
3
4
5
|
# File 'lib/apple_epf/download_processor/aria_download_processor.rb', line 2
def download_and_check
get_file_md5
download
end
|