mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Mark function as deprecated and remove unused function
This commit is contained in:
parent
ef9a826c9f
commit
08cbb88891
@ -964,6 +964,7 @@ void DBHelper::updateReadingRemoteProgress(const ComicInfo &comicInfo, QSqlDatab
|
||||
updateComicInfo.clear();
|
||||
}
|
||||
|
||||
// server v1
|
||||
void DBHelper::updateFromRemoteClient(qulonglong libraryId, const ComicInfo &comicInfo)
|
||||
{
|
||||
QString libraryPath = DBHelper::getLibraries().getPath(libraryId);
|
||||
@ -997,46 +998,6 @@ void DBHelper::updateFromRemoteClient(qulonglong libraryId, const ComicInfo &com
|
||||
QSqlDatabase::removeDatabase(connectionName);
|
||||
}
|
||||
|
||||
void DBHelper::updateFromRemoteClientWithHash(const ComicInfo &comicInfo)
|
||||
{
|
||||
YACReaderLibraries libraries = DBHelper::getLibraries();
|
||||
|
||||
QStringList names = libraries.getNames();
|
||||
QString connectionName = "";
|
||||
|
||||
foreach (QString name, names) {
|
||||
QString libraryPath = DBHelper::getLibraries().getPath(libraries.getId(name));
|
||||
|
||||
{
|
||||
QSqlDatabase db = DataBaseManagement::loadDatabase(libraryPath + "/.yacreaderlibrary");
|
||||
ComicInfo info = loadComicInfo(comicInfo.hash, db);
|
||||
|
||||
if (!info.existOnDb) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (comicInfo.currentPage > 0) {
|
||||
info.currentPage = comicInfo.currentPage;
|
||||
|
||||
if (info.currentPage == info.numPages)
|
||||
info.read = true;
|
||||
|
||||
info.hasBeenOpened = true;
|
||||
|
||||
if (info.lastTimeOpened.toULongLong() < comicInfo.lastTimeOpened.toULongLong())
|
||||
info.lastTimeOpened = comicInfo.lastTimeOpened;
|
||||
}
|
||||
|
||||
if (comicInfo.rating > 0)
|
||||
info.rating = comicInfo.rating;
|
||||
|
||||
DBHelper::update(&info, db);
|
||||
connectionName = db.connectionName();
|
||||
}
|
||||
QSqlDatabase::removeDatabase(connectionName);
|
||||
}
|
||||
}
|
||||
|
||||
QMap<qulonglong, QList<ComicDB>> DBHelper::updateFromRemoteClient(const QMap<qulonglong, QList<ComicInfo>> &comics)
|
||||
{
|
||||
QMap<qulonglong, QList<ComicDB>> moreRecentComics;
|
||||
|
@ -73,8 +73,7 @@ public:
|
||||
static void updateChildrenInfo(QSqlDatabase &db);
|
||||
static void updateProgress(qulonglong libraryId, const ComicInfo &comicInfo);
|
||||
static void setComicAsReading(qulonglong libraryId, const ComicInfo &comicInfo);
|
||||
static void updateFromRemoteClient(qulonglong libraryId, const ComicInfo &comicInfo);
|
||||
static void updateFromRemoteClientWithHash(const ComicInfo &comicInfo);
|
||||
[[deprecated("Server v1")]] static void updateFromRemoteClient(qulonglong libraryId, const ComicInfo &comicInfo);
|
||||
static void updateReadingRemoteProgress(const ComicInfo &comicInfo, QSqlDatabase &db);
|
||||
static QMap<qulonglong, QList<ComicDB>> updateFromRemoteClient(const QMap<qulonglong, QList<ComicInfo>> &comics);
|
||||
static void updateFromRemoteClientWithHash(const QList<ComicInfo> &comics);
|
||||
|
Loading…
Reference in New Issue
Block a user