Organize: Remove unused "mark as listened" option
This commit is contained in:
parent
d29a1de980
commit
30269d9d95
|
@ -58,12 +58,11 @@ class MusicStorage {
|
|||
typedef std::function<void(float progress)> ProgressFunction;
|
||||
|
||||
struct CopyJob {
|
||||
CopyJob() : overwrite_(false), mark_as_listened_(false), remove_original_(false), albumcover_(false) {}
|
||||
CopyJob() : overwrite_(false), remove_original_(false), albumcover_(false) {}
|
||||
QString source_;
|
||||
QString destination_;
|
||||
Song metadata_;
|
||||
bool overwrite_;
|
||||
bool mark_as_listened_;
|
||||
bool remove_original_;
|
||||
bool albumcover_;
|
||||
QString cover_source_;
|
||||
|
|
|
@ -55,7 +55,7 @@ const int Organize::kBatchSize = 10;
|
|||
const int Organize::kTranscodeProgressInterval = 500;
|
||||
#endif
|
||||
|
||||
Organize::Organize(TaskManager *task_manager, std::shared_ptr<MusicStorage> destination, const OrganizeFormat &format, const bool copy, const bool overwrite, const bool mark_as_listened, const bool albumcover, const NewSongInfoList &songs_info, const bool eject_after, const QString &playlist, QObject *parent)
|
||||
Organize::Organize(TaskManager *task_manager, std::shared_ptr<MusicStorage> destination, const OrganizeFormat &format, const bool copy, const bool overwrite, const bool albumcover, const NewSongInfoList &songs_info, const bool eject_after, const QString &playlist, QObject *parent)
|
||||
: QObject(parent),
|
||||
thread_(nullptr),
|
||||
task_manager_(task_manager),
|
||||
|
@ -67,7 +67,6 @@ Organize::Organize(TaskManager *task_manager, std::shared_ptr<MusicStorage> dest
|
|||
format_(format),
|
||||
copy_(copy),
|
||||
overwrite_(overwrite),
|
||||
mark_as_listened_(mark_as_listened),
|
||||
albumcover_(albumcover),
|
||||
eject_after_(eject_after),
|
||||
task_count_(songs_info.count()),
|
||||
|
@ -225,7 +224,6 @@ void Organize::ProcessSomeFiles() {
|
|||
job.destination_ = task.song_info_.new_filename_;
|
||||
job.metadata_ = song;
|
||||
job.overwrite_ = overwrite_;
|
||||
job.mark_as_listened_ = mark_as_listened_;
|
||||
job.albumcover_ = albumcover_;
|
||||
job.remove_original_ = !copy_;
|
||||
job.playlist_ = playlist_;
|
||||
|
@ -262,9 +260,6 @@ void Organize::ProcessSomeFiles() {
|
|||
QFileInfo new_file = QFileInfo(root + "/" + task.song_info_.new_filename_);
|
||||
emit SongPathChanged(song, new_file, destination_->collection_directory_id());
|
||||
}
|
||||
if (job.mark_as_listened_) {
|
||||
emit FileCopied(job.metadata_.id());
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up the temporary transcoded file
|
||||
|
|
|
@ -61,7 +61,7 @@ class Organize : public QObject {
|
|||
};
|
||||
typedef QList<NewSongInfo> NewSongInfoList;
|
||||
|
||||
explicit Organize(TaskManager *task_manager, std::shared_ptr<MusicStorage> destination, const OrganizeFormat &format, const bool copy, const bool overwrite, const bool mark_as_listened, const bool albumcover, const NewSongInfoList &songs, const bool eject_after, const QString &playlist = QString(), QObject *parent = nullptr);
|
||||
explicit Organize(TaskManager *task_manager, std::shared_ptr<MusicStorage> destination, const OrganizeFormat &format, const bool copy, const bool overwrite, const bool albumcover, const NewSongInfoList &songs, const bool eject_after, const QString &playlist = QString(), QObject *parent = nullptr);
|
||||
~Organize() override;
|
||||
|
||||
static const int kBatchSize;
|
||||
|
@ -117,7 +117,6 @@ class Organize : public QObject {
|
|||
const OrganizeFormat format_;
|
||||
const bool copy_;
|
||||
const bool overwrite_;
|
||||
const bool mark_as_listened_;
|
||||
const bool albumcover_;
|
||||
const bool eject_after_;
|
||||
int task_count_;
|
||||
|
|
|
@ -187,7 +187,7 @@ void OrganizeDialog::accept() {
|
|||
|
||||
// It deletes itself when it's finished.
|
||||
const bool copy = ui_->aftercopying->currentIndex() == 0;
|
||||
Organize *organize = new Organize(task_manager_, storage, format_, copy, ui_->overwrite->isChecked(), ui_->mark_as_listened->isChecked(), ui_->albumcover->isChecked(), new_songs_info_, ui_->eject_after->isChecked(), playlist_);
|
||||
Organize *organize = new Organize(task_manager_, storage, format_, copy, ui_->overwrite->isChecked(), ui_->albumcover->isChecked(), new_songs_info_, ui_->eject_after->isChecked(), playlist_);
|
||||
QObject::connect(organize, &Organize::Finished, this, &OrganizeDialog::OrganizeFinished);
|
||||
QObject::connect(organize, &Organize::FileCopied, this, &OrganizeDialog::FileCopied);
|
||||
if (backend_) {
|
||||
|
@ -291,7 +291,6 @@ void OrganizeDialog::RestoreDefaults() {
|
|||
ui_->allow_ascii_ext->setChecked(false);
|
||||
ui_->replace_spaces->setChecked(true);
|
||||
ui_->overwrite->setChecked(false);
|
||||
ui_->mark_as_listened->setChecked(false);
|
||||
ui_->albumcover->setChecked(true);
|
||||
ui_->eject_after->setChecked(false);
|
||||
|
||||
|
@ -311,7 +310,6 @@ void OrganizeDialog::LoadSettings() {
|
|||
ui_->replace_spaces->setChecked(s.value("replace_spaces", true).toBool());
|
||||
ui_->overwrite->setChecked(s.value("overwrite", false).toBool());
|
||||
ui_->albumcover->setChecked(s.value("albumcover", true).toBool());
|
||||
ui_->mark_as_listened->setChecked(s.value("mark_as_listened", false).toBool());
|
||||
ui_->eject_after->setChecked(s.value("eject_after", false).toBool());
|
||||
|
||||
QString destination = s.value("destination").toString();
|
||||
|
@ -337,7 +335,6 @@ void OrganizeDialog::SaveSettings() {
|
|||
s.setValue("allow_ascii_ext", ui_->allow_ascii_ext->isChecked());
|
||||
s.setValue("replace_spaces", ui_->replace_spaces->isChecked());
|
||||
s.setValue("overwrite", ui_->overwrite->isChecked());
|
||||
s.setValue("mark_as_listened", ui_->overwrite->isChecked());
|
||||
s.setValue("albumcover", ui_->albumcover->isChecked());
|
||||
s.setValue("destination", ui_->destination->currentText());
|
||||
s.setValue("eject_after", ui_->eject_after->isChecked());
|
||||
|
|
|
@ -145,13 +145,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="mark_as_listened">
|
||||
<property name="text">
|
||||
<string>Mark as listened</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="albumcover">
|
||||
<property name="text">
|
||||
|
@ -306,7 +299,6 @@
|
|||
<tabstop>allow_ascii_ext</tabstop>
|
||||
<tabstop>replace_spaces</tabstop>
|
||||
<tabstop>overwrite</tabstop>
|
||||
<tabstop>mark_as_listened</tabstop>
|
||||
<tabstop>albumcover</tabstop>
|
||||
<tabstop>eject_after</tabstop>
|
||||
<tabstop>preview</tabstop>
|
||||
|
|
Loading…
Reference in New Issue