Commit b519cad1 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Remove last_sync_date

parent 8ef76c00
...@@ -39,7 +39,6 @@ class IAlbum ...@@ -39,7 +39,6 @@ class IAlbum
virtual unsigned int releaseYear() const = 0; virtual unsigned int releaseYear() const = 0;
virtual const std::string& shortSummary() const = 0; virtual const std::string& shortSummary() const = 0;
virtual const std::string& artworkMrl() const = 0; virtual const std::string& artworkMrl() const = 0;
virtual time_t lastSyncDate() const = 0;
/** /**
* @brief tracks fetches album tracks from the database * @brief tracks fetches album tracks from the database
*/ */
......
...@@ -32,7 +32,6 @@ class IShow ...@@ -32,7 +32,6 @@ class IShow
virtual unsigned int id() const = 0; virtual unsigned int id() const = 0;
virtual const std::string& name() const = 0; virtual const std::string& name() const = 0;
virtual time_t releaseDate() const = 0; virtual time_t releaseDate() const = 0;
virtual time_t lastSyncDate() const = 0;
virtual const std::string& shortSummary() const = 0; virtual const std::string& shortSummary() const = 0;
virtual const std::string& artworkMrl() const = 0; virtual const std::string& artworkMrl() const = 0;
virtual const std::string& tvdbId() = 0; virtual const std::string& tvdbId() = 0;
......
...@@ -35,7 +35,6 @@ class IShowEpisode ...@@ -35,7 +35,6 @@ class IShowEpisode
virtual unsigned int id() const = 0; virtual unsigned int id() const = 0;
virtual const std::string& artworkMrl() const = 0; virtual const std::string& artworkMrl() const = 0;
virtual unsigned int episodeNumber() const = 0; virtual unsigned int episodeNumber() const = 0;
virtual time_t lastSyncDate() const = 0;
virtual const std::string& name() const = 0; virtual const std::string& name() const = 0;
virtual unsigned int seasonNumber() const = 0; virtual unsigned int seasonNumber() const = 0;
virtual const std::string& shortSummary() const = 0; virtual const std::string& shortSummary() const = 0;
......
...@@ -42,7 +42,6 @@ Album::Album(DBConnection dbConnection, sqlite::Row& row) ...@@ -42,7 +42,6 @@ Album::Album(DBConnection dbConnection, sqlite::Row& row)
>> m_releaseYear >> m_releaseYear
>> m_shortSummary >> m_shortSummary
>> m_artworkMrl >> m_artworkMrl
>> m_lastSyncDate
>> m_nbTracks >> m_nbTracks
>> m_isPresent; >> m_isPresent;
} }
...@@ -52,7 +51,6 @@ Album::Album(const std::string& title ) ...@@ -52,7 +51,6 @@ Album::Album(const std::string& title )
, m_title( title ) , m_title( title )
, m_artistId( 0 ) , m_artistId( 0 )
, m_releaseYear( ~0u ) , m_releaseYear( ~0u )
, m_lastSyncDate( 0 )
, m_nbTracks( 0 ) , m_nbTracks( 0 )
, m_isPresent( true ) , m_isPresent( true )
{ {
...@@ -62,7 +60,6 @@ Album::Album( const Artist* artist ) ...@@ -62,7 +60,6 @@ Album::Album( const Artist* artist )
: m_id( 0 ) : m_id( 0 )
, m_artistId( artist->id() ) , m_artistId( artist->id() )
, m_releaseYear( ~0u ) , m_releaseYear( ~0u )
, m_lastSyncDate( 0 )
, m_nbTracks( 0 ) , m_nbTracks( 0 )
, m_isPresent( true ) , m_isPresent( true )
{ {
...@@ -137,11 +134,6 @@ bool Album::setArtworkMrl( const std::string& artworkMrl ) ...@@ -137,11 +134,6 @@ bool Album::setArtworkMrl( const std::string& artworkMrl )
return true; return true;
} }
time_t Album::lastSyncDate() const
{
return m_lastSyncDate;
}
std::vector<MediaPtr> Album::tracks() const std::vector<MediaPtr> Album::tracks() const
{ {
static const std::string req = "SELECT med.* FROM " + policy::MediaTable::Name + " med " static const std::string req = "SELECT med.* FROM " + policy::MediaTable::Name + " med "
...@@ -237,7 +229,6 @@ bool Album::createTable(DBConnection dbConnection ) ...@@ -237,7 +229,6 @@ bool Album::createTable(DBConnection dbConnection )
"release_year UNSIGNED INTEGER," "release_year UNSIGNED INTEGER,"
"short_summary TEXT," "short_summary TEXT,"
"artwork_mrl TEXT," "artwork_mrl TEXT,"
"last_sync_date UNSIGNED INTEGER,"
"nb_tracks UNSIGNED INTEGER DEFAULT 0," "nb_tracks UNSIGNED INTEGER DEFAULT 0,"
"is_present BOOLEAN NOT NULL DEFAULT 1," "is_present BOOLEAN NOT NULL DEFAULT 1,"
"FOREIGN KEY( artist_id ) REFERENCES " + policy::ArtistTable::Name "FOREIGN KEY( artist_id ) REFERENCES " + policy::ArtistTable::Name
......
...@@ -71,7 +71,6 @@ class Album : public IAlbum, public DatabaseHelpers<Album, policy::AlbumTable> ...@@ -71,7 +71,6 @@ class Album : public IAlbum, public DatabaseHelpers<Album, policy::AlbumTable>
bool setShortSummary( const std::string& summary ); bool setShortSummary( const std::string& summary );
virtual const std::string& artworkMrl() const override; virtual const std::string& artworkMrl() const override;
bool setArtworkMrl( const std::string& artworkMrl ); bool setArtworkMrl( const std::string& artworkMrl );
virtual time_t lastSyncDate() const override;
virtual std::vector<MediaPtr> tracks() const override; virtual std::vector<MediaPtr> tracks() const override;
std::shared_ptr<AlbumTrack> addTrack(std::shared_ptr<Media> media, unsigned int trackNb , unsigned int discNumber); std::shared_ptr<AlbumTrack> addTrack(std::shared_ptr<Media> media, unsigned int trackNb , unsigned int discNumber);
unsigned int nbTracks() const override; unsigned int nbTracks() const override;
...@@ -95,7 +94,6 @@ class Album : public IAlbum, public DatabaseHelpers<Album, policy::AlbumTable> ...@@ -95,7 +94,6 @@ class Album : public IAlbum, public DatabaseHelpers<Album, policy::AlbumTable>
unsigned int m_releaseYear; unsigned int m_releaseYear;
std::string m_shortSummary; std::string m_shortSummary;
std::string m_artworkMrl; std::string m_artworkMrl;
time_t m_lastSyncDate;
unsigned int m_nbTracks; unsigned int m_nbTracks;
bool m_isPresent; bool m_isPresent;
......
...@@ -36,7 +36,6 @@ Show::Show( DBConnection dbConnection, sqlite::Row& row ) ...@@ -36,7 +36,6 @@ Show::Show( DBConnection dbConnection, sqlite::Row& row )
>> m_releaseDate >> m_releaseDate
>> m_shortSummary >> m_shortSummary
>> m_artworkMrl >> m_artworkMrl
>> m_lastSyncDate
>> m_tvdbId; >> m_tvdbId;
} }
...@@ -44,7 +43,6 @@ Show::Show( const std::string& name ) ...@@ -44,7 +43,6 @@ Show::Show( const std::string& name )
: m_id( 0 ) : m_id( 0 )
, m_name( name ) , m_name( name )
, m_releaseDate( 0 ) , m_releaseDate( 0 )
, m_lastSyncDate( 0 )
{ {
} }
...@@ -103,11 +101,6 @@ bool Show::setArtworkMrl( const std::string& artworkMrl ) ...@@ -103,11 +101,6 @@ bool Show::setArtworkMrl( const std::string& artworkMrl )
return true; return true;
} }
time_t Show::lastSyncDate() const
{
return m_lastSyncDate;
}
const std::string& Show::tvdbId() const std::string& Show::tvdbId()
{ {
return m_tvdbId; return m_tvdbId;
...@@ -143,7 +136,6 @@ bool Show::createTable(DBConnection dbConnection) ...@@ -143,7 +136,6 @@ bool Show::createTable(DBConnection dbConnection)
"release_date UNSIGNED INTEGER," "release_date UNSIGNED INTEGER,"
"short_summary TEXT," "short_summary TEXT,"
"artwork_mrl TEXT," "artwork_mrl TEXT,"
"last_sync_date UNSIGNED INTEGER,"
"tvdb_id TEXT" "tvdb_id TEXT"
")"; ")";
return sqlite::Tools::executeRequest( dbConnection, req ); return sqlite::Tools::executeRequest( dbConnection, req );
......
...@@ -56,7 +56,6 @@ class Show : public IShow, public DatabaseHelpers<Show, policy::ShowTable> ...@@ -56,7 +56,6 @@ class Show : public IShow, public DatabaseHelpers<Show, policy::ShowTable>
bool setShortSummary( const std::string& summary ); bool setShortSummary( const std::string& summary );
virtual const std::string& artworkMrl() const override; virtual const std::string& artworkMrl() const override;
bool setArtworkMrl( const std::string& artworkMrl ); bool setArtworkMrl( const std::string& artworkMrl );
virtual time_t lastSyncDate() const override;
virtual const std::string& tvdbId() override; virtual const std::string& tvdbId() override;
bool setTvdbId( const std::string& summary ); bool setTvdbId( const std::string& summary );
std::shared_ptr<ShowEpisode> addEpisode( const std::string& title, unsigned int episodeNumber ); std::shared_ptr<ShowEpisode> addEpisode( const std::string& title, unsigned int episodeNumber );
...@@ -72,7 +71,6 @@ class Show : public IShow, public DatabaseHelpers<Show, policy::ShowTable> ...@@ -72,7 +71,6 @@ class Show : public IShow, public DatabaseHelpers<Show, policy::ShowTable>
time_t m_releaseDate; time_t m_releaseDate;
std::string m_shortSummary; std::string m_shortSummary;
std::string m_artworkMrl; std::string m_artworkMrl;
time_t m_lastSyncDate;
std::string m_tvdbId; std::string m_tvdbId;
friend struct policy::ShowTable; friend struct policy::ShowTable;
......
...@@ -35,7 +35,6 @@ ShowEpisode::ShowEpisode(DBConnection dbConnection, sqlite::Row& row ) ...@@ -35,7 +35,6 @@ ShowEpisode::ShowEpisode(DBConnection dbConnection, sqlite::Row& row )
row >> m_id row >> m_id
>> m_artworkMrl >> m_artworkMrl
>> m_episodeNumber >> m_episodeNumber
>> m_lastSyncDate
>> m_name >> m_name
>> m_seasonNumber >> m_seasonNumber
>> m_shortSummary >> m_shortSummary
...@@ -77,11 +76,6 @@ unsigned int ShowEpisode::episodeNumber() const ...@@ -77,11 +76,6 @@ unsigned int ShowEpisode::episodeNumber() const
return m_episodeNumber; return m_episodeNumber;
} }
time_t ShowEpisode::lastSyncDate() const
{
return m_lastSyncDate;
}
const std::string& ShowEpisode::name() const const std::string& ShowEpisode::name() const
{ {
return m_name; return m_name;
...@@ -155,7 +149,6 @@ bool ShowEpisode::createTable( DBConnection dbConnection ) ...@@ -155,7 +149,6 @@ bool ShowEpisode::createTable( DBConnection dbConnection )
"id_episode INTEGER PRIMARY KEY AUTOINCREMENT," "id_episode INTEGER PRIMARY KEY AUTOINCREMENT,"
"artwork_mrl TEXT," "artwork_mrl TEXT,"
"episode_number UNSIGNED INT," "episode_number UNSIGNED INT,"
"last_sync_date UNSIGNED INT,"
"title TEXT," "title TEXT,"
"season_number UNSIGNED INT," "season_number UNSIGNED INT,"
"episode_summary TEXT," "episode_summary TEXT,"
......
...@@ -53,7 +53,6 @@ class ShowEpisode : public IShowEpisode, public DatabaseHelpers<ShowEpisode, pol ...@@ -53,7 +53,6 @@ class ShowEpisode : public IShowEpisode, public DatabaseHelpers<ShowEpisode, pol
virtual const std::string& artworkMrl() const override; virtual const std::string& artworkMrl() const override;
bool setArtworkMrl( const std::string& artworkMrl ); bool setArtworkMrl( const std::string& artworkMrl );
virtual unsigned int episodeNumber() const override; virtual unsigned int episodeNumber() const override;
virtual time_t lastSyncDate() const override;
virtual const std::string& name() const override; virtual const std::string& name() const override;
unsigned int seasonNumber() const; unsigned int seasonNumber() const;
bool setSeasonNumber(unsigned int seasonNumber); bool setSeasonNumber(unsigned int seasonNumber);
...@@ -72,7 +71,6 @@ class ShowEpisode : public IShowEpisode, public DatabaseHelpers<ShowEpisode, pol ...@@ -72,7 +71,6 @@ class ShowEpisode : public IShowEpisode, public DatabaseHelpers<ShowEpisode, pol
unsigned int m_id; unsigned int m_id;
std::string m_artworkMrl; std::string m_artworkMrl;
unsigned int m_episodeNumber; unsigned int m_episodeNumber;
time_t m_lastSyncDate;
std::string m_name; std::string m_name;
unsigned int m_seasonNumber; unsigned int m_seasonNumber;
std::string m_shortSummary; std::string m_shortSummary;
......
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