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

Method getLinkData

module/database/FileDatabase.py:718–739  ·  view source on GitHub ↗

get link information as dict

(self, id)

Source from the content-addressed store, hash-verified

716
717 @style.queue
718 def getLinkData(self, id):
719 """get link information as dict"""
720 self.c.execute('SELECT id,url,name,size,status,error,plugin,package,linkorder FROM links WHERE id=?', (str(id), ))
721 data = {}
722 r = self.c.fetchone()
723 if not r:
724 return None
725 data[r[0]] = {
726 'id': r[0],
727 'url': r[1],
728 'name': r[2],
729 'size': r[3],
730 'format_size': formatSize(r[3]),
731 'status': r[4],
732 'statusmsg': self.manager.statusMsg[r[4]],
733 'error': r[5],
734 'plugin': r[6],
735 'package': r[7],
736 'order': r[8],
737 }
738
739 return data
740
741 @style.queue
742 def getPackageData(self, id):

Callers 1

getFileDataMethod · 0.80

Calls 2

formatSizeFunction · 0.90
executeMethod · 0.80

Tested by

no test coverage detected