Commit 92c06dc1 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

MediaLibrary: Expose album listing

parent 05bffee7
......@@ -67,6 +67,7 @@ class IMediaLibrary
virtual std::vector<FilePtr> videoFiles() = 0;
virtual AlbumPtr album( const std::string& title ) = 0;
virtual AlbumPtr createAlbum( const std::string& title ) = 0;
virtual std::vector<AlbumPtr> albums() = 0;
virtual ShowPtr show( const std::string& name ) = 0;
virtual ShowPtr createShow( const std::string& name ) = 0;
virtual MoviePtr movie( const std::string& title ) = 0;
......
......@@ -215,6 +215,11 @@ AlbumPtr MediaLibrary::createAlbum(const std::string& title )
return Album::create( m_dbConnection, title );
}
std::vector<AlbumPtr> MediaLibrary::albums()
{
return Album::fetchAll( m_dbConnection );
}
ShowPtr MediaLibrary::show(const std::string& name)
{
static const std::string req = "SELECT * FROM " + policy::ShowTable::Name
......
......@@ -35,6 +35,7 @@ class MediaLibrary : public IMediaLibrary, public IDiscovererCb
virtual AlbumPtr album( const std::string& title ) override;
virtual AlbumPtr createAlbum( const std::string& title ) override;
virtual std::vector<AlbumPtr> albums() override;
virtual ShowPtr show( const std::string& name ) override;
virtual ShowPtr createShow( const std::string& name ) override;
......
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