Bugfixes for hub backends
This commit is contained in:
@@ -14,6 +14,10 @@ add_library(
|
||||
AudioModel.cpp
|
||||
AudioImageProvider.cpp
|
||||
ShaderPackMetadata.cpp
|
||||
ShaderPackModel.h
|
||||
AudioModel.h
|
||||
AudioImageProvider.h
|
||||
ShaderPackMetadata.h
|
||||
GeometryProvider.cpp
|
||||
GeometryProvider.h
|
||||
PexelsImageMetadata.h
|
||||
|
||||
@@ -459,6 +459,8 @@ void ShaderToySearchModel::save(quint64 index)
|
||||
|
||||
const QStringList keys = externalMedia.keys();
|
||||
|
||||
qWarning() << QStringLiteral("Downloading %1 Images").arg(externalMedia.count());
|
||||
|
||||
setStatus(Compiling, QStringLiteral("Downloading images"));
|
||||
|
||||
setTotalDownloads(externalMedia.count());
|
||||
@@ -475,7 +477,7 @@ void ShaderToySearchModel::install(quint64 index)
|
||||
setCompletedDownloads(0);
|
||||
setTotalDownloads(0);
|
||||
|
||||
QString tempLocation = QStringLiteral("%1/komplex/src/%2").arg(QStandardPaths::writableLocation(QStandardPaths::TempLocation), entry.metadata.id);
|
||||
QString tempLocation = QStringLiteral("%1/komplex/build/%2").arg(QStandardPaths::writableLocation(QStandardPaths::TempLocation), entry.metadata.id);
|
||||
QString installLocation = QStringLiteral("%1/.local/share/komplex/packs/%2").arg(QStandardPaths::writableLocation(QStandardPaths::HomeLocation), entry.metadata.id);
|
||||
|
||||
QDir installDirectory(installLocation);
|
||||
@@ -605,11 +607,11 @@ void ShaderToySearchModel::download(quint64 index)
|
||||
tags,
|
||||
static_cast<bool>(infoObject[QStringLiteral("usePreview")].toInt()),
|
||||
infoObject[QStringLiteral("username")].toString(),
|
||||
rootObject[QStringLiteral("version")].toString(),
|
||||
rootObject[QStringLiteral("ver")].toString(),
|
||||
static_cast<quint64>(infoObject[QStringLiteral("views")].toInt())
|
||||
};
|
||||
|
||||
QJsonArray ShaderToyRenderPassArray = rootObject[QStringLiteral("ShaderToyRenderPass")].toArray();
|
||||
QJsonArray ShaderToyRenderPassArray = rootObject[QStringLiteral("renderpass")].toArray();
|
||||
|
||||
for(const QJsonValue &ShaderToyRenderPassValue : std::as_const(ShaderToyRenderPassArray))
|
||||
{
|
||||
@@ -667,7 +669,7 @@ void ShaderToySearchModel::download(quint64 index)
|
||||
|
||||
entry.status = ShaderToyEntry::Idle;
|
||||
|
||||
m_data[index] = entry;
|
||||
m_data.replace(index, entry);
|
||||
QModelIndex modelIndex = this->index(index, 0);
|
||||
Q_EMIT dataChanged(modelIndex, modelIndex);
|
||||
}
|
||||
|
||||
@@ -44,9 +44,9 @@ public:
|
||||
qmlRegisterSingletonType<AudioModel*>(uri, 1, 0, "AudioModel", komplexAudioSingletonProvider);
|
||||
qmlRegisterType<ShaderPackModel>(uri, 1, 0, "ShaderPackModel");
|
||||
qmlRegisterType<GeometryProvider>(uri, 1, 0, "GeometryProvider");
|
||||
qmlRegisterType<ShaderToySearchModel>(stUri, 1, 0, "SearchModel");
|
||||
qmlRegisterType<PexelsVideoSearchModel>(pvUri, 1, 0, "SearchModel");
|
||||
qmlRegisterType<PexelsImageSearchModel>(piUri, 1, 0, "SearchModel");
|
||||
qmlRegisterType<ShaderToySearchModel>(uri, 1, 0, "ShaderToySearchModel");
|
||||
qmlRegisterType<PexelsVideoSearchModel>(uri, 1, 0, "PexelsVideoSearchModel");
|
||||
qmlRegisterType<PexelsImageSearchModel>(uri, 1, 0, "PexelsImageSearchModel");
|
||||
}
|
||||
|
||||
void unregisterTypes() override
|
||||
|
||||
Reference in New Issue
Block a user