mirror of
				https://github.com/YACReader/yacreader
				synced 2025-10-31 00:04:26 -04:00 
			
		
		
		
	Set all new imported comics and folders as manga if the parent folder is manga
This commit is contained in:
		| @ -223,14 +223,18 @@ qulonglong LibraryCreator::insertFolders() | ||||
|     auto _database = QSqlDatabase::database(_databaseConnection); | ||||
|     QList<Folder>::iterator i; | ||||
|     int currentId = 0; | ||||
|     Folder currentParent; | ||||
|     for (i = _currentPathFolders.begin(); i != _currentPathFolders.end(); ++i) { | ||||
|         if (!(i->knownId)) { | ||||
|             i->setFather(currentId); | ||||
|             i->setManga(currentParent.isManga()); | ||||
|             currentId = DBHelper::insert(&(*i), _database); //insertFolder(currentId,*i); | ||||
|             i->setId(currentId); | ||||
|         } else { | ||||
|             currentId = i->id; | ||||
|         } | ||||
|  | ||||
|         currentParent = *i; | ||||
|     } | ||||
|     return currentId; | ||||
| } | ||||
| @ -311,6 +315,7 @@ void LibraryCreator::insertComic(const QString &relativePath, const QFileInfo &f | ||||
|         } | ||||
|  | ||||
|         comic.parentId = _currentPathFolders.last().id; | ||||
|         comic.info.manga = _currentPathFolders.last().isManga(); | ||||
|         DBHelper::insert(&comic, _database); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user