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