|
|
|
@ -116,7 +116,7 @@ QMap<QString, QMap<QString, WebApplication::Action> > WebApplication::initialize
@@ -116,7 +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, removeCategories); |
|
|
|
|
ADD_ACTION(command, getSavePath); |
|
|
|
|
ADD_ACTION(version, api); |
|
|
|
|
ADD_ACTION(version, api_min); |
|
|
|
@ -745,13 +745,14 @@ void WebApplication::action_command_addCategory()
@@ -745,13 +745,14 @@ void WebApplication::action_command_addCategory()
|
|
|
|
|
BitTorrent::Session::instance()->addCategory(category); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void WebApplication::action_command_removeCategory() |
|
|
|
|
void WebApplication::action_command_removeCategories() |
|
|
|
|
{ |
|
|
|
|
CHECK_URI(0); |
|
|
|
|
CHECK_PARAMETERS("category"); |
|
|
|
|
CHECK_PARAMETERS("categories"); |
|
|
|
|
|
|
|
|
|
QString category = request().posts["category"].trimmed(); |
|
|
|
|
BitTorrent::Session::instance()->removeCategory(category); |
|
|
|
|
QStringList categories = request().posts["categories"].split('\n'); |
|
|
|
|
foreach (const QString &category, categories) |
|
|
|
|
BitTorrent::Session::instance()->removeCategory(category); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void WebApplication::action_command_getSavePath() |
|
|
|
|