change: mod metadata improvements

- Use slug instead of name
- Keep temporary status before having local details

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-06-19 14:26:15 -03:00
parent a53ee2e35c
commit fd6755c93f
10 changed files with 96 additions and 67 deletions

View File

@ -65,15 +65,21 @@ void ModFolderModel::startWatching()
update();
// Watch the mods folder
is_watching = m_watcher->addPath(m_dir.absolutePath());
if (is_watching)
{
if (is_watching) {
qDebug() << "Started watching " << m_dir.absolutePath();
}
else
{
} else {
qDebug() << "Failed to start watching " << m_dir.absolutePath();
}
// Watch the mods index folder
is_watching = m_watcher->addPath(indexDir().absolutePath());
if (is_watching) {
qDebug() << "Started watching " << indexDir().absolutePath();
} else {
qDebug() << "Failed to start watching " << indexDir().absolutePath();
}
}
void ModFolderModel::stopWatching()
@ -82,14 +88,18 @@ void ModFolderModel::stopWatching()
return;
is_watching = !m_watcher->removePath(m_dir.absolutePath());
if (!is_watching)
{
if (!is_watching) {
qDebug() << "Stopped watching " << m_dir.absolutePath();
}
else
{
} else {
qDebug() << "Failed to stop watching " << m_dir.absolutePath();
}
is_watching = !m_watcher->removePath(indexDir().absolutePath());
if (!is_watching) {
qDebug() << "Stopped watching " << indexDir().absolutePath();
} else {
qDebug() << "Failed to stop watching " << indexDir().absolutePath();
}
}
bool ModFolderModel::update()