Increase default timeout for loading song/artist info.
Now we don't wait for everything to be loaded before displaying the results, it seems fine to wait longer to get all the replies. Also, it doesn't seem necessary anymore to allow users to change the timeout setting.
This commit is contained in:
parent
1130efe4b1
commit
26971cfd74
|
@ -214,10 +214,6 @@ void SongInfoBase::ReloadSettings() {
|
||||||
|
|
||||||
QMetaObject::invokeMethod(contents, "ReloadSettings");
|
QMetaObject::invokeMethod(contents, "ReloadSettings");
|
||||||
}
|
}
|
||||||
|
|
||||||
QSettings s;
|
|
||||||
s.beginGroup(kSettingsGroup);
|
|
||||||
fetcher_->set_timeout(s.value("timeout", SongInfoFetcher::kDefaultTimeoutDuration).toInt());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongInfoBase::ConnectWidget(QWidget* widget) {
|
void SongInfoBase::ConnectWidget(QWidget* widget) {
|
||||||
|
|
|
@ -40,9 +40,7 @@ public:
|
||||||
QList<CollapsibleInfoPane::Data> info_;
|
QList<CollapsibleInfoPane::Data> info_;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const int kDefaultTimeoutDuration = 2500; // msec
|
static const int kDefaultTimeoutDuration = 25000; // msec
|
||||||
|
|
||||||
void set_timeout(int msec) { timeout_duration_ = msec; }
|
|
||||||
|
|
||||||
void AddProvider(SongInfoProvider* provider);
|
void AddProvider(SongInfoProvider* provider);
|
||||||
int FetchInfo(const Song& metadata);
|
int FetchInfo(const Song& metadata);
|
||||||
|
|
|
@ -59,8 +59,6 @@ void SongInfoSettingsPage::Load() {
|
||||||
s.beginGroup(SongInfoTextView::kSettingsGroup);
|
s.beginGroup(SongInfoTextView::kSettingsGroup);
|
||||||
ui_->song_info_font_size->setValue(
|
ui_->song_info_font_size->setValue(
|
||||||
s.value("font_size", SongInfoTextView::kDefaultFontSize).toReal());
|
s.value("font_size", SongInfoTextView::kDefaultFontSize).toReal());
|
||||||
ui_->song_info_timeout->setValue(
|
|
||||||
s.value("timeout", SongInfoFetcher::kDefaultTimeoutDuration).toInt());
|
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
QList<const UltimateLyricsProvider*> providers = dialog()->song_info_view()->lyric_providers();
|
QList<const UltimateLyricsProvider*> providers = dialog()->song_info_view()->lyric_providers();
|
||||||
|
@ -80,7 +78,6 @@ void SongInfoSettingsPage::Save() {
|
||||||
|
|
||||||
s.beginGroup(SongInfoTextView::kSettingsGroup);
|
s.beginGroup(SongInfoTextView::kSettingsGroup);
|
||||||
s.setValue("font_size", ui_->song_info_font_preview->font().pointSizeF());
|
s.setValue("font_size", ui_->song_info_font_preview->font().pointSizeF());
|
||||||
s.setValue("timeout", ui_->song_info_timeout->value());
|
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
s.beginGroup(SongInfoView::kSettingsGroup);
|
s.beginGroup(SongInfoView::kSettingsGroup);
|
||||||
|
|
|
@ -75,38 +75,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
|
||||||
<property name="title">
|
|
||||||
<string>Network</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout_6">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_14">
|
|
||||||
<property name="text">
|
|
||||||
<string>Timeout</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSpinBox" name="song_info_timeout">
|
|
||||||
<property name="suffix">
|
|
||||||
<string> ms</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>60000</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>2500</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_6">
|
<widget class="QGroupBox" name="groupBox_6">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
|
Loading…
Reference in New Issue