summaryrefslogtreecommitdiffstats
path: root/xbmc/music/MusicInfoLoader.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/music/MusicInfoLoader.h')
-rw-r--r--xbmc/music/MusicInfoLoader.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/xbmc/music/MusicInfoLoader.h b/xbmc/music/MusicInfoLoader.h
new file mode 100644
index 0000000..d6cab41
--- /dev/null
+++ b/xbmc/music/MusicInfoLoader.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2005-2018 Team Kodi
+ * This file is part of Kodi - https://kodi.tv
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * See LICENSES/README.md for more information.
+ */
+
+#pragma once
+
+#include "BackgroundInfoLoader.h"
+#include "MusicDatabase.h"
+
+class CFileItemList;
+class CMusicThumbLoader;
+
+namespace MUSIC_INFO
+{
+class CMusicInfoLoader : public CBackgroundInfoLoader
+{
+public:
+ CMusicInfoLoader();
+ ~CMusicInfoLoader() override;
+
+ void UseCacheOnHD(const std::string& strFileName);
+ bool LoadItem(CFileItem* pItem) override;
+ bool LoadItemCached(CFileItem* pItem) override;
+ bool LoadItemLookup(CFileItem* pItem) override;
+ static bool LoadAdditionalTagInfo(CFileItem* pItem);
+
+protected:
+ void OnLoaderStart() override;
+ void OnLoaderFinish() override;
+ void LoadCache(const std::string& strFileName, CFileItemList& items);
+ void SaveCache(const std::string& strFileName, CFileItemList& items);
+protected:
+ std::string m_strCacheFileName;
+ CFileItemList* m_mapFileItems;
+ MAPSONGS m_songsMap;
+ std::string m_strPrevPath;
+ CMusicDatabase m_musicDatabase;
+ unsigned int m_databaseHits;
+ unsigned int m_tagReads;
+ CMusicThumbLoader *m_thumbLoader;
+};
+}