| 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 |
#include "video/VideoInfoTag.h" |
| 13 |
|
| 14 |
#include <map> |
| 15 |
#include <memory> |
| 16 |
#include <string> |
| 17 |
#include <vector> |
| 18 |
|
| 19 |
//! \brief Video tag loader from plugin source. |
| 20 |
class CVideoTagLoaderPlugin : public VIDEO::IVideoInfoTagLoader |
| 21 |
{ |
| 22 |
public: |
| 23 |
CVideoTagLoaderPlugin(const CFileItem& item, bool forceRefresh); |
| 24 |
|
| 25 |
~CVideoTagLoaderPlugin() override = default; |
| 26 |
|
| 27 |
//! \brief Returns whether or not read has info. |
| 28 |
bool HasInfo() const override; |
| 29 |
|
| 30 |
//! \brief Load "tag" from plugin. |
| 31 |
//! \param tag Tag to load info into |
| 32 |
CInfoScanner::INFO_TYPE Load(CVideoInfoTag& tag, bool prioritise, |
| 33 |
std::vector<EmbeddedArt>* = nullptr) override; |
| 34 |
|
| 35 |
inline std::unique_ptr<std::map<std::string, std::string>>& GetArt() |
| 36 |
{ |
| 37 |
return m_art; |
| 38 |
} |
| 39 |
protected: |
| 40 |
std::unique_ptr<CVideoInfoTag> m_tag; |
| 41 |
std::unique_ptr<std::map<std::string, std::string>> m_art; |
| 42 |
bool m_force_refresh; |
| 43 |
}; |