mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
WebUI: Allow to retrieve qBittorrent version
New GET method: * version/qbittorrent: qBittorrent version Closes #1872.
This commit is contained in:
parent
8b5512c244
commit
d6169b14dd
2 changed files with 7 additions and 0 deletions
|
@ -108,6 +108,7 @@ QMap<QString, QMap<QString, RequestHandler::Action> > RequestHandler::initialize
|
||||||
ADD_ACTION(command, recheck);
|
ADD_ACTION(command, recheck);
|
||||||
ADD_ACTION(version, api);
|
ADD_ACTION(version, api);
|
||||||
ADD_ACTION(version, api_min);
|
ADD_ACTION(version, api_min);
|
||||||
|
ADD_ACTION(version, qbittorrent);
|
||||||
|
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
@ -225,6 +226,11 @@ void RequestHandler::action_version_api_min()
|
||||||
print(QString::number(API_VERSION_MIN), CONTENT_TYPE_TXT);
|
print(QString::number(API_VERSION_MIN), CONTENT_TYPE_TXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RequestHandler::action_version_qbittorrent()
|
||||||
|
{
|
||||||
|
print(QString(VERSION), CONTENT_TYPE_TXT);
|
||||||
|
}
|
||||||
|
|
||||||
void RequestHandler::action_command_shutdown()
|
void RequestHandler::action_command_shutdown()
|
||||||
{
|
{
|
||||||
qDebug() << "Shutdown request from Web UI";
|
qDebug() << "Shutdown request from Web UI";
|
||||||
|
|
|
@ -83,6 +83,7 @@ private:
|
||||||
void action_command_recheck();
|
void action_command_recheck();
|
||||||
void action_version_api();
|
void action_version_api();
|
||||||
void action_version_api_min();
|
void action_version_api_min();
|
||||||
|
void action_version_qbittorrent();
|
||||||
|
|
||||||
typedef void (RequestHandler::*Action)();
|
typedef void (RequestHandler::*Action)();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue