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.
11 #include "music/infoscanner/MusicInfoScanner.h"
12 #include "music/jobs/MusicLibraryJob.h"
17 \brief Music library job implementation for scanning items.
18 Uses CMusicInfoScanner for scanning and can be run with or
19 without a visible progress bar.
21 class CMusicLibraryScanningJob
: public CMusicLibraryJob
25 \brief Creates a new music library tag scanning and data scraping job.
26 \param[in] directory Directory to be scanned for new items
27 \param[in] flags What kind of scan to do
28 \param[in] showProgress Whether to show a progress bar or not
30 CMusicLibraryScanningJob(const std::string
& directory
, int flags
, bool showProgress
= true);
31 ~CMusicLibraryScanningJob() override
;
33 // specialization of CMusicLibraryJob
34 bool CanBeCancelled() const override
{ return true; }
35 bool Cancel() override
;
37 // specialization of CJob
38 const char *GetType() const override
{ return "MusicLibraryScanningJob"; }
39 bool operator==(const CJob
* job
) const override
;
42 // implementation of CMusicLibraryJob
43 bool Work(CMusicDatabase
&db
) override
;
46 MUSIC_INFO::CMusicInfoScanner m_scanner
;
47 std::string m_directory
;