Ejemplo n.º 1
0
 def plugin_download(self):
     account_item = host_accounts.get_account(self.host)
     if account_item is not None:
         plugin_download = "premium_download"
         self.premium = True
     else:
         plugin_download = "anonym_download"
     logger.info(plugin_download)
     self.set_data(plugin_download, account_item)
Ejemplo n.º 2
0
 def download_starter(self, download_item):
     """"""
     if self.global_slots.available_slot():
         slot = True
         if host_accounts.get_account(download_item.host) is None: #si no es premium entrar.
             if not self.is_host_slot_available(download_item.host):
                 slot = False
         if slot:
             self.global_slots.add_slot()
             self.add_thread(download_item.id, download_item.name, download_item.path, download_item.link, download_item.host, download_item.chunks) #crear thread y comenzar descarga. Metodo de threadmanager heredado
             self.active_downloads[download_item.id] = download_item
             del self.queue_downloads[download_item.id]
Ejemplo n.º 3
0
 def download_starter(self, download_item):
     """"""
     if self.global_slots.available_slot():
         slot = True
         if host_accounts.get_account(download_item.host) is None: #not premium.
             if not self.is_host_slot_available(download_item.host):
                 slot = False
         if slot:
             self.global_slots.add_slot()
             self.create_thread(download_item) #threadmanager
             self.active_downloads[download_item.id] = download_item
             del self.queue_downloads[download_item.id]
Ejemplo n.º 4
0
 def download_starter(self, download_item):
     """"""
     if self.global_slots.available_slot():
         slot = True
         if host_accounts.get_account(
                 download_item.host) is None:  #si no es premium entrar.
             if not self.is_host_slot_available(download_item.host):
                 slot = False
         if slot:
             self.global_slots.add_slot()
             self.add_thread(
                 download_item.id, download_item.name, download_item.path,
                 download_item.link, download_item.host,
                 download_item.chunks
             )  #crear thread y comenzar descarga. Metodo de threadmanager heredado
             self.active_downloads[download_item.id] = download_item
             del self.queue_downloads[download_item.id]