mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Add some error logs when synchronizing progress can't open the db
This commit is contained in:
@ -1097,6 +1097,11 @@ QMap<qulonglong, QList<ComicDB>> DBHelper::updateFromRemoteClient(const QMap<qul
|
|||||||
{
|
{
|
||||||
QSqlDatabase db = DataBaseManagement::loadDatabase(LibraryPaths::libraryDataPath(libraryPath));
|
QSqlDatabase db = DataBaseManagement::loadDatabase(LibraryPaths::libraryDataPath(libraryPath));
|
||||||
|
|
||||||
|
if (!db.isValid()) {
|
||||||
|
QLOG_ERROR() << "updateFromRemoteClient: could not open database for library" << libraryPath;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
db.transaction();
|
db.transaction();
|
||||||
|
|
||||||
QSqlQuery updateComicInfo(db);
|
QSqlQuery updateComicInfo(db);
|
||||||
@ -1205,6 +1210,11 @@ void DBHelper::updateFromRemoteClientWithHash(const QList<ComicInfo> &comics)
|
|||||||
{
|
{
|
||||||
QSqlDatabase db = DataBaseManagement::loadDatabase(LibraryPaths::libraryDataPath(libraryPath));
|
QSqlDatabase db = DataBaseManagement::loadDatabase(LibraryPaths::libraryDataPath(libraryPath));
|
||||||
|
|
||||||
|
if (!db.isValid()) {
|
||||||
|
QLOG_ERROR() << "updateFromRemoteClientWithHash: could not open database for library" << libraryPath;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
db.transaction();
|
db.transaction();
|
||||||
|
|
||||||
QSqlQuery updateComicInfo(db);
|
QSqlQuery updateComicInfo(db);
|
||||||
|
|||||||
Reference in New Issue
Block a user