| 123 | } |
| 124 | |
| 125 | qulonglong DBHelper::getParentFromComicFolderId(qulonglong libraryId, qulonglong id) |
| 126 | { |
| 127 | QString libraryPath = DBHelper::getLibraries().getPath(libraryId); |
| 128 | QString connectionName = ""; |
| 129 | Folder f; |
| 130 | { |
| 131 | QSqlDatabase db = DataBaseManagement::loadDatabase(LibraryPaths::libraryDataPath(libraryPath)); |
| 132 | |
| 133 | f = DBHelper::loadFolder(id, db); |
| 134 | connectionName = db.connectionName(); |
| 135 | } |
| 136 | |
| 137 | QSqlDatabase::removeDatabase(connectionName); |
| 138 | return f.parentId; |
| 139 | } |
| 140 | ComicDB DBHelper::getComicInfo(qulonglong libraryId, qulonglong id) |
| 141 | { |
| 142 | QString libraryPath = DBHelper::getLibraries().getPath(libraryId); |