mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
WebUI: Implement removing categories
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user