(self, owner)
| 87 | return |
| 88 | |
| 89 | def LoadUpload(self, owner): |
| 90 | query = QSqlQuery(self.db) |
| 91 | suc = query.exec_( |
| 92 | """ |
| 93 | select eps_ids,nas_id,book_id,title,curPreUpIndex,tick,status,status_msg from nas_upload |
| 94 | """ |
| 95 | ) |
| 96 | if not suc: |
| 97 | Log.Warn(query.lastError().text()) |
| 98 | downloads = {} |
| 99 | while query.next(): |
| 100 | # bookId, downloadEpsIds, curDownloadEpsId, curConvertEpsId, title, savePath, convertPath |
| 101 | info = NasUploadItem() |
| 102 | data = json.loads(query.value(0)) |
| 103 | info.epsIds = [int(i) for i in data] |
| 104 | info.nasId = query.value(1) |
| 105 | info.bookId = query.value(2) |
| 106 | info.title = query.value(3) |
| 107 | info.curPreUpIndex = query.value(4) |
| 108 | info.tick = query.value(5) |
| 109 | info.status = query.value(6) |
| 110 | info.status_msg = query.value(7) |
| 111 | downloads[info.key] = info |
| 112 | |
| 113 | return downloads |
| 114 | |
| 115 | def DelNasDB(self, nas_id): |
| 116 | query = QSqlQuery(self.db) |
no test coverage detected