Commit 069b7f55 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

IMediaLibrary: Add a playlist getter

parent 7e26aa41
......@@ -158,6 +158,7 @@ class IMediaLibrary
*/
virtual PlaylistPtr createPlaylist( const std::string& name ) = 0;
virtual std::vector<PlaylistPtr> playlists( medialibrary::SortingCriteria sort = medialibrary::SortingCriteria::Default, bool desc = false ) = 0;
virtual PlaylistPtr playlist( int64_t id ) const = 0;
virtual bool deletePlaylist( int64_t playlistId ) = 0;
/**
......
......@@ -394,6 +394,11 @@ std::vector<PlaylistPtr> MediaLibrary::playlists(medialibrary::SortingCriteria s
return Playlist::listAll( this, sort, desc );
}
PlaylistPtr MediaLibrary::playlist( int64_t id ) const
{
return Playlist::fetch( this, id );
}
bool MediaLibrary::deletePlaylist( int64_t playlistId )
{
return Playlist::destroy( this, playlistId );
......
......@@ -87,6 +87,7 @@ class MediaLibrary : public IMediaLibrary
virtual PlaylistPtr createPlaylist( const std::string& name ) override;
virtual std::vector<PlaylistPtr> playlists( medialibrary::SortingCriteria sort, bool desc ) override;
virtual PlaylistPtr playlist( int64_t id ) const override;
virtual bool deletePlaylist( int64_t playlistId ) override;
virtual bool addToHistory( const std::string& mrl );
......
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