More migrations to LibraryPaths

This commit is contained in:
Luis Ángel San Martín
2025-03-30 15:17:24 +02:00
parent 7f08ad0776
commit 181884a85f
4 changed files with 29 additions and 13 deletions

View File

@ -1228,10 +1228,10 @@ void ComicModel::notifyCoverChange(const ComicDB &comic)
// this doesn't work in QML -> emit dataChanged(index(itemIndex, 0), index(itemIndex, 0), QVector<int>() << CoverPathRole);
}
// ????
QUrl ComicModel::getCoverUrlPathForComicHash(const QString &hash) const
{
return QUrl::fromLocalFile(_databasePath + "/covers/" + hash + ".jpg");
auto coverPath = LibraryPaths::coverPathFromLibraryDataPath(_databasePath, hash);
return QUrl::fromLocalFile(coverPath);
}
void ComicModel::addComicsToFavorites(const QList<qulonglong> &comicIds)

View File

@ -852,7 +852,8 @@ QModelIndex FolderModel::addFolderAtParent(const QString &folderName, const QMod
QUrl FolderModel::getCoverUrlPathForComicHash(const QString &hash) const
{
return QUrl::fromLocalFile(_databasePath + "/covers/" + hash + ".jpg");
auto coverPath = LibraryPaths::coverPathFromLibraryDataPath(_databasePath, hash);
return QUrl::fromLocalFile(coverPath);
}
void FolderModel::setShowRecent(bool showRecent)