Commit 62e4883f authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

IArtist: Expose nbAlbums/nbTracks

parent e0f218fd
......@@ -41,6 +41,8 @@ public:
virtual std::vector<MediaPtr> media( SortingCriteria sort = SortingCriteria::Default, bool desc = false ) const = 0;
virtual const std::string& artworkMrl() const = 0;
virtual const std::string& musicBrainzId() const = 0;
virtual unsigned int nbAlbums() const = 0;
virtual unsigned int nbTracks() const = 0;
};
}
......@@ -191,6 +191,11 @@ bool Artist::setMusicBrainzId( const std::string& mbId )
return true;
}
unsigned int Artist::nbAlbums() const
{
return m_nbAlbums;
}
unsigned int Artist::nbTracks() const
{
return m_nbTracks;
......
......@@ -62,7 +62,8 @@ public:
std::shared_ptr<Album> unknownAlbum();
virtual const std::string& musicBrainzId() const override;
bool setMusicBrainzId( const std::string& musicBrainzId );
unsigned int nbTracks() const;
virtual unsigned int nbAlbums() const override;
virtual unsigned int nbTracks() const override;
static void createTable( sqlite::Connection* dbConnection );
static void createTriggers( sqlite::Connection* dbConnection );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment