2 * Copyright (C) 2014-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 "video/VideoInfoScanner.h"
12 #include "video/jobs/VideoLibraryJob.h"
17 \brief Video library job implementation for scanning items.
19 Uses CVideoInfoScanner for the whole filesystem scanning and can be run with
20 or without a visible progress bar.
22 class CVideoLibraryScanningJob
: public CVideoLibraryJob
26 \brief Creates a new video library scanning job.
28 \param[in] directory Directory to be scanned for new items
29 \param[in] scanAll Whether to scan all items or not
30 \param[in] showProgress Whether to show a progress bar or not
32 CVideoLibraryScanningJob(const std::string
& directory
, bool scanAll
= false, bool showProgress
= true);
33 ~CVideoLibraryScanningJob() override
;
35 // specialization of CVideoLibraryJob
36 bool CanBeCancelled() const override
{ return true; }
37 bool Cancel() override
;
39 // specialization of CJob
40 const char *GetType() const override
{ return "VideoLibraryScanningJob"; }
41 bool operator==(const CJob
* job
) const override
;
44 // implementation of CVideoLibraryJob
45 bool Work(CVideoDatabase
&db
) override
;
48 KODI::VIDEO::CVideoInfoScanner m_scanner
;
49 std::string m_directory
;