changed: Add logic to properly handle subtitles for stacked files
[vuplus_xbmc] / xbmc / music / infoscanner / MusicAlbumInfo.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-2013 Team XBMC
5  *      http://xbmc.org
6  *
7  *  This Program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2, or (at your option)
10  *  any later version.
11  *
12  *  This Program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with XBMC; see the file COPYING.  If not, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #include "music/Song.h"
24 #include "music/Album.h"
25 #include "addons/Scraper.h"
26 #include "utils/ScraperUrl.h"
27
28 class CXBMCTinyXML;
29
30 namespace XFILE { class CCurlFile; }
31
32 namespace MUSIC_GRABBER
33 {
34 class CMusicAlbumInfo
35 {
36 public:
37   CMusicAlbumInfo() : m_bLoaded(false), m_relevance(-1) {}
38   CMusicAlbumInfo(const CStdString& strAlbumInfo, const CScraperUrl& strAlbumURL);
39   CMusicAlbumInfo(const CStdString& strAlbum, const CStdString& strArtist, const CStdString& strAlbumInfo, const CScraperUrl& strAlbumURL);
40   virtual ~CMusicAlbumInfo() {}
41
42   bool Loaded() const { return m_bLoaded; }
43   void SetLoaded(bool bLoaded) { m_bLoaded = bLoaded; }
44   const CAlbum &GetAlbum() const { return m_album; }
45   CAlbum& GetAlbum() { return m_album; }
46   void SetAlbum(CAlbum& album);
47   const VECSONGS &GetSongs() const { return m_album.songs; }
48   const CStdString& GetTitle2() const { return m_strTitle2; }
49   void SetTitle(const CStdString& strTitle) { m_album.strAlbum = strTitle; }
50   const CScraperUrl& GetAlbumURL() const { return m_albumURL; }
51   float GetRelevance() const { return m_relevance; }
52   void SetRelevance(float relevance) { m_relevance = relevance; }
53
54   bool Load(XFILE::CCurlFile& http, const ADDON::ScraperPtr& scraper);
55
56 protected:
57   bool m_bLoaded;
58   CAlbum m_album;
59   float m_relevance;
60   CStdString m_strTitle2;
61   CScraperUrl m_albumURL;
62 };
63
64 }