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 "MusicLibraryExportJob.h"
11 #include "dialogs/GUIDialogProgress.h"
12 #include "music/MusicDatabase.h"
13 #include "settings/LibExportSettings.h"
15 CMusicLibraryExportJob::CMusicLibraryExportJob(const CLibExportSettings
& settings
, CGUIDialogProgress
* progressDialog
)
16 : CMusicLibraryProgressJob(NULL
),
20 SetProgressIndicators(NULL
, progressDialog
);
24 CMusicLibraryExportJob::~CMusicLibraryExportJob() = default;
26 bool CMusicLibraryExportJob::operator==(const CJob
* job
) const
28 if (strcmp(job
->GetType(), GetType()) != 0)
31 const CMusicLibraryExportJob
* exportJob
= dynamic_cast<const CMusicLibraryExportJob
*>(job
);
32 if (exportJob
== NULL
)
35 return !(m_settings
!= exportJob
->m_settings
);
38 bool CMusicLibraryExportJob::Work(CMusicDatabase
&db
)
40 db
.ExportToXML(m_settings
, GetProgressDialog());