mirror of
https://github.com/Carve/qbittorrent-webui-cjratliff.com.git
synced 2025-02-28 23:50:57 +01:00
198 lines
8.7 KiB
HTML
198 lines
8.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="${LANG}">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>Add Torrent Links</title>
|
|
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
|
|
<link rel="stylesheet" type="text/css" href="css/Core.css?v=${CACHEID}" />
|
|
<link rel="stylesheet" href="css/Window.css?v=${CACHEID}" type="text/css" />
|
|
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
|
|
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
|
|
<script src="scripts/download.js?v=${CACHEID}"></script>
|
|
<script src="scripts/misc.js?locale=${LANG}&v=${CACHEID}"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<iframe id="download_frame" name="download_frame" class="invisible" src="about:blank"></iframe>
|
|
<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">
|
|
<div style="text-align: center;">
|
|
<br />
|
|
<h2 class="vcenter">Download Torrents from their URLs or Magnet links</h2>
|
|
<textarea id="urls" rows="8" name="urls"></textarea>
|
|
<p style="font-size: 90%;">Only one link per line</p>
|
|
<fieldset class="settings" style="border: 0; text-align: left; margin-top: 4px;">
|
|
<table style="margin: auto;">
|
|
<tr>
|
|
<td>
|
|
<label for="autoTMM">Torrent Management Mode:</label>
|
|
</td>
|
|
<td>
|
|
<select id="autoTMM" name="autoTMM" onchange="qBittorrent.Download.changeTMM(this)">
|
|
<option value="false">Manual</option>
|
|
<option selected value="true">Automatic</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="savepath">Save files to location:</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" id="savepath" name="savepath" style="width: 16em;" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="cookie">Cookie:</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" id="cookie" name="cookie" style="width: 16em;" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="rename">Rename torrent</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" id="rename" name="rename" style="width: 16em;" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="category">Category:</label>
|
|
</td>
|
|
<td>
|
|
<div class="select-watched-folder-editable">
|
|
<select id="categorySelect" onchange="qBittorrent.Download.changeCategorySelect(this)">
|
|
<option selected value="\other"></option>
|
|
</select>
|
|
<input name="category" type="text" />
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="startTorrent">Start torrent</label>
|
|
</td>
|
|
<td>
|
|
<input type="hidden" id="startTorrentHidden" name="paused" />
|
|
<input type="checkbox" id="startTorrent" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="addToTopOfQueue">Add to top of queue</label>
|
|
</td>
|
|
<td>
|
|
<input type="checkbox" id="addToTopOfQueue" name="addToTopOfQueue" value="true" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="stopCondition">Stop condition:</label>
|
|
</td>
|
|
<td>
|
|
<select id="stopCondition" name="stopCondition">
|
|
<option selected value="None">None</option>
|
|
<option value="MetadataReceived">Metadata received</option>
|
|
<option value="FilesChecked">Files checked</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="skip_checking">Skip hash check</label>
|
|
</td>
|
|
<td>
|
|
<input type="checkbox" id="skip_checking" name="skip_checking" value="true" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="contentLayout">Content layout:</label>
|
|
</td>
|
|
<td>
|
|
<select id="contentLayout" name="contentLayout">
|
|
<option selected value="Original">Original</option>
|
|
<option value="Subfolder">Create subfolder</option>
|
|
<option value="NoSubfolder">Don't create subfolder</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="sequentialDownload">Download in sequential order</label>
|
|
</td>
|
|
<td>
|
|
<input type="checkbox" id="sequentialDownload" name="sequentialDownload" value="true" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="firstLastPiecePrio">Download first and last pieces first</label>
|
|
</td>
|
|
<td>
|
|
<input type="checkbox" id="firstLastPiecePrio" name="firstLastPiecePrio" value="true" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="dlLimitText">Limit download rate</label>
|
|
</td>
|
|
<td>
|
|
<input type="hidden" id="dlLimitHidden" name="dlLimit" />
|
|
<input type="text" id="dlLimitText" style="width: 16em;" placeholder="KiB/s" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="upLimitText">Limit upload rate</label>
|
|
</td>
|
|
<td>
|
|
<input type="hidden" id="upLimitHidden" name="upLimit" />
|
|
<input type="text" id="upLimitText" style="width: 16em;" placeholder="KiB/s" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div id="submitbutton" style="margin-top: 25px; text-align: center;">
|
|
<button class="download" type="submit" id="submitButton"></button>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</form>
|
|
<script>
|
|
'use strict';
|
|
|
|
const encodedUrls = new URI().getData('urls');
|
|
if (encodedUrls) {
|
|
const urls = encodedUrls.split('|').map(function(url) {
|
|
return decodeURIComponent(url);
|
|
});
|
|
|
|
if (urls.length)
|
|
$('urls').set('value', urls.join("\n"));
|
|
}
|
|
|
|
let submitted = false;
|
|
|
|
$('downloadForm').addEventListener("submit", function() {
|
|
$('startTorrentHidden').value = $('startTorrent').checked ? 'false' : 'true';
|
|
|
|
$('dlLimitHidden').value = $('dlLimitText').value.toInt() * 1024;
|
|
$('upLimitHidden').value = $('upLimitText').value.toInt() * 1024;
|
|
|
|
$('download_spinner').style.display = "block";
|
|
submitted = true;
|
|
});
|
|
|
|
$('download_frame').addEventListener("load", function() {
|
|
if (submitted)
|
|
window.parent.closeWindows();
|
|
});
|
|
</script>
|
|
<div id="download_spinner" class="mochaSpinner"></div>
|
|
</body>
|
|
|
|
</html>
|