@@ -80,6 +80,10 @@ CollectionSettingsPage::CollectionSettingsPage(SettingsDialog *dialog)
|
||||
QObject::connect(ui_->add, &QPushButton::clicked, this, &CollectionSettingsPage::Add);
|
||||
QObject::connect(ui_->remove, &QPushButton::clicked, this, &CollectionSettingsPage::Remove);
|
||||
|
||||
#ifdef HAVE_SONGFINGERPRINTING
|
||||
QObject::connect(ui_->song_tracking, &QCheckBox::toggled, this, &CollectionSettingsPage::SongTrackingToggled);
|
||||
#endif
|
||||
|
||||
QObject::connect(ui_->radiobutton_save_albumcover_albumdir, &QRadioButton::toggled, this, &CollectionSettingsPage::CoverSaveInAlbumDirChanged);
|
||||
QObject::connect(ui_->radiobutton_cover_hash, &QRadioButton::toggled, this, &CollectionSettingsPage::CoverSaveInAlbumDirChanged);
|
||||
QObject::connect(ui_->radiobutton_cover_pattern, &QRadioButton::toggled, this, &CollectionSettingsPage::CoverSaveInAlbumDirChanged);
|
||||
@@ -91,6 +95,10 @@ CollectionSettingsPage::CollectionSettingsPage(SettingsDialog *dialog)
|
||||
QObject::connect(ui_->combobox_cache_size, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &CollectionSettingsPage::CacheSizeUnitChanged);
|
||||
QObject::connect(ui_->combobox_disk_cache_size, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &CollectionSettingsPage::DiskCacheSizeUnitChanged);
|
||||
|
||||
#ifndef HAVE_SONGFINGERPRINTING
|
||||
ui_->song_tracking->hide();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
CollectionSettingsPage::~CollectionSettingsPage() { delete ui_; }
|
||||
@@ -124,6 +132,15 @@ void CollectionSettingsPage::CurrentRowChanged(const QModelIndex &idx) {
|
||||
ui_->remove->setEnabled(idx.isValid());
|
||||
}
|
||||
|
||||
void CollectionSettingsPage::SongTrackingToggled() {
|
||||
|
||||
ui_->mark_songs_unavailable->setEnabled(!ui_->song_tracking->isChecked());
|
||||
if (ui_->song_tracking->isChecked()) {
|
||||
ui_->mark_songs_unavailable->setChecked(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CollectionSettingsPage::DiskCacheEnable(const int state) {
|
||||
|
||||
bool checked = state == Qt::Checked;
|
||||
@@ -157,7 +174,9 @@ void CollectionSettingsPage::Load() {
|
||||
ui_->show_dividers->setChecked(s.value("show_dividers", true).toBool());
|
||||
ui_->startup_scan->setChecked(s.value("startup_scan", true).toBool());
|
||||
ui_->monitor->setChecked(s.value("monitor", true).toBool());
|
||||
ui_->mark_songs_unavailable->setChecked(s.value("mark_songs_unavailable", false).toBool());
|
||||
ui_->song_tracking->setChecked(s.value("song_tracking", false).toBool());
|
||||
ui_->mark_songs_unavailable->setChecked(ui_->song_tracking->isChecked() ? true : s.value("mark_songs_unavailable", true).toBool());
|
||||
ui_->expire_unavailable_songs_days->setValue(s.value("expire_unavailable_songs", 60).toInt());
|
||||
|
||||
QStringList filters = s.value("cover_art_patterns", QStringList() << "front" << "cover").toStringList();
|
||||
ui_->cover_art_patterns->setText(filters.join(","));
|
||||
@@ -216,7 +235,9 @@ void CollectionSettingsPage::Save() {
|
||||
s.setValue("show_dividers", ui_->show_dividers->isChecked());
|
||||
s.setValue("startup_scan", ui_->startup_scan->isChecked());
|
||||
s.setValue("monitor", ui_->monitor->isChecked());
|
||||
s.setValue("mark_songs_unavailable", ui_->mark_songs_unavailable->isChecked());
|
||||
s.setValue("song_tracking", ui_->song_tracking->isChecked());
|
||||
s.setValue("mark_songs_unavailable", ui_->song_tracking->isChecked() ? true : ui_->mark_songs_unavailable->isChecked());
|
||||
s.setValue("expire_unavailable_songs", ui_->expire_unavailable_songs_days->value());
|
||||
|
||||
QString filter_text = ui_->cover_art_patterns->text();
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ class CollectionSettingsPage : public SettingsPage {
|
||||
void Remove();
|
||||
|
||||
void CurrentRowChanged(const QModelIndex &idx);
|
||||
void SongTrackingToggled();
|
||||
void DiskCacheEnable(const int state);
|
||||
void CoverSaveInAlbumDirChanged();
|
||||
void ClearPixmapDiskCache();
|
||||
|
||||
@@ -92,6 +92,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="song_tracking">
|
||||
<property name="text">
|
||||
<string>Song fingerprinting and tracking</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="mark_songs_unavailable">
|
||||
<property name="text">
|
||||
@@ -99,6 +106,73 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_expire_unavailable_songs_after">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Expire unavailable songs after</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="expire_unavailable_songs_days">
|
||||
<property name="maximum">
|
||||
<number>365</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>60</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_expire_unavailable_songs_days">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>days</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_expire_unavailable_songs">
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_preferred_cover_filenames">
|
||||
<property name="text">
|
||||
|
||||
Reference in New Issue
Block a user