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

Fix column indexes when loading values

parent 6a8b7d66
......@@ -6,12 +6,12 @@
Album::Album(sqlite3* dbConnection, sqlite3_stmt* stmt)
: m_dbConnection( dbConnection )
{
m_id = sqlite3_column_int( stmt, 1 );
m_name = (const char*)sqlite3_column_text( stmt, 2 );
m_releaseYear = sqlite3_column_int( stmt, 3 );
m_shortSummary = (const char*)sqlite3_column_text( stmt, 4 );
m_artworkUrl = (const char*)sqlite3_column_text( stmt, 5 );
m_lastSyncDate = sqlite3_column_int( stmt, 6 );
m_id = sqlite3_column_int( stmt, 0 );
m_name = (const char*)sqlite3_column_text( stmt, 1 );
m_releaseYear = sqlite3_column_int( stmt, 2 );
m_shortSummary = (const char*)sqlite3_column_text( stmt, 3 );
m_artworkUrl = (const char*)sqlite3_column_text( stmt, 4 );
m_lastSyncDate = sqlite3_column_int( stmt, 5 );
}
const std::string& Album::name()
......
......@@ -6,11 +6,11 @@ AlbumTrack::AlbumTrack( sqlite3* dbConnection, sqlite3_stmt* stmt )
: m_dbConnection( dbConnection )
, m_album( NULL )
{
m_id = sqlite3_column_int( stmt, 1 );
m_title = (const char*)sqlite3_column_text( stmt, 2 );
m_genre = (const char*)sqlite3_column_text( stmt, 3 );
m_trackNumber = sqlite3_column_int( stmt, 4 );
m_albumId = sqlite3_column_int( stmt, 5 );
m_id = sqlite3_column_int( stmt, 0 );
m_title = (const char*)sqlite3_column_text( stmt, 1 );
m_genre = (const char*)sqlite3_column_text( stmt, 2 );
m_trackNumber = sqlite3_column_int( stmt, 3 );
m_albumId = sqlite3_column_int( stmt, 4 );
}
bool AlbumTrack::createTable(sqlite3* dbConnection)
......
......@@ -4,13 +4,13 @@
Show::Show(sqlite3* dbConnection, sqlite3_stmt* stmt)
: m_dbConnection( dbConnection )
{
m_id = sqlite3_column_int( stmt, 1 );
m_name = (const char*)sqlite3_column_text( stmt, 2 );
m_releaseYear = sqlite3_column_int( stmt, 3 );
m_shortSummary = (const char*)sqlite3_column_text( stmt, 4 );
m_artworkUrl = (const char*)sqlite3_column_text( stmt, 5 );
m_lastSyncDate = sqlite3_column_int( stmt, 6 );
m_tvdbId = (const char*)sqlite3_column_text( stmt, 7 );
m_id = sqlite3_column_int( stmt, 0 );
m_name = (const char*)sqlite3_column_text( stmt, 1 );
m_releaseYear = sqlite3_column_int( stmt, 2 );
m_shortSummary = (const char*)sqlite3_column_text( stmt, 3 );
m_artworkUrl = (const char*)sqlite3_column_text( stmt, 4 );
m_lastSyncDate = sqlite3_column_int( stmt, 5 );
m_tvdbId = (const char*)sqlite3_column_text( stmt, 6 );
}
Show::Show(sqlite3* dbConnection)
......
......@@ -5,15 +5,15 @@
ShowEpisode::ShowEpisode( sqlite3* dbConnection, sqlite3_stmt* stmt )
: m_dbConnection( dbConnection )
{
m_id = sqlite3_column_int( stmt, 1 );
m_artworkUrl = (const char*)sqlite3_column_text( stmt, 2 );
m_episodeNumber = sqlite3_column_int( stmt, 3 );
m_lastSyncDate = sqlite3_column_int( stmt, 4 );
m_name = (const char*)sqlite3_column_text( stmt, 5 );
m_seasonNumber = sqlite3_column_int( stmt, 6 );
m_shortSummary = (const char*)sqlite3_column_text( stmt, 7 );
m_tvdbId = (const char*)sqlite3_column_text( stmt, 8 );
m_showId = sqlite3_column_int( stmt, 9 );
m_id = sqlite3_column_int( stmt, 0 );
m_artworkUrl = (const char*)sqlite3_column_text( stmt, 1 );
m_episodeNumber = sqlite3_column_int( stmt, 2 );
m_lastSyncDate = sqlite3_column_int( stmt, 3 );
m_name = (const char*)sqlite3_column_text( stmt, 4 );
m_seasonNumber = sqlite3_column_int( stmt, 5 );
m_shortSummary = (const char*)sqlite3_column_text( stmt, 6 );
m_tvdbId = (const char*)sqlite3_column_text( stmt, 7 );
m_showId = sqlite3_column_int( stmt, 8 );
}
......
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