[video] fix selection after changing video or extra art
[xbmc.git] / xbmc / video / VideoItemArtworkHandler.h
blob01613ef7d02234396d6060563460c33d1acddcc3
1 /*
2 * Copyright (C) 2005-2023 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 <memory>
12 #include <string>
13 #include <vector>
15 class CFileItem;
16 class CMediaSource;
18 namespace VIDEO
20 class IVideoItemArtworkHandler
22 public:
23 virtual ~IVideoItemArtworkHandler() = default;
25 virtual std::string GetCurrentArt() const = 0;
27 virtual std::string GetEmbeddedArt() const { return {}; }
28 virtual std::vector<std::string> GetRemoteArt() const { return {}; }
29 virtual std::string GetLocalArt() const { return {}; }
31 virtual std::string GetDefaultIcon() const = 0;
32 virtual bool SupportsFlippedArt() const { return false; }
34 virtual void AddItemPathToFileBrowserSources(std::vector<CMediaSource>& sources) {}
36 virtual std::string UpdateEmbeddedArt(const std::string& art) { return art; }
37 virtual std::string UpdateRemoteArt(const std::vector<std::string>& art, int index)
39 return art[index];
42 virtual void PersistArt(const std::string& art) = 0;
45 class IVideoItemArtworkHandlerFactory
47 public:
48 static std::unique_ptr<IVideoItemArtworkHandler> Create(const std::shared_ptr<CFileItem>& item,
49 const std::string& mediaType,
50 const std::string& artType);
53 } // namespace VIDEO