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

IMedia: publicly expose last playback date

parent 1812b4a4
......@@ -126,6 +126,7 @@ class IMedia
virtual int64_t duration() const = 0;
virtual int playCount() const = 0;
virtual bool increasePlayCount() = 0;
virtual time_t lastPlayedDate() const = 0;
virtual ShowEpisodePtr showEpisode() const = 0;
virtual const std::vector<FilePtr>& files() const = 0;
/**
......
......@@ -187,6 +187,11 @@ bool Media::increasePlayCount()
return true;
}
time_t Media::lastPlayedDate() const
{
return m_lastPlayedDate;
}
bool Media::isFavorite() const
{
return m_isFavorite;
......
......@@ -91,6 +91,7 @@ class Media : public IMedia, public DatabaseHelpers<Media, policy::MediaTable>
virtual Query<ILabel> labels() const override;
virtual int playCount() const override;
virtual bool increasePlayCount() override;
virtual time_t lastPlayedDate() const override;
virtual bool isFavorite() const override;
virtual bool setFavorite( bool favorite ) override;
virtual const std::vector<FilePtr>& files() const 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