| 1 |
/* |
| 2 |
* Copyright (C) 2005-2018 Team Kodi |
| 3 |
* This file is part of Kodi - https://kodi.tv |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSES/README.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "IVideoInfoTagLoader.h" |
| 12 |
|
| 13 |
#include <string> |
| 14 |
#include <vector> |
| 15 |
|
| 16 |
//! \brief Video tag loader using nfo files. |
| 17 |
class CVideoTagLoaderNFO : public VIDEO::IVideoInfoTagLoader |
| 18 |
{ |
| 19 |
public: |
| 20 |
CVideoTagLoaderNFO(const CFileItem& item, |
| 21 |
ADDON::ScraperPtr info, |
| 22 |
bool lookInFolder); |
| 23 |
|
| 24 |
~CVideoTagLoaderNFO() override = default; |
| 25 |
|
| 26 |
//! \brief Returns whether or not read has info. |
| 27 |
bool HasInfo() const override; |
| 28 |
|
| 29 |
//! \brief Load "tag" from nfo file. |
| 30 |
//! \brief tag Tag to load info into |
| 31 |
CInfoScanner::INFO_TYPE Load(CVideoInfoTag& tag, bool prioritise, |
| 32 |
std::vector<EmbeddedArt>* = nullptr) override; |
| 33 |
|
| 34 |
protected: |
| 35 |
//! \brief Find nfo file for item |
| 36 |
//! \param item The item to find NFO file for |
| 37 |
//! \param movieFolder If true, look for movie.nfo |
| 38 |
std::string FindNFO(const CFileItem& item, bool movieFolder) const; |
| 39 |
|
| 40 |
std::string m_path; //!< Path to nfo file |
| 41 |
}; |