2 * Copyright (C) 2012-2018 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.
11 #include "ThumbLoader.h"
19 class CMusicThumbLoader
: public CThumbLoader
23 ~CMusicThumbLoader() override
;
25 void OnLoaderStart() override
;
26 void OnLoaderFinish() override
;
28 bool LoadItem(CFileItem
* pItem
) override
;
29 bool LoadItemCached(CFileItem
* pItem
) override
;
30 bool LoadItemLookup(CFileItem
* pItem
) override
;
32 /*! \brief Helper function to fill all the art for a music library item
33 This fetches the original url for each type of art, and sets fallback thumb and fanart.
34 For songs the art for the related album and artist(s) is also set, and for albums that
35 of the related artist(s). Art type is named according to media type of the item,
37 artists may have "thumb", "fanart", "logo", "poster" etc.,
38 albums may have "thumb", "spine" etc. and "artist.thumb", "artist.fanart" etc.,
39 songs may have "thumb", "album.thumb", "artist.thumb", "artist.fanart", "artist.logo",...
40 "artist1.thumb", "artist1.fanart",... "albumartist.thumb", "albumartist1.thumb" etc.
41 \param item a music CFileItem
42 \return true if we fill art, false if there is no art found
44 bool FillLibraryArt(CFileItem
&item
) override
;
46 /*! \brief Fill the thumb of a music file/folder item
47 First uses a cached thumb from a previous run, then checks for a local thumb
48 and caches it for the next run
49 \param item the CFileItem object to fill
50 \return true if we fill the thumb, false otherwise
52 virtual bool FillThumb(CFileItem
&item
, bool folderThumbs
= true);
54 static bool GetEmbeddedThumb(const std::string
&path
, EmbeddedArt
&art
);
57 CMusicDatabase
*m_musicDatabase
;
58 typedef std::map
<int, std::map
<std::string
, std::string
> > ArtCache
;