Commit 51b704ad authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

IMedia: Expose the filename publicly

parent 3e6cc157
......@@ -111,6 +111,10 @@ class IMedia
virtual bool increasePlayCount() = 0;
virtual ShowEpisodePtr showEpisode() const = 0;
virtual const std::vector<FilePtr>& files() const = 0;
/**
* @return The main file's filename
*/
virtual const std::string& fileName() const = 0;
virtual FilePtr addExternalMrl( const std::string& mrl, IFile::Type type ) = 0;
virtual bool isFavorite() const = 0;
virtual bool setFavorite( bool favorite ) = 0;
......
......@@ -215,6 +215,11 @@ const std::vector<FilePtr>& Media::files() const
return m_files;
}
const std::string& Media::fileName() const
{
return m_filename;
}
MoviePtr Media::movie() const
{
if ( m_subType != SubType::Movie )
......
......@@ -115,6 +115,7 @@ class Media : public IMedia, public DatabaseHelpers<Media, policy::MediaTable>
virtual bool isFavorite() const override;
virtual bool setFavorite( bool favorite ) override;
virtual const std::vector<FilePtr>& files() const override;
virtual const std::string& fileName() const override;
virtual MoviePtr movie() const override;
void setMovie( MoviePtr movie );
bool addVideoTrack( const std::string& codec, unsigned int width, unsigned int height,
......
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