1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-15 17:20:06 +00:00
qBittorrent/src/webui/www/private/download.html

169 lines
7.6 KiB
HTML
Raw Normal View History

2017-11-02 12:14:27 +03:00
<!DOCTYPE html>
<html lang="${LANG}">
2018-04-05 11:59:31 +08:00
<head>
<meta charset="UTF-8" />
<title>QBT_TR(Add Torrent Links)QBT_TR[CONTEXT=downloadFromURL]</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/Window.css" type="text/css" />
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
<script src="scripts/lib/mootools-1.2-more.js"></script>
<script src="scripts/download.js"></script>
<script src="scripts/misc.js"></script>
</head>
2018-04-05 11:59:31 +08:00
<body>
<iframe id="download_frame" name="download_frame" class="invisible" src="javascript:false;"></iframe>
<form action="api/v2/torrents/add" enctype="multipart/form-data" method="post" id="downloadForm" style="text-align: center;" target="download_frame">
<div style="text-align: center;">
<br/>
<h2 class="vcenter">QBT_TR(Download Torrents from their URLs or Magnet links)QBT_TR[CONTEXT=HttpServer]</h2>
<textarea id="urls" rows="10" name="urls"></textarea>
<p>QBT_TR(Only one link per line)QBT_TR[CONTEXT=HttpServer]</p>
<fieldset class="settings" style="border: 0; text-align: left; margin-top: 6px;">
<table style="margin: auto;">
2018-10-24 22:15:40 -04:00
<tr>
<td>
<label for="autoTMM">QBT_TR(Torrent Management Mode:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
</td>
<td>
<select id="autoTMM" name="autoTMM" onchange="changeTMM(this)">
<option selected value="false">Manual</option>
<option value="true">Automatic</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="savepath">QBT_TR(Save files to location:)QBT_TR[CONTEXT=HttpServer]</label>
</td>
<td>
<input type="text" id="savepath" name="savepath" style="width: 16em;" />
</td>
</tr>
<tr>
<td>
<label for="cookie">QBT_TR(Cookie:)QBT_TR[CONTEXT=HttpServer]</label>
</td>
<td>
<input type="text" id="cookie" name="cookie" style="width: 16em;" />
</td>
</tr>
<tr>
<td>
<label for="rename">QBT_TR(Rename torrent)QBT_TR[CONTEXT=HttpServer]</label>
</td>
<td>
<input type="text" id="rename" name="rename" style="width: 16em;" />
</td>
</tr>
<tr>
<td>
<label for="category">QBT_TR(Category:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
</td>
<td>
<div class="select-watched-folder-editable">
<select id="categorySelect" onchange="changeCategorySelect(this)">
<option selected value="\other"></option>
</select>
<input name="category" type="text" value="" />
</div>
</td>
</tr>
<tr>
<td>
<label for="start_torrent">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
</td>
<td>
<input type="checkbox" id="start_torrent" checked="checked" />
<input type="hidden" id="add_paused" name="paused" value="false" readonly />
</td>
</tr>
<tr>
<td>
<label for="skip_checking">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
</td>
<td>
<input type="checkbox" id="skip_checking" name="skip_checking" value="true" />
</td>
</tr>
<tr>
<td>
<label for="root_folder">QBT_TR(Create subfolder)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
</td>
<td>
<input type="checkbox" id="root_folder" name="root_folder" value="true" checked="checked" />
</td>
</tr>
<tr>
<td>
<label for="sequentialDownload">QBT_TR(Download in sequential order)QBT_TR[CONTEXT=TransferListWidget]</label>
</td>
<td>
<input type="checkbox" id="sequentialDownload" name="sequentialDownload" value="true" />
</td>
</tr>
<tr>
<td>
<label for="firstLastPiecePrio">QBT_TR(Download first and last pieces first)QBT_TR[CONTEXT=TransferListWidget]</label>
</td>
<td>
<input type="checkbox" id="firstLastPiecePrio" name="firstLastPiecePrio" value="true" />
</td>
</tr>
<tr>
<td>
<label for="dlLimit">QBT_TR(Limit download rate)QBT_TR[CONTEXT=HttpServer]</label>
</td>
<td>
<input type="text" id="dlLimit" name="dlLimit" style="width: 16em;" placeholder="Bytes/s" />
</td>
</tr>
<tr>
<td>
<label for="upLimit">QBT_TR(Limit upload rate)QBT_TR[CONTEXT=HttpServer]</label>
</td>
<td>
<input type="text" id="upLimit" name="upLimit" style="width: 16em;" placeholder="Bytes/s" />
</td>
</tr>
</table>
2018-04-05 11:59:31 +08:00
<div id="submitbutton" style="margin-top: 12px; text-align: center;">
<button type="submit" id="submitButton">QBT_TR(Download)QBT_TR[CONTEXT=downloadFromURL]</button>
</div>
</fieldset>
</div>
</form>
<script>
var encodedUrls = new URI().getData('urls');
if (encodedUrls) {
var urls = [];
encodedUrls.split('|').each(function(url) {
urls.push(decodeURIComponent(url));
});
if (urls.length)
$('urls').set('value', urls.join("\n"));
}
2018-04-05 11:59:31 +08:00
var submitted = false;
2018-04-05 11:59:31 +08:00
$('downloadForm').addEventListener("submit", function() {
$('download_spinner').style.display = "block";
submitted = true;
});
2018-04-05 11:59:31 +08:00
$('download_frame').addEventListener("load", function() {
if (submitted)
window.parent.closeWindows();
});
2018-04-05 11:59:31 +08:00
$('start_torrent').addEventListener('change', function() {
$('add_paused').value = !$('start_torrent').checked;
2018-04-05 11:59:31 +08:00
});
</script>
<div id="download_spinner" class="mochaSpinner"></div>
</body>
2018-04-05 11:59:31 +08:00
</html>