예제 #1
0
    def work(self):
        """ main routine that does the periodical work """

        self.tryReconnect()

        if free_space(self.core.config["general"]["download_folder"]) / 1024 / 1024 < \
                self.core.config["general"]["min_free_space"]:
            self.log.warning(_("Not enough space left on device"))
            self.paused = True

        if self.paused or not self.core.api.isTimeDownload():
            return False

        # at least one thread want reconnect and we are supposed to wait
        if self.core.config['reconnect']['wait'] and self.wantReconnect() > 1:
            return False

        self.assignJobs()
예제 #2
0
    def work(self):
        """ main routine that does the periodical work """

        self.tryReconnect()

        if free_space(self.core.config["general"]["download_folder"]) / 1024 / 1024 < \
                self.core.config["general"]["min_free_space"]:
            self.log.warning(_("Not enough space left on device"))
            self.paused = True

        if self.paused or not self.core.api.isTimeDownload():
            return False

        # at least one thread want reconnect and we are supposed to wait
        if self.core.config['reconnect']['wait'] and self.wantReconnect() > 1:
            return False

        self.assignJobs()
예제 #3
0
파일: Api.py 프로젝트: keat01/pyLoad
 def freeSpace(self):
     """Available free space at download directory in bytes"""
     return free_space(self.core.config["general"]["download_folder"])
예제 #4
0
파일: Api.py 프로젝트: keat01/pyLoad
 def freeSpace(self):
     """Available free space at download directory in bytes"""
     return free_space(self.core.config["general"]["download_folder"])