xbmc
MusicThumbLoader.h
1 /*
2  * Copyright (C) 2012-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 "ThumbLoader.h"
12 
13 #include <map>
14 
15 class CFileItem;
16 class CMusicDatabase;
17 class EmbeddedArt;
18 
20 {
21 public:
23  ~CMusicThumbLoader() override;
24 
25  void OnLoaderStart() override;
26  void OnLoaderFinish() override;
27 
28  bool LoadItem(CFileItem* pItem) override;
29  bool LoadItemCached(CFileItem* pItem) override;
30  bool LoadItemLookup(CFileItem* pItem) override;
31 
44  bool FillLibraryArt(CFileItem &item) override;
45 
52  virtual bool FillThumb(CFileItem &item, bool folderThumbs = true);
53 
54  static bool GetEmbeddedThumb(const std::string &path, EmbeddedArt &art);
55 
56 protected:
57  CMusicDatabase *m_musicDatabase;
58  typedef std::map<int, std::map<std::string, std::string> > ArtCache;
59  ArtCache m_albumArt;
60 };
Definition: MusicThumbLoader.h:19
Definition: EmbeddedArt.h:38
Class to store and read tag information.
Definition: MusicDatabase.h:98
virtual bool FillThumb(CFileItem &item, bool folderThumbs=true)
Fill the thumb of a music file/folder item First uses a cached thumb from a previous run...
Definition: MusicThumbLoader.cpp:137
bool FillLibraryArt(CFileItem &item) override
Helper function to fill all the art for a music library item This fetches the original url for each t...
Definition: MusicThumbLoader.cpp:153
bool LoadItemCached(CFileItem *pItem) override
Definition: MusicThumbLoader.cpp:55
Represents a file on a share.
Definition: FileItem.h:102
Definition: ThumbLoader.h:17