kodi
MusicAlbumInfo.h
1 /*
2  * Copyright (C) 2005-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 "addons/Scraper.h"
12 #include "music/Album.h"
13 #include "utils/ScraperUrl.h"
14 
15 class CXBMCTinyXML;
16 
17 namespace XFILE { class CCurlFile; }
18 
19 namespace MUSIC_GRABBER
20 {
22 {
23 public:
24  CMusicAlbumInfo() = default;
25  CMusicAlbumInfo(const std::string& strAlbumInfo, const CScraperUrl& strAlbumURL);
26  CMusicAlbumInfo(const std::string& strAlbum, const std::string& strArtist, const std::string& strAlbumInfo, const CScraperUrl& strAlbumURL);
27  virtual ~CMusicAlbumInfo() = default;
28 
29  bool Loaded() const { return m_bLoaded; }
30  void SetLoaded(bool bLoaded) { m_bLoaded = bLoaded; }
31  const CAlbum &GetAlbum() const { return m_album; }
32  CAlbum& GetAlbum() { return m_album; }
33  void SetAlbum(CAlbum& album);
34  const std::string& GetTitle2() const { return m_strTitle2; }
35  void SetTitle(const std::string& strTitle) { m_album.strAlbum = strTitle; }
36  const CScraperUrl& GetAlbumURL() const { return m_albumURL; }
37  float GetRelevance() const { return m_relevance; }
38  void SetRelevance(float relevance) { m_relevance = relevance; }
39 
40  bool Load(XFILE::CCurlFile& http, const ADDON::ScraperPtr& scraper);
41 
42 protected:
43  bool m_bLoaded = false;
44  CAlbum m_album;
45  float m_relevance = -1;
46  std::string m_strTitle2;
47  CScraperUrl m_albumURL;
48 };
49 
50 }
Definition: Scraper.h:41
Definition: MusicAlbumInfo.h:21
Definition: XBMCTinyXML.h:33
Definition: scraper.py:1
Definition: Album.h:26
Definition: CurlFile.h:24
Definition: Scraper.h:25
Definition: ScraperUrl.h:21