Add option for overwriting playcounts

Fixes #962
This commit is contained in:
Jonas Kvinge
2022-06-05 04:59:50 +02:00
parent 0ee67f186f
commit 6c0b395f4a
7 changed files with 19 additions and 7 deletions

View File

@@ -221,6 +221,7 @@ void CollectionSettingsPage::Load() {
ui_->checkbox_save_playcounts->setChecked(s.value("save_playcounts", false).toBool());
ui_->checkbox_save_ratings->setChecked(s.value("save_ratings", false).toBool());
ui_->checkbox_overwrite_playcount->setChecked(s.value("overwrite_playcount", false).toBool());
ui_->checkbox_overwrite_rating->setChecked(s.value("overwrite_rating", false).toBool());
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
@@ -301,6 +302,7 @@ void CollectionSettingsPage::Save() {
s.setValue("save_playcounts", ui_->checkbox_save_playcounts->isChecked());
s.setValue("save_ratings", ui_->checkbox_save_ratings->isChecked());
s.setValue("overwrite_playcount", ui_->checkbox_overwrite_playcount->isChecked());
s.setValue("overwrite_rating", ui_->checkbox_overwrite_rating->isChecked());
s.setValue("delete_files", ui_->checkbox_delete_files->isChecked());

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>516</width>
<height>1490</height>
<height>1513</height>
</rect>
</property>
<property name="windowTitle">
@@ -560,6 +560,13 @@ If there are no matches then it will use the largest image in the directory.</st
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkbox_overwrite_playcount">
<property name="text">
<string>Overwrite database playcount when songs are re-read from disk</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkbox_overwrite_rating">
<property name="text">