2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
9 #include "MusicLibraryCleaningJob.h"
11 #include "dialogs/GUIDialogProgress.h"
12 #include "music/MusicDatabase.h"
14 CMusicLibraryCleaningJob::CMusicLibraryCleaningJob(CGUIDialogProgress
* progressDialog
)
15 : CMusicLibraryProgressJob(nullptr)
18 SetProgressIndicators(nullptr, progressDialog
);
22 CMusicLibraryCleaningJob::~CMusicLibraryCleaningJob() = default;
24 bool CMusicLibraryCleaningJob::operator==(const CJob
* job
) const
26 if (strcmp(job
->GetType(), GetType()) != 0)
29 const CMusicLibraryCleaningJob
* cleaningJob
= dynamic_cast<const CMusicLibraryCleaningJob
*>(job
);
30 if (cleaningJob
== nullptr)
36 bool CMusicLibraryCleaningJob::Work(CMusicDatabase
&db
)
38 db
.Cleanup(GetProgressDialog());