Commit eef512c2 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

IMediaLibrary: Don't allow a media to be fetched through its mrl

parent d5e8b315
...@@ -89,14 +89,6 @@ class IMediaLibrary ...@@ -89,14 +89,6 @@ class IMediaLibrary
* Calling this after initialize() is not a supported scenario. * Calling this after initialize() is not a supported scenario.
*/ */
virtual void setFsFactory( std::shared_ptr<factory::IFileSystem> fsFactory ) = 0; virtual void setFsFactory( std::shared_ptr<factory::IFileSystem> fsFactory ) = 0;
///
/// \brief addFile Adds a file to the media library.
/// \param path The absolute path to this file
/// \param parentFolder The parent folder, or nullptr to add this file as
/// a stand alone file.
/// \return The newly created file, or nullptr in case of error
///
virtual MediaPtr file( const std::string& path ) = 0;
/// Adds a folder and all the files it contains /// Adds a folder and all the files it contains
virtual FolderPtr folder( const std::string& path ) = 0; virtual FolderPtr folder( const std::string& path ) = 0;
......
...@@ -53,7 +53,7 @@ class MediaLibrary : public IMediaLibrary ...@@ -53,7 +53,7 @@ class MediaLibrary : public IMediaLibrary
std::vector<MediaPtr> files(); std::vector<MediaPtr> files();
virtual std::vector<MediaPtr> audioFiles() override; virtual std::vector<MediaPtr> audioFiles() override;
virtual std::vector<MediaPtr> videoFiles() override; virtual std::vector<MediaPtr> videoFiles() override;
virtual MediaPtr file( const std::string& path ) override; MediaPtr file( const std::string& path );
std::shared_ptr<Media> addFile(const std::string& path, Folder* parentFolder); std::shared_ptr<Media> addFile(const std::string& path, Folder* parentFolder);
virtual bool deleteFile(const Media* file ); virtual bool deleteFile(const Media* file );
......
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