mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
Update UI to bare minimum to allow for core lib testing
This commit is contained in:
parent
56d7c1486e
commit
3cd1fd3e23
8 changed files with 206 additions and 12 deletions
|
@ -184,7 +184,7 @@ void ApiClient::authenticate(QString username, QString password, bool storeCrede
|
|||
|
||||
requestData["Username"] = username;
|
||||
requestData["Pw"] = password;
|
||||
QNetworkReply *rep = post("/Users/Authenticatebyname", QJsonDocument(requestData));
|
||||
QNetworkReply *rep = post("/Users/authenticatebyname", QJsonDocument(requestData));
|
||||
connect(rep, &QNetworkReply::finished, this, [rep, username, storeCredentials, this]() {
|
||||
int status = rep->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||
qDebug() << "Got reply with status code " << status;
|
||||
|
@ -202,6 +202,12 @@ void ApiClient::authenticate(QString username, QString password, bool storeCrede
|
|||
if (storeCredentials) {
|
||||
m_credManager->store(this->m_baseUrl, this->m_userId, this->m_token);
|
||||
}
|
||||
} else if(status >= 400 && status < 500) {
|
||||
if (status == 401) {
|
||||
emit authenticationError(ApiError::INVALID_PASSWORD);
|
||||
} else {
|
||||
emit authenticationError(ApiError::UNEXPECTED_STATUS);
|
||||
}
|
||||
}
|
||||
rep->deleteLater();
|
||||
});
|
||||
|
|
|
@ -85,7 +85,7 @@ QJsonObject DeviceProfile::generateProfile() {
|
|||
QJsonObject {
|
||||
JsonPair("Property", "IsSecondaryAudio"),
|
||||
JsonPair("Condition", "Equals"),
|
||||
JsonPair("Value", false),
|
||||
JsonPair("Value", "false"),
|
||||
JsonPair("IsRequired", false)
|
||||
}
|
||||
}),
|
||||
|
@ -97,7 +97,7 @@ QJsonObject DeviceProfile::generateProfile() {
|
|||
QJsonObject {
|
||||
JsonPair("Property", "IsAnamorphic"),
|
||||
JsonPair("Condition", "NotEquals"),
|
||||
JsonPair("Value", true),
|
||||
JsonPair("Value", "true"),
|
||||
JsonPair("IsRequired", false)
|
||||
},
|
||||
QJsonObject {
|
||||
|
@ -109,13 +109,13 @@ QJsonObject DeviceProfile::generateProfile() {
|
|||
QJsonObject {
|
||||
JsonPair("Property", "VideoLevel"),
|
||||
JsonPair("Condition", "LessThanEqual"),
|
||||
JsonPair("Value", 51),
|
||||
JsonPair("Value", "51"),
|
||||
JsonPair("IsRequired", false)
|
||||
},
|
||||
QJsonObject {
|
||||
JsonPair("Property", "IsInterlaced"),
|
||||
JsonPair("Condition", "NotEquals"),
|
||||
JsonPair("Value", true),
|
||||
JsonPair("Value", "true"),
|
||||
JsonPair("IsRequired", false)
|
||||
}
|
||||
}),
|
||||
|
@ -130,8 +130,8 @@ QJsonObject DeviceProfile::generateProfile() {
|
|||
transcoding1["BreakOnNonKeyFrames"] =true;
|
||||
transcoding1["Container"] = "ts";
|
||||
transcoding1["Context"] = "Streaming";
|
||||
transcoding1["MaxAudioChannels"] = 2;
|
||||
transcoding1["MinSegments"] = 1;
|
||||
transcoding1["MaxAudioChannels"] = "2";
|
||||
transcoding1["MinSegments"] = "1";
|
||||
transcoding1["Protocol"] = "hls";
|
||||
transcoding1["Type"] = "Audio";
|
||||
transcodingProfiles.append(transcoding1);
|
||||
|
@ -142,7 +142,7 @@ QJsonObject DeviceProfile::generateProfile() {
|
|||
JsonPair("BreakOnNonKeyFrames", true),
|
||||
JsonPair("Container", "ts"),
|
||||
JsonPair("Context", "Streaming"),
|
||||
JsonPair("MaxAudioChannels", 2),
|
||||
JsonPair("MaxAudioChannels", "2"),
|
||||
JsonPair("MinSegments", 1),
|
||||
JsonPair("Protocol", "hls"),
|
||||
JsonPair("Type", "Video"),
|
||||
|
@ -168,8 +168,8 @@ QJsonObject DeviceProfile::generateProfile() {
|
|||
JsonPair("VideoCodec", hlsVideoCodecs.join(",")),
|
||||
JsonPair("Context", "Streaming"),
|
||||
JsonPair("Protocol", "hls"),
|
||||
JsonPair("MaxAudioChannels", 2),
|
||||
JsonPair("MinSegments", 1),
|
||||
JsonPair("MaxAudioChannels", "2"),
|
||||
JsonPair("MinSegments", "1"),
|
||||
JsonPair("BreakOnNonKeyFrames", true)
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue