mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-10 05:44:25 +00:00
Create root folder option when adding a torrent in WebUI
This commit is contained in:
parent
467ba380b2
commit
6b33db3ae3
@ -394,6 +394,7 @@ void WebApplication::action_command_download()
|
|||||||
QStringList list = urls.split('\n');
|
QStringList list = urls.split('\n');
|
||||||
bool skipChecking = request().posts["skip_checking"] == "true";
|
bool skipChecking = request().posts["skip_checking"] == "true";
|
||||||
bool addPaused = request().posts["paused"] == "true";
|
bool addPaused = request().posts["paused"] == "true";
|
||||||
|
bool hasRootFolder = request().posts["root_folder"] == "true";
|
||||||
QString savepath = request().posts["savepath"];
|
QString savepath = request().posts["savepath"];
|
||||||
QString category = request().posts["category"];
|
QString category = request().posts["category"];
|
||||||
QString cookie = request().posts["cookie"];
|
QString cookie = request().posts["cookie"];
|
||||||
@ -422,6 +423,7 @@ void WebApplication::action_command_download()
|
|||||||
params.skipChecking = skipChecking;
|
params.skipChecking = skipChecking;
|
||||||
|
|
||||||
params.addPaused = TriStateBool(addPaused);
|
params.addPaused = TriStateBool(addPaused);
|
||||||
|
params.createSubfolder = TriStateBool(hasRootFolder);
|
||||||
params.savePath = savepath;
|
params.savePath = savepath;
|
||||||
params.category = category;
|
params.category = category;
|
||||||
|
|
||||||
@ -446,6 +448,7 @@ void WebApplication::action_command_upload()
|
|||||||
CHECK_URI(0);
|
CHECK_URI(0);
|
||||||
bool skipChecking = request().posts["skip_checking"] == "true";
|
bool skipChecking = request().posts["skip_checking"] == "true";
|
||||||
bool addPaused = request().posts["paused"] == "true";
|
bool addPaused = request().posts["paused"] == "true";
|
||||||
|
bool hasRootFolder = request().posts["root_folder"] == "true";
|
||||||
QString savepath = request().posts["savepath"];
|
QString savepath = request().posts["savepath"];
|
||||||
QString category = request().posts["category"];
|
QString category = request().posts["category"];
|
||||||
|
|
||||||
@ -468,6 +471,7 @@ void WebApplication::action_command_upload()
|
|||||||
params.skipChecking = skipChecking;
|
params.skipChecking = skipChecking;
|
||||||
|
|
||||||
params.addPaused = TriStateBool(addPaused);
|
params.addPaused = TriStateBool(addPaused);
|
||||||
|
params.createSubfolder = TriStateBool(hasRootFolder);
|
||||||
params.savePath = savepath;
|
params.savePath = savepath;
|
||||||
params.category = category;
|
params.category = category;
|
||||||
if (!BitTorrent::Session::instance()->addTorrent(torrentInfo, params)) {
|
if (!BitTorrent::Session::instance()->addTorrent(torrentInfo, params)) {
|
||||||
|
@ -38,6 +38,10 @@
|
|||||||
<label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
<label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
||||||
<input type="checkbox" name="skip_checking" value="true"/>
|
<input type="checkbox" name="skip_checking" value="true"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="formRow">
|
||||||
|
<label for="root_folder" class="leftLabelLarge">QBT_TR(Create subfolder)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
||||||
|
<input type="checkbox" name="root_folder" value="true" checked="checked"/>
|
||||||
|
</div>
|
||||||
<div id="submitbutton" style="margin-top: 12px; text-align: center;">
|
<div id="submitbutton" style="margin-top: 12px; text-align: center;">
|
||||||
<button type="submit" id="submitButton">QBT_TR(Download)QBT_TR[CONTEXT=downloadFromURL]</button>
|
<button type="submit" id="submitButton">QBT_TR(Download)QBT_TR[CONTEXT=downloadFromURL]</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,7 +57,7 @@ initializeWindows = function() {
|
|||||||
paddingVertical: 0,
|
paddingVertical: 0,
|
||||||
paddingHorizontal: 0,
|
paddingHorizontal: 0,
|
||||||
width: 500,
|
width: 500,
|
||||||
height: 400
|
height: 420
|
||||||
});
|
});
|
||||||
updateMainData();
|
updateMainData();
|
||||||
});
|
});
|
||||||
@ -97,7 +97,7 @@ initializeWindows = function() {
|
|||||||
paddingVertical: 0,
|
paddingVertical: 0,
|
||||||
paddingHorizontal: 0,
|
paddingHorizontal: 0,
|
||||||
width: 500,
|
width: 500,
|
||||||
height: 240
|
height: 260
|
||||||
});
|
});
|
||||||
updateMainData();
|
updateMainData();
|
||||||
});
|
});
|
||||||
|
@ -34,6 +34,10 @@
|
|||||||
<label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
<label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
||||||
<input type="checkbox" name="skip_checking" value="true"/>
|
<input type="checkbox" name="skip_checking" value="true"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="formRow">
|
||||||
|
<label for="root_folder" class="leftLabelLarge">QBT_TR(Create subfolder)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
||||||
|
<input type="checkbox" name="root_folder" value="true" checked="checked"/>
|
||||||
|
</div>
|
||||||
<div id="submitbutton" style="margin-top: 30px; text-align: center;">
|
<div id="submitbutton" style="margin-top: 30px; text-align: center;">
|
||||||
<button type="submit" style="font-size: 1em;">QBT_TR(Upload Torrents)QBT_TR[CONTEXT=HttpServer]</button>
|
<button type="submit" style="font-size: 1em;">QBT_TR(Upload Torrents)QBT_TR[CONTEXT=HttpServer]</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user