示例#1
0
    def procRESUME(self, workinglist = None, skipcheck = False):
        fulllist = utility.torrents["inactive"].keys()
        if workinglist is None:
            workinglist = fulllist
        else:
            workinglist = intersection(fulllist, workinglist)
        
        update = [1 for torrent in workinglist if torrent.actions.resume(skipcheck)]

        if update:
            utility.queue.updateAndInvoke(invokeLater = False)
示例#2
0
    def procPAUSE(self, workinglist = None, release = False):
        fulllist = utility.torrents["active"].keys()
        if workinglist is None:
            workinglist = fulllist
        else:
            workinglist = intersection(fulllist, workinglist)

        update = [1 for torrent in workinglist if torrent.actions.pause(release)]

        if update:
            utility.queue.UpdateRunningTorrentCounters()
示例#3
0
    def procUNSTOP(self, workinglist = None):
        fulllist = utility.torrents["inactive"].keys()
        if workinglist is None:
            workinglist = fulllist
        else:
            workinglist = intersection(fulllist, workinglist)

        update = [1 for torrent in workinglist
                    if torrent.status.value == STATUS_STOP
                       and torrent.actions.queue()]

        if update:
            utility.queue.updateAndInvoke()
示例#4
0
    def procQUEUE(self, workinglist = None):
        fulllist = utility.torrents["inactive"].keys()
        if workinglist is None:
            workinglist = fulllist
        else:
            workinglist = intersection(fulllist, workinglist)

#        if workinglist is None:
#            workinglist = utility.torrents["all"]
        update = [1 for torrent in workinglist if torrent.actions.queue()]
        
        if update:
            utility.queue.updateAndInvoke()