Skip to content

Commit

Permalink
Consistent use of countryId
Browse files Browse the repository at this point in the history
  • Loading branch information
riban-bw committed Mar 22, 2024
1 parent 667191d commit 0372ce1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/JSON-RPC.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Requests server list.

Parameters:

| Name | Type | Description
| Name | Type | Description |
| --- | --- | --- |
| params.directory | string | URL of directory, e.g. anygenre1.jamulus.io:22124 |

Expand Down Expand Up @@ -473,7 +473,7 @@ Parameters:
| Name | Type | Description |
| --- | --- | --- |
| params.servers | array | The server list. |
| params.servers[*].id | url | The server's URL. |
| params.servers[*].url | url | The server's URL. |
| params.servers[*].name | string | The server’s name. |
| params.servers[*].countryId | number | The servers’s country ID (see QLocale::Country). |
| params.servers[*].city | string | The server’s city. |
Expand Down
6 changes: 3 additions & 3 deletions src/clientrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ CClientRpc::CClientRpc ( CClient* pClient, CRpcServer* pRpcServer, QObject* pare
/// @rpc_notification jamulusclient/serverListReceived
/// @brief Emitted when the server list is received.
/// @param {array} params.servers - The server list.
/// @param {string} params.servers[*].address - IP Address
/// @param {string} params.servers[*].url - IP Address
/// @param {string} params.servers[*].name - Server name
/// @param {number} params.servers[*].country - Server country code
/// @param {number} params.servers[*].countryId - Server country code
/// @param {string} params.servers[*].city - Server city
connect ( pClient->getConnLessProtocol(), &CProtocol::CLServerListReceived, [=] ( CHostAddress /* unused */, CVector<CServerInfo> vecServerInfo ) {
QJsonArray arrServerInfo;
Expand All @@ -108,7 +108,7 @@ CClientRpc::CClientRpc ( CClient* pClient, CRpcServer* pRpcServer, QObject* pare
QJsonObject objServerInfo{
{ "url", serverInfo.HostAddr.toString() },
{ "name", serverInfo.strName },
{ "country", serverInfo.eCountry },
{ "countryI", serverInfo.eCountry },
{ "city", serverInfo.strCity },
};
arrServerInfo.append ( objServerInfo );
Expand Down

0 comments on commit 0372ce1

Please sign in to comment.