2017-11-02 12:14:27 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="${LANG}">
|
2018-04-05 11:59:31 +08:00
|
|
|
|
2008-05-17 12:44:42 +00:00
|
|
|
<head>
|
2018-03-21 14:34:37 +08:00
|
|
|
<meta charset="UTF-8" />
|
2017-05-01 01:45:02 +03:00
|
|
|
<title>QBT_TR(Add Torrent Links)QBT_TR[CONTEXT=downloadFromURL]</title>
|
2019-04-17 20:09:03 +08:00
|
|
|
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
|
|
|
|
<link rel="stylesheet" href="css/Window.css?v=${CACHEID}" type="text/css" />
|
2018-04-02 01:04:42 +08:00
|
|
|
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
|
2017-12-27 22:19:39 -05:00
|
|
|
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
2019-04-17 20:09:03 +08:00
|
|
|
<script src="scripts/download.js?v=${CACHEID}"></script>
|
|
|
|
<script src="scripts/misc.js?locale=${LANG}&v=${CACHEID}"></script>
|
2008-05-17 12:44:42 +00:00
|
|
|
</head>
|
2015-10-22 00:06:36 -04:30
|
|
|
|
2018-04-05 11:59:31 +08:00
|
|
|
<body>
|
|
|
|
<iframe id="download_frame" name="download_frame" class="invisible" src="javascript:false;"></iframe>
|
2019-01-25 19:01:39 +01:00
|
|
|
<form action="api/v2/torrents/add" enctype="multipart/form-data" method="post" id="downloadForm" style="text-align: center;" target="download_frame" autocorrect="off" autocapitalize="none">
|
2018-04-05 11:59:31 +08:00
|
|
|
<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>
|
2018-10-16 00:15:15 -04:00
|
|
|
<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>
|
2018-10-16 00:15:15 -04:00
|
|
|
<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>
|
2018-10-19 01:56:47 -04:00
|
|
|
<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>
|
2018-10-16 00:15:15 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2019-05-01 11:46:46 +08:00
|
|
|
<label for="startTorrent">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
2018-10-16 00:15:15 -04:00
|
|
|
</td>
|
|
|
|
<td>
|
2019-05-01 11:46:46 +08:00
|
|
|
<input type="hidden" id="startTorrentHidden" name="paused" />
|
|
|
|
<input type="checkbox" id="startTorrent" />
|
2018-10-16 00:15:15 -04:00
|
|
|
</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>
|
2019-05-01 11:46:46 +08:00
|
|
|
<label for="rootFolder">QBT_TR(Create subfolder)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
2018-10-16 00:15:15 -04:00
|
|
|
</td>
|
|
|
|
<td>
|
2019-05-01 11:46:46 +08:00
|
|
|
<input type="hidden" id="rootFolderHidden" name="root_folder" />
|
|
|
|
<input type="checkbox" id="rootFolder" />
|
2018-10-16 00:15:15 -04:00
|
|
|
</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>
|
2019-05-11 12:25:07 +08:00
|
|
|
<label for="dlLimitText">QBT_TR(Limit download rate)QBT_TR[CONTEXT=HttpServer]</label>
|
2018-10-16 00:15:15 -04:00
|
|
|
</td>
|
|
|
|
<td>
|
2019-05-11 12:25:07 +08:00
|
|
|
<input type="hidden" id="dlLimitHidden" name="dlLimit" />
|
|
|
|
<input type="text" id="dlLimitText" style="width: 16em;" placeholder="KiB/s" />
|
2018-10-16 00:15:15 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2019-05-11 12:25:07 +08:00
|
|
|
<label for="upLimitText">QBT_TR(Limit upload rate)QBT_TR[CONTEXT=HttpServer]</label>
|
2018-10-16 00:15:15 -04:00
|
|
|
</td>
|
|
|
|
<td>
|
2019-05-11 12:25:07 +08:00
|
|
|
<input type="hidden" id="upLimitHidden" name="upLimit" />
|
|
|
|
<input type="text" id="upLimitText" style="width: 16em;" placeholder="KiB/s" />
|
2018-10-16 00:15:15 -04:00
|
|
|
</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>
|
2018-11-30 18:30:26 +08:00
|
|
|
'use strict';
|
|
|
|
|
2019-05-30 09:05:16 +03:00
|
|
|
const encodedUrls = new URI().getData('urls');
|
2017-12-27 22:19:39 -05:00
|
|
|
if (encodedUrls) {
|
2019-07-20 01:18:11 -07:00
|
|
|
const urls = encodedUrls.split('|').map(function(url) {
|
|
|
|
return decodeURIComponent(url);
|
2017-12-27 22:19:39 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
if (urls.length)
|
2017-12-28 13:05:36 -05:00
|
|
|
$('urls').set('value', urls.join("\n"));
|
2017-12-27 22:19:39 -05:00
|
|
|
}
|
|
|
|
|
2019-05-30 09:05:16 +03:00
|
|
|
let submitted = false;
|
2015-10-22 00:06:36 -04:30
|
|
|
|
2018-04-05 11:59:31 +08:00
|
|
|
$('downloadForm').addEventListener("submit", function() {
|
2019-05-01 11:46:46 +08:00
|
|
|
$('startTorrentHidden').value = $('startTorrent').checked ? 'false' : 'true';
|
|
|
|
$('rootFolderHidden').value = $('rootFolder').checked ? 'true' : 'false';
|
|
|
|
|
2019-05-11 12:25:07 +08:00
|
|
|
$('dlLimitHidden').value = $('dlLimitText').value.toInt() * 1024;
|
|
|
|
$('upLimitHidden').value = $('upLimitText').value.toInt() * 1024;
|
|
|
|
|
2018-04-05 11:59:31 +08:00
|
|
|
$('download_spinner').style.display = "block";
|
|
|
|
submitted = true;
|
|
|
|
});
|
2015-10-22 00:06:36 -04:30
|
|
|
|
2018-04-05 11:59:31 +08:00
|
|
|
$('download_frame').addEventListener("load", function() {
|
|
|
|
if (submitted)
|
|
|
|
window.parent.closeWindows();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<div id="download_spinner" class="mochaSpinner"></div>
|
2008-05-17 12:44:42 +00:00
|
|
|
</body>
|
2018-04-05 11:59:31 +08:00
|
|
|
|
2008-05-17 12:44:42 +00:00
|
|
|
</html>
|