def __init__(self, download_item, bucket):
        """"""
        DownloaderCore.__init__(self, download_item, bucket)

        #Threading stuff
        self.lock1 = threading.Lock() #lock to write file.
        self.lock2 = threading.Lock()

        self.chunks = download_item.chunks[:] if download_item.chunks is not None else [] #shallow copy
        self.chunks_control = []

        self.first_flag = True
        self.conn_count = 0

        self.max_conn = conf.get_max_conn()
    def __init__(self, file_name, path_to_save, link, host, bucket, chunks):
        """"""
        DownloaderCore.__init__(self, file_name, path_to_save, link, host, bucket)

        #Threading stuff
        self.lock1 = threading.Lock() #lock to write file.
        self.lock2 = threading.Lock()
        self.lock3 = threading.Lock()

        self.chunks = chunks[:] if chunks is not None else [] #shallow copy
        self.chunks_control = []

        self.first_flag = True
        self.conn_count = 0

        self.max_conn = conf.get_max_conn()
Exemple #3
0
    def __init__(self, file_name, path_to_save, link, host, bucket, chunks):
        """"""
        DownloaderCore.__init__(self, file_name, path_to_save, link, host,
                                bucket)

        #Threading stuff
        self.lock1 = threading.Lock()  #lock to write file.
        self.lock2 = threading.Lock()
        self.lock3 = threading.Lock()

        self.chunks = chunks[:] if chunks is not None else []  #shallow copy
        self.chunks_control = []

        self.first_flag = True
        self.conn_count = 0

        self.max_conn = conf.get_max_conn()
Exemple #4
0
 def load(self):
     self.retries_box.setValue(conf.get_retries_limit())
     if conf.get_html_dl():
         self.html_box.toggle()
     self.conn_box.setValue(conf.get_max_conn())