MCPcopy Index your code
hub / github.com/pyload/pyload / getPackageData

Method getPackageData

module/database/FileDatabase.py:254–275  ·  view source on GitHub ↗

returns dict with package information

(self, id)

Source from the content-addressed store, hash-verified

252
253 #----------------------------------------------------------------------
254 def getPackageData(self, id):
255 """returns dict with package information"""
256 pack = self.getPackage(id)
257
258 if not pack:
259 return None
260
261 pack = pack.toDict()[id]
262
263 data = self.db.getPackageData(id)
264
265 tmplist = []
266
267 cache = self.cache.values()
268 for x in cache:
269 if int(x.toDbDict()[x.id]["package"]) == int(id):
270 tmplist.append((x.id, x.toDbDict()[x.id]))
271 data.update(tmplist)
272
273 pack["links"] = data
274
275 return pack
276
277 #----------------------------------------------------------------------
278 def getFileData(self, id):

Callers 1

reCheckPackageMethod · 0.45

Calls 6

getPackageMethod · 0.95
valuesMethod · 0.80
toDbDictMethod · 0.80
toDictMethod · 0.45
appendMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected