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

Method getPackageOrder

module/Api.py:754–769  ·  view source on GitHub ↗

Returns information about package order. :param destination: `Destination` :return: dict mapping order to package id

(self, destination)

Source from the content-addressed store, hash-verified

752
753 @permission(PERMS.LIST)
754 def getPackageOrder(self, destination):
755 """Returns information about package order.
756
757 :param destination: `Destination`
758 :return: dict mapping order to package id
759 """
760
761 packs = self.core.files.getInfoData(destination)
762 order = {}
763
764 for pid in packs:
765 pack = self.core.files.getPackageData(int(pid))
766 while pack["order"] in order.keys(): #just in case
767 pack["order"] += 1
768 order[pack["order"]] = pack["id"]
769 return order
770
771 @permission(PERMS.LIST)
772 def getFileOrder(self, pid):

Callers

nothing calls this directly

Calls 3

getInfoDataMethod · 0.80
getPackageDataMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected