[video] fix selection after changing video or extra art
[xbmc.git] / xbmc / pvr / PVRCachedImages.h
blob9dcdd24656f3303b547a7e5d92be25125813b719
1 /*
2 * Copyright (C) 2005-2021 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 <string>
12 #include <vector>
14 namespace PVR
17 struct PVRImagePattern
19 PVRImagePattern(const std::string& _owner, const std::string& _path) : owner(_owner), path(_path)
23 std::string owner;
24 std::string path;
27 class CPVRCachedImages
29 public:
30 /*!
31 * @brief Erase stale texture db entries and image files.
32 * @param urlPatterns The URL patterns to fetch from texture database.
33 * @param urlsToCheck The URLs to check for still being present in the texture db.
34 * @param clearTextureForPath Whether to clear the path in texture database.
35 * @return number of cleaned up images.
37 static int Cleanup(const std::vector<PVRImagePattern>& urlPatterns,
38 const std::vector<std::string>& urlsToCheck,
39 bool clearTextureForPath = false);
41 /*!
42 * @brief Extract the wrapped URL from an image URL.
43 * @param url The URL to unwrap.
44 * @return The unwrapped URL if url is an image URL, url otherwise.
46 static std::string UnwrapImageURL(const std::string& url);
49 } // namespace PVR