bool Database::addFileLocation(const FileLocation &fileLocation)
{
- QSqlQuery &q = prepare("INSERT INTO file_location VALUES(DEFAULT, :fid, :hostId, :path, DEFAULT, DEFAULT)");
+ QSqlQuery &q = prepare(
+ "INSERT INTO file_location VALUES(DEFAULT, :fid, :hostId, :path, "
+ " :renameDisabled, :originalName, DEFAULT, DEFAULT, DEFAULT, DEFAULT)");
q.bindValue(":fid", fileLocation.fid);
q.bindValue(":hostId", fileLocation.hostId);
q.bindValue(":path", fileLocation.path);
+ q.bindValue(":renameDisabled", false);
+ q.bindValue(":originalName", "");
return exec(q);
}
bool Database::addFile(const File &file)
{
QSqlQuery &q = prepare(
- "INSERT INTO file VALUES(:fid, :eid, :aid, :gid, DEFAULT, :anidbUpdate, :entryUpdate, :myUpdate, "
+ "INSERT INTO file VALUES(:fid, :eid, :aid, :gid, :lid, DEFAULT, :anidbUpdate, :entryUpdate, :myUpdate, "
" :ed2k, :size, :length, :extension, :groupName, :groupNameShort, "
- " :crc, :releaseDate, :version, :censored, :source, :qualityId, "
+ " :crc, :releaseDate, :version, :censored, :deprecated, :source, :qualityId, "
" :quality, :resolution, :vidoeCodec, :audioCodec, :audioLanguage, "
" :subtitleLanguage, :aspectRatio, :myWatched, :myState, "
" :myFileState, :myStorage, :mySource, :myOther) ");
q.bindValue(":eid", file.eid);
q.bindValue(":aid", file.aid);
q.bindValue(":gid", file.gid);
+ q.bindValue(":lid", 0);
q.bindValue(":anidbUpdate", file.anidbUpdate);
q.bindValue(":entryUpdate", file.entryUpdate);
q.bindValue(":myUpdate", file.myUpdate);
q.bindValue(":releaseDate", file.releaseDate);
q.bindValue(":version", file.version);
q.bindValue(":censored", file.censored);
+ q.bindValue(":deprecated", false);
q.bindValue(":source", file.source);
q.bindValue(":qualityId", file.qualityId);
q.bindValue(":quality", file.quality);
bool Database::addPendingMyListUpdate(const PendingMyListUpdate &request)
{
QSqlQuery &q = prepare(
- "INSERT INTO pending_mylist_update VALUES(DEFAULT, :fid, :setMyWatched, :myWatched, "
- " :setMyState, :myState, :setMyFileState, :myFileState, :setMyStorage, :myStorage, "
- " :setMySource, :mySource, :setMyOther, :myOther, DEFAULT, DEFAULT, DEFAULT, DEFAULT) ");
+ "INSERT INTO pending_mylist_update VALUES(DEFAULT, :fid, :aid, :epno, :epmin, :eptype, "
+ " :setMyWatched, :myWatched, :setMyState, :myState, :setMyFileState, "
+ " :myFileState, :setMyStorage, :myStorage, :setMySource, :mySource, "
+ " :setMyOther, :myOther, :setVote, :vote, "
+ " DEFAULT, DEFAULT, DEFAULT, DEFAULT) ");
q.bindValue(":fid", request.fid);
+ q.bindValue(":aid", 0);
+ q.bindValue(":epno", 0);
+ q.bindValue(":epmin", 0);
+ q.bindValue(":eptype", "");
q.bindValue(":setMyWatched", request.setMyWatched);
q.bindValue(":myWatched", request.myWatched);
q.bindValue(":setMyState", request.setMyState);
q.bindValue(":mySource", request.mySource);
q.bindValue(":setMyOther", request.setMyOther);
q.bindValue(":myOther", request.myOther);
+ q.bindValue(":setVote", false);
+ q.bindValue(":vote", 0);
return exec(q);
}