MCPcopy
hub / github.com/tonquer/JMComic-qt / LoadUpload

Method LoadUpload

src/view/nas/nas_db.py:89–113  ·  view source on GitHub ↗
(self, owner)

Source from the content-addressed store, hash-verified

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)

Callers 1

__init__Method · 0.80

Calls 4

NasUploadItemClass · 0.90
WarnMethod · 0.80
textMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected