Fix folders type when they are added

This commit is contained in:
Luis Ángel San Martín
2024-02-12 19:33:14 +01:00
parent 7baf144c69
commit 374898702d
5 changed files with 19 additions and 5 deletions

View File

@ -70,6 +70,14 @@ Folder &Folder::operator=(const Folder &other)
return *this;
}
Folder Folder::rootFolder()
{
auto root = Folder(1, 1, "root", "/");
root.type = YACReader::FileType::Comic; // TODO: make this configurable by the user so it can set a default type for a library
return root;
}
Folder::Folder(const QString &folderName, const QString &folderPath)
: knownParent(false),
knownId(false),