mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-18 11:39:31 +01:00
Remove stream schema setting and add Add HI_RES option
This commit is contained in:
parent
7cc9c75d15
commit
2ad1d27a59
@ -55,10 +55,7 @@ TidalSettingsPage::TidalSettingsPage(SettingsDialog *parent)
|
||||
ui_->quality->addItem("Low", "LOW");
|
||||
ui_->quality->addItem("High", "HIGH");
|
||||
ui_->quality->addItem("Lossless", "LOSSLESS");
|
||||
|
||||
ui_->streamurl->addItem("Default", "default");
|
||||
ui_->streamurl->addItem("HTTP", "http");
|
||||
ui_->streamurl->addItem("HTTPS", "https");
|
||||
ui_->quality->addItem("Hi resolution", "HI_RES");
|
||||
|
||||
ui_->coversize->addItem("160x160", "160x160");
|
||||
ui_->coversize->addItem("320x320", "320x320");
|
||||
@ -88,7 +85,6 @@ void TidalSettingsPage::Load() {
|
||||
ui_->songssearchlimit->setValue(s.value("songssearchlimit", 100).toInt());
|
||||
ui_->checkbox_fetchalbums->setChecked(s.value("fetchalbums", false).toBool());
|
||||
dialog()->ComboBoxLoadFromSettings(s, ui_->coversize, "coversize", "320x320");
|
||||
dialog()->ComboBoxLoadFromSettings(s, ui_->streamurl, "streamurl", "http");
|
||||
s.endGroup();
|
||||
|
||||
if (service_->authenticated()) ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn);
|
||||
@ -110,7 +106,6 @@ void TidalSettingsPage::Save() {
|
||||
s.setValue("songssearchlimit", ui_->songssearchlimit->value());
|
||||
s.setValue("fetchalbums", ui_->checkbox_fetchalbums->isChecked());
|
||||
s.setValue("coversize", ui_->coversize->itemData(ui_->coversize->currentIndex()));
|
||||
s.setValue("streamurl", ui_->streamurl->itemData(ui_->streamurl->currentIndex()));
|
||||
s.endGroup();
|
||||
|
||||
service_->ReloadSettings();
|
||||
|
@ -385,39 +385,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_streamurl">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_streamurl">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Stream URL scheme</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="streamurl"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_streamurl">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -127,7 +127,6 @@ void TidalService::ReloadSettings() {
|
||||
songssearchlimit_ = s.value("songssearchlimit", 100).toInt();
|
||||
fetchalbums_ = s.value("fetchalbums", false).toBool();
|
||||
coversize_ = s.value("coversize", "320x320").toString();
|
||||
streamurl_ = s.value("streamurl", "default").toString();
|
||||
s.endGroup();
|
||||
|
||||
}
|
||||
@ -140,7 +139,6 @@ void TidalService::LoadSessionID() {
|
||||
session_id_ = s.value("session_id").toString();
|
||||
user_id_ = s.value("user_id").toInt();
|
||||
country_code_ = s.value("country_code").toString();
|
||||
clientuniquekey_ = Utilities::GetRandomStringWithChars(12).toLower();
|
||||
s.endGroup();
|
||||
|
||||
}
|
||||
@ -257,7 +255,6 @@ void TidalService::HandleAuthReply(QNetworkReply *reply) {
|
||||
country_code_ = json_obj["countryCode"].toString();
|
||||
session_id_ = json_obj["sessionId"].toString();
|
||||
user_id_ = json_obj["userId"].toInt();
|
||||
clientuniquekey_ = Utilities::GetRandomStringWithChars(12).toLower();
|
||||
|
||||
QSettings s;
|
||||
s.beginGroup(TidalSettingsPage::kSettingsGroup);
|
||||
@ -1039,8 +1036,6 @@ void TidalService::StreamURLReceived(QNetworkReply *reply, const int song_id, co
|
||||
filetype = Song::FileType_Stream;
|
||||
}
|
||||
|
||||
if (new_url.scheme() != streamurl_ && streamurl_.toLower() != "default") new_url.setScheme(streamurl_);
|
||||
|
||||
emit StreamURLFinished(original_url, new_url, filetype);
|
||||
|
||||
}
|
||||
|
@ -139,11 +139,9 @@ class TidalService : public InternetService {
|
||||
int songssearchlimit_;
|
||||
bool fetchalbums_;
|
||||
QString coversize_;
|
||||
QString streamurl_;
|
||||
QString session_id_;
|
||||
quint64 user_id_;
|
||||
QString country_code_;
|
||||
QString clientuniquekey_;
|
||||
|
||||
int pending_search_id_;
|
||||
int next_pending_search_id_;
|
||||
|
Loading…
Reference in New Issue
Block a user