Download Configuration¶
Download configuration object¶
The download configuration is a singleton used to store the downloader preferences.
Global config¶
-
DownloadConfiguration¶ -
max_downloading_tasksint¶ max concurrent download tasks
-
download_dirstring¶ the default path where downloads will be stored (base64 encoded)
-
watch_dirstring¶ special folder that will be monitored. When a new supported file (.nzb, .torrent) is copied in that folder, the task is automatically added to the download queue.
(base64 encoded)
-
use_watch_dirbool¶ if set to false, the watch_dir will not be monitored
-
throttlingDlThrottlingConfig¶ throttling configuration
-
newsDlNewsConfig¶ newsgroups configuration
-
btDlBtConfig¶ bittorrent configuration
-
feedDlFeedConfig¶ RSS feed configuration
-
blocklistDlBlockListConfig¶ block list configuration
-
dns1string¶ dns server ip to use for downloader (leave blank for default dns server)
-
dns2string¶ dns server ip to use for downloader
-
Throttling config¶
-
DlThrottlingConfig¶ -
-
scheduleenum[168]¶ The schedule array represent the list of week hours timeslot, starting on monday a midnight. Therefore the complete week is represented in a array of 168 elements (24 * 7)
Each slot can have the following value:
Type Description normal downloads will use normal DlRate config for this timeslot slow downloads will use slow DlRate config for this timeslot hibernate downloads will be paused for this timeslot
-
modeenum¶ Throttling mode can have to following values
Type Description normal force use of normal rate limits (not using the scheduler) slow force use of slow rate limits (not using the scheduler) hibernate force hibernate (not using the scheduler) schedule use scheduded rate limit
-
Newsgroups config¶
-
DlNewsConfig¶ -
serverstring¶ NNTP server hostname
-
portint¶ NNTP server port
-
sslbool¶ Use SSL to connect to server if set to true
-
userstring¶ NNTP auth username (can be empty if no auth is required)
-
passwordstring Write-only¶ NNTP auth password (can be empty if no auth is required)
-
nthreadsint¶ maximum concurrent connections to the NNTP server
-
auto_repairbool¶ automatically check and repair downloaded files using the provided par2 files
-
lazy_par2bool¶ if set to true the downloader will download the par2 files only if the download is corrupted
-
auto_extractbool¶ automatically attempt to extract downloaded files
-
erase_tmpbool¶ if auto_extract is enabled, delete archive files once successfully extracted
-
Bittorrent config¶
-
DlBtConfig¶ -
max_peersint¶ maximum number of peers at a given time
-
stop_ratioint¶ default stop_ratio for bt
DownloadtasksThis value is scaled by a factor 100, for instance a stop_ratio of 200 means that the task will stop once tx_bytes = 2 * size
A value of 0 means that the task will continue seeding until it is manually stopped
-
crypto_supportenum¶ The crypto_support can have the following values
Type Description unsupported will never use bittorrent crypto allowed will select plain during handshake preferred will select crypto during handshake required will allow plain bittorrent
-
enable_dhtbool¶ enable the dht protocol
-
enable_pexbool¶ enable the peer exchange protocol
-
announce_timeoutint¶ timeout in seconds for announcing to tracker
-
main_portint¶ main bittorrent port
-
dht_portint¶ bittorrent dht port
-
Rss Feeds config¶
BlockList config¶
-
DlBlockListConfig¶ -
sources[]string¶ list of block list URL source
The block list should be in cidr format
e.g.: http://list.iblocklist.com/?list=bt_level1&fileformat=cidr&archiveformat=
-
Get the current Download configuration¶
-
GET/api/v4/downloads/config/¶ Returns the current
DownloadConfigurationExample request:
GET /api/v4/downloads/config/ HTTP/1.1 Host: mafreebox.freebox.fr
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
{ "success": true, "result": { "feed": { "max_items": 0, "fetch_interval": 60 }, "use_watch_dir": true, "watch_dir": "L0Rpc3F1ZSBkdXIvLnF1ZXVl", /* /Disque dur/.queue */ "news": { "user": "", "erase_tmp": true, "port": 119, "nthreads": 1, "auto_repair": true, "ssl": false, "auto_extract": true, "lazy_par2": true, "server": "news.free.fr" }, "bt": { "max_peers": 50, "stop_ratio": 150, "crypto_support": "allowed" }, "max_downloading_tasks": 5, "download_dir": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv", /* /Disque dur/Téléchargements/ */ "throttling": { "normal": { "rx_rate": 0, "tx_rate": 0 }, "slow": { "rx_rate": 512, "tx_rate": 42 }, "schedule": [ "slow", "normal", "normal", [ ... ] "normal", "normal", "normal", "slow" ], "mode": "normal" } } }
Update the Download configuration¶
-
PUT/api/v4/downloads/config/¶ Updates the
DownloadConfigurationExample request:
PUT /api/v4/downloads/config/ HTTP/1.1 Host: mafreebox.freebox.fr { "throttling": { "normal": { "rx_rate": 512, "tx_rate": 40 }, "slow": { "rx_rate": 128, "tx_rate": 10 }, "mode": "normal", "schedule": [ "slow", "normal", "normal", [ ... ] "normal", "normal", "normal", "normal", "slow" ] }, "max_downloading_tasks": 5, "download_dir": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv", /* /Disque dur/Téléchargements/ */ "use_watch_dir": true, "watch_dir": "L0Rpc3F1ZSBkdXIvLnF1ZXVl", /* /Disque dur/.queue */ "news": { "server": "news.free.fr", "port": "119", "ssl": false, "nthreads": 1, "user": "", "lazy_par2": true, "auto_repair": true, "auto_extract": true, "erase_tmp": true }, "bt": { "max_peers": 50, "stop_ratio": 150, "crypto_support": "allowed" }, "feed": { "fetch_interval": 60 } }Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
{ "success": true, "result": { "feed": { "max_items": 0, "fetch_interval": 60 }, "use_watch_dir": true, "watch_dir": "L0Rpc3F1ZSBkdXIvLnF1ZXVl", /* /Disque dur/.queue */ "news": { "user": "", "erase_tmp": true, "port": 119, "nthreads": 1, "auto_repair": true, "ssl": false, "auto_extract": true, "lazy_par2": true, "server": "news.free.fr" }, "bt": { "max_peers": 50, "stop_ratio": 150, "crypto_support": "allowed" }, "max_downloading_tasks": 5, "download_dir": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv", /* /Disque dur/Téléchargements/ */ "throttling": { "normal": { "rx_rate": 512, "tx_rate": 40 }, "slow": { "rx_rate": 128, "tx_rate": 10 }, "schedule": [ "slow", "normal", "normal", "normal", [ ... ] "normal", "normal", "normal", "slow" ], "mode": "normal" } } }
Updating the current Throttling mode¶
-
PUT/api/v4/downloads/throttling¶ You can force the throttling mode using this method. You can use any of the throttling modes defined in
DlThrottlingConfig. Setting to schedule will automatically set correct throttling mode. Other values will force the throttling mode until you set it back to schedule.Example request:
PUT /api/v4/downloads/throttling HTTP/1.1 Host: mafreebox.freebox.fr { throttling: "slow" }Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
{ "success": true, "result": { "is_scheduled": false, "throttling": "slow" } }