How to generate a DLC file for JDownloader?

17k views Asked by At

I have a few dozen URLs (in plain text), and I'd like to generate a .dlc file containing those URLs. I'll add the .dlc file to JDownloader for download. The links are not sensitive or secret, so I don't care if the .dlc file is encrypted or not. Preferably, I'd like to do this without using any web service.

In this question I'm not interested in out-of-the-box solutions, e.g. adding links to JDownloader without using a .dlc file. I'm interested in creating a .dlc file which can be added to the most recent version of JDownloader.

I've found https://github.com/jphastings/ruby-DLC and it has generated a .dlc file, but I couldn't successfully add it to JDownloader. Visiting http://127.0.0.1:10025/action/add/container/grabber1//tmp/ruby-DLC/lib/my_dlc.dlc returned Container opened. (/tmp/ruby-DLC/lib/my_dlc.dlc), and it worked for a rapidshare.com link, but JDownloader popped up a dialog box asking for user confirmation, and I want to avoid that.

2

There are 2 answers

1
Adam On

Add the links to jDownloader, and select all. Right Click, Select "Create DLC Container"

0
Júlio Campos On

If you know a little of Ruby you can use the gem dlc.

# Creating a new container
container = DLC::Package.new # Starting container
container.name = 'Name of Package' 
container.add_link(links) # Adding a array of links

# Writing 
open("#{container.name}.dlc", "w") do |f|
  f.write container.dlc
end

So you can automatize your JDownloader to search for DLCs in folders and auto-start download.