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

IMedia: Make thumbnail() const

parent a669a3a9
......@@ -129,7 +129,7 @@ class IMedia
/// \return A path, relative to the thumbnailPath configured when initializing
/// The media library
///
virtual const std::string& thumbnail() = 0;
virtual const std::string& thumbnail() const = 0;
///
/// \brief isThumbnailGenerated Returns true if a thumbnail generation was
/// attempted.
......
......@@ -267,7 +267,7 @@ Query<IAudioTrack> Media::audioTracks()
return make_query<AudioTrack, IAudioTrack>( m_ml, "*", req, m_id );
}
const std::string& Media::thumbnail()
const std::string& Media::thumbnail() const
{
if ( m_thumbnailId == 0 || m_thumbnailGenerated == false )
return Thumbnail::EmptyMrl;
......
......@@ -124,7 +124,7 @@ class Media : public IMedia, public DatabaseHelpers<Media, policy::MediaTable>
bool addAudioTrack( const std::string& codec, unsigned int bitrate, unsigned int sampleRate,
unsigned int nbChannels, const std::string& language, const std::string& desc );
virtual Query<IAudioTrack> audioTracks() override;
virtual const std::string& thumbnail() override;
virtual const std::string& thumbnail() const override;
virtual bool isThumbnailGenerated() const override;
virtual bool setThumbnail( const std::string &thumbnail ) override;
bool setThumbnail( const std::string& thumbnail, Thumbnail::Origin origin );
......
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