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

ShowEpisode: Make media_id & episode_number immutable

parent 0d2af34e
......@@ -39,14 +39,14 @@ int64_t ShowEpisode::* const ShowEpisode::Table::PrimaryKey = &ShowEpisode::m_id
ShowEpisode::ShowEpisode( MediaLibraryPtr ml, sqlite::Row& row )
: m_ml( ml )
, m_id( row.extract<decltype(m_id)>() )
, m_mediaId( row.extract<decltype(m_mediaId)>() )
, m_episodeNumber( row.extract<decltype(m_episodeNumber)>() )
, m_seasonNumber( row.extract<decltype(m_seasonNumber)>() )
, m_shortSummary( row.extract<decltype(m_shortSummary)>() )
, m_tvdbId( row.extract<decltype(m_tvdbId)>() )
, m_showId( row.extract<decltype(m_showId)>() )
{
row >> m_id
>> m_mediaId
>> m_episodeNumber
>> m_seasonNumber
>> m_shortSummary
>> m_tvdbId
>> m_showId;
}
ShowEpisode::ShowEpisode( MediaLibraryPtr ml, int64_t mediaId,
......
......@@ -65,12 +65,12 @@ class ShowEpisode : public IShowEpisode, public DatabaseHelpers<ShowEpisode>
private:
MediaLibraryPtr m_ml;
int64_t m_id;
int64_t m_mediaId;
unsigned int m_episodeNumber;
const int64_t m_mediaId;
const unsigned int m_episodeNumber;
unsigned int m_seasonNumber;
std::string m_shortSummary;
std::string m_tvdbId;
int64_t m_showId;
const int64_t m_showId;
ShowPtr m_show;
friend struct ShowEpisode::Table;
......
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