mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
WebUI: Implement removing categories
This commit is contained in:
parent
a4dca52617
commit
50f2437ac3
6 changed files with 35 additions and 1 deletions
|
@ -116,6 +116,7 @@ QMap<QString, QMap<QString, WebApplication::Action> > WebApplication::initialize
|
|||
ADD_ACTION(command, recheck);
|
||||
ADD_ACTION(command, setCategory);
|
||||
ADD_ACTION(command, addCategory);
|
||||
ADD_ACTION(command, removeCategory);
|
||||
ADD_ACTION(command, getSavePath);
|
||||
ADD_ACTION(version, api);
|
||||
ADD_ACTION(version, api_min);
|
||||
|
@ -744,6 +745,15 @@ void WebApplication::action_command_addCategory()
|
|||
BitTorrent::Session::instance()->addCategory(category);
|
||||
}
|
||||
|
||||
void WebApplication::action_command_removeCategory()
|
||||
{
|
||||
CHECK_URI(0);
|
||||
CHECK_PARAMETERS("category");
|
||||
|
||||
QString category = request().posts["category"].trimmed();
|
||||
BitTorrent::Session::instance()->removeCategory(category);
|
||||
}
|
||||
|
||||
void WebApplication::action_command_getSavePath()
|
||||
{
|
||||
CHECK_URI(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue