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

IShow: Constify episodes & tvdb id getters

parent 15e08389
......@@ -37,8 +37,8 @@ class IShow
virtual time_t releaseDate() const = 0;
virtual const std::string& shortSummary() const = 0;
virtual const std::string& artworkMrl() const = 0;
virtual const std::string& tvdbId() = 0;
virtual Query<IShowEpisode> episodes() = 0;
virtual const std::string& tvdbId() const = 0;
virtual Query<IShowEpisode> episodes() const = 0;
virtual uint32_t nbSeasons() const = 0;
virtual uint32_t nbEpisodes() const = 0;
};
......
......@@ -114,7 +114,7 @@ bool Show::setArtworkMrl( const std::string& artworkMrl )
return true;
}
const std::string& Show::tvdbId()
const std::string& Show::tvdbId() const
{
return m_tvdbId;
}
......@@ -137,7 +137,7 @@ std::shared_ptr<ShowEpisode> Show::addEpisode( Media& media, const std::string&
return episode;
}
Query<IShowEpisode> Show::episodes()
Query<IShowEpisode> Show::episodes() const
{
static const std::string req = "FROM " + policy::ShowEpisodeTable::Name
+ " WHERE show_id = ?";
......
......@@ -60,10 +60,10 @@ class Show : public IShow, public DatabaseHelpers<Show, policy::ShowTable>
bool setShortSummary( const std::string& summary );
virtual const std::string& artworkMrl() const override;
bool setArtworkMrl( const std::string& artworkMrl );
virtual const std::string& tvdbId() override;
virtual const std::string& tvdbId() const override;
bool setTvdbId( const std::string& summary );
std::shared_ptr<ShowEpisode> addEpisode( Media& media, const std::string& title, unsigned int episodeNumber );
virtual Query<IShowEpisode> episodes() override;
virtual Query<IShowEpisode> episodes() const override;
virtual uint32_t nbSeasons() const override;
virtual uint32_t nbEpisodes() 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