[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / video / jobs / VideoLibraryRefreshingJob.h
blobe98f4c06489bb19d948446892b4556b4aeeb5a27
1 /*
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.
7 */
9 #pragma once
11 #include "video/jobs/VideoLibraryProgressJob.h"
13 #include <memory>
14 #include <string>
16 class CFileItem;
18 /*!
19 \brief Video library job implementation for refreshing a single item.
21 class CVideoLibraryRefreshingJob : public CVideoLibraryProgressJob
23 public:
24 /*!
25 \brief Creates a new video library cleaning job for the given paths.
27 \param[inout] item Video item to be refreshed
28 \param[in] forceRefresh Whether to force a complete refresh (including NFO or internet lookup)
29 \param[in] refreshAll Whether to refresh all sub-items (in case of a tvshow)
30 \param[in] ignoreNfo Whether or not to ignore local NFO files
31 \param[in] searchTitle Title to use for the search (instead of determining it from the item's filename/path)
33 CVideoLibraryRefreshingJob(std::shared_ptr<CFileItem> item,
34 bool forceRefresh,
35 bool refreshAll,
36 bool ignoreNfo = false,
37 const std::string& searchTitle = "");
39 ~CVideoLibraryRefreshingJob() override;
41 // specialization of CJob
42 const char *GetType() const override { return "VideoLibraryRefreshingJob"; }
43 bool operator==(const CJob* job) const override;
45 protected:
46 // implementation of CVideoLibraryJob
47 bool Work(CVideoDatabase &db) override;
49 private:
50 std::shared_ptr<CFileItem> m_item;
51 bool m_forceRefresh;
52 bool m_refreshAll;
53 bool m_ignoreNfo;
54 std::string m_searchTitle;