Add Subsonic option to turn off HTTP2

Fixes #718
This commit is contained in:
Jonas Kvinge
2021-06-13 19:55:45 +02:00
parent 8cf5707575
commit fbe4d3ce9f
7 changed files with 48 additions and 18 deletions

View File

@@ -58,6 +58,10 @@ SubsonicSettingsPage::SubsonicSettingsPage(SettingsDialog *parent)
dialog()->installEventFilter(this);
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
ui_->checkbox_http2->hide();
#endif
}
SubsonicSettingsPage::~SubsonicSettingsPage() { delete ui_; }
@@ -72,6 +76,7 @@ void SubsonicSettingsPage::Load() {
QByteArray password = s.value("password").toByteArray();
if (password.isEmpty()) ui_->password->clear();
else ui_->password->setText(QString::fromUtf8(QByteArray::fromBase64(password)));
ui_->checkbox_http2->setChecked(s.value("http2", true).toBool());
ui_->checkbox_verify_certificate->setChecked(s.value("verifycertificate", false).toBool());
ui_->checkbox_download_album_covers->setChecked(s.value("downloadalbumcovers", true).toBool());
ui_->checkbox_server_scrobbling->setChecked(s.value("serversidescrobbling", false).toBool());
@@ -91,6 +96,7 @@ void SubsonicSettingsPage::Save() {
s.setValue("url", QUrl(ui_->server_url->text()));
s.setValue("username", ui_->username->text());
s.setValue("password", QString::fromUtf8(ui_->password->text().toUtf8().toBase64()));
s.setValue("http2", ui_->checkbox_http2->isChecked());
s.setValue("verifycertificate", ui_->checkbox_verify_certificate->isChecked());
s.setValue("downloadalbumcovers", ui_->checkbox_download_album_covers->isChecked());
s.setValue("serversidescrobbling", ui_->checkbox_server_scrobbling->isChecked());