Merge pull request #26220 from 78andyp/blurayfixes
[xbmc.git] / xbmc / utils / ArtUtils.h
blob99848308b22b2c4b659e046960c04f2b0cbd9527
1 /*
2 * Copyright (C) 2024 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>
13 class CFileItem;
15 namespace KODI::ART
18 //! \brief Set default icon for item.
19 void FillInDefaultIcon(CFileItem& item);
21 /*!
22 * \brief Get the folder image associated with item.
23 * \param item Item to get folder image for
24 * \param folderJPG Thumb file to use
25 * \return Folder thumb file appropriate for item
27 std::string GetFolderThumb(const CFileItem& item, const std::string& folderJPG = "folder.jpg");
29 /*! \brief Assemble the filename of a particular piece of local artwork for an item.
30 No file existence check is typically performed.
31 \param artFile the art file to search for.
32 \param useFolder whether to look in the folder for the art file. Defaults to false.
33 \return the path to the local artwork.
34 \sa FindLocalArt
36 std::string GetLocalArt(const CFileItem& item, const std::string& artFile, bool useFolder = false);
38 /*!
39 \brief Assemble the base filename of local artwork for an item,
40 accounting for archives, stacks and multi-paths, and BDMV/VIDEO_TS folders.
41 \param useFolder whether to look in the folder for the art file. Defaults to false.
42 \return the path to the base filename for artwork lookup.
43 \sa GetLocalArt
45 std::string GetLocalArtBaseFilename(const CFileItem& item, bool& useFolder);
47 /*!
48 \brief Get the local fanart for item if it exists
49 \return path to the local fanart for this item, or empty if none exists
50 \sa GetFolderThumb, GetTBNFile
52 std::string GetLocalFanart(const CFileItem& item);
54 //! \brief Get the .tbn file associated with an item
55 std::string GetTBNFile(const CFileItem& item);
57 } // namespace KODI::ART