Esempio n. 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)
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()