Exemplo n.º 1
0
 def update(self):
     """"""
     if not self.change_ip_th.is_alive():
         self.parent.status_bar.pop_msg(self.status_msg)
         for id_item in self.id_list:
             api.start_download(id_item)
             try:
                 self.parent.downloads.rows_buffer[id_item][1] = self.parent.downloads.icons_dict[cons.STATUS_QUEUE]
             except Exception as err:
                 logger.debug(err)
         self.timer.stop()
Exemplo n.º 2
0
 def update(self):
     """"""
     if not self.ip_renewer.is_running():
         signals.status_bar_pop_msg.emit(self.status_msg)
         for id_item in self.id_item_list:
             api.start_download(id_item)
             try:
                 self.parent.downloads.rows_buffer[id_item][1] = self.parent.downloads.icons_dict[cons.STATUS_QUEUE]
             except Exception as err:
                 logger.debug(err)
         self.timer.stop()
         self.is_working = False
Exemplo n.º 3
0
 def update(self):
     """"""
     if not self.change_ip_th.is_alive():
         self.parent.status_bar.pop_msg(self.status_msg)
         for id_item in self.id_list:
             api.start_download(id_item)
             try:
                 self.parent.downloads.rows_buffer[id_item][
                     1] = self.parent.downloads.icons_dict[
                         cons.STATUS_QUEUE]
             except Exception as err:
                 logger.debug(err)
         self.timer.stop()
Exemplo n.º 4
0
 def update(self):
     """"""
     if not self.ip_renewer.is_running():
         signals.status_bar_pop_msg.emit(self.status_msg)
         for id_item in self.id_item_list:
             api.start_download(id_item)
             try:
                 self.parent.downloads.rows_buffer[id_item][
                     1] = self.parent.downloads.icons_dict[
                         cons.STATUS_QUEUE]
             except Exception as err:
                 logger.debug(err)
         self.timer.stop()
         self.is_working = False
Exemplo n.º 5
0
 def on_start_download(self):
     rows = self.downloads.get_selected_rows()
     if rows:
         for row in rows:
             items = self.downloads.items
             id_item = items[row][0]
             started = api.start_download(id_item)
             if started:
                 items[row][1] = self.downloads.icons_dict[cons.STATUS_QUEUE] #status
                 items[row][10] = None #status_msg
                 self.stop[BTN].setEnabled(True)
                 self.start[BTN].setEnabled(False)
         id_item_list = [row[0] for row in items]
         api.reorder_queue(id_item_list)
Exemplo n.º 6
0
 def on_start_download(self):
     rows = self.downloads.get_selected_rows()
     if rows:
         for row in rows:
             items = self.downloads.items
             id_item = items[row][0]
             started = api.start_download(id_item)
             if started:
                 items[row][1] = self.downloads.icons_dict[
                     cons.STATUS_QUEUE]  #status
                 items[row][10] = None  #status_msg
                 self.stop[BTN].setEnabled(True)
                 self.start[BTN].setEnabled(False)
         id_item_list = [row[0] for row in items]
         api.reorder_queue(id_item_list)
Exemplo n.º 7
0
    def start_download(self, widget):
        """"""
        model, rows = self.downloads_list_gui.treeView.get_selection().get_selected_rows() #atributo treeView de la clase List
        if rows:
            #id_item = model[row][0]
            for row in rows:
                id_item = model[row][0]

                #TODO: Implementar lo mismo pero para stopped (buscar en lista stopped y finished para comparar)
                started = api.start_download(id_item) #return true or false
                if started:
                    model[row][1] = self.downloads_list_gui.icons_dict[cons.STATUS_QUEUE] #status
                    model[row][12] = None #status_msg
                    self.stop.set_sensitive(True) #deshabilitar el boton de stop ya que acaban de detener la descarga.
                    self.start.set_sensitive(False)
                
            self.downloads_list_gui.get_status() #iniciar update de lista.
            iditem_list = self.downloads_list_gui.treeView.get_id_item_list()
            api.reorder_queue(iditem_list)
Exemplo n.º 8
0
    def on_start_download(self):
        rows = self.downloads.get_selected_rows()
        if rows:
            #id_item = model[row][0]
            for row in rows:
                items = self.downloads.items
                id_item = items[row][0]

                #TODO: Implementar lo mismo pero para stopped (buscar en lista stopped y finished para comparar)
                started = api.start_download(id_item) #return true or false
                if started:
                    items[row][1] = self.downloads.icons_dict[cons.STATUS_QUEUE] #status
                    items[row][10] = None #status_msg
                    self.stop[BTN].setEnabled(True) #deshabilitar el boton de stop ya que acaban de detener la descarga.
                    self.start[BTN].setEnabled(False)
                
            #self.downloads.get_status() #iniciar update de lista.
            id_item_list = [row[0] for row in items]
            api.reorder_queue(id_item_list)
Exemplo n.º 9
0
    def on_start_download(self):
        rows = self.downloads.get_selected_rows()
        if rows:
            #id_item = model[row][0]
            for row in rows:
                items = self.downloads.items
                id_item = items[row][0]

                #TODO: Implementar lo mismo pero para stopped (buscar en lista stopped y finished para comparar)
                started = api.start_download(id_item)  #return true or false
                if started:
                    items[row][1] = self.downloads.icons_dict[
                        cons.STATUS_QUEUE]  #status
                    items[row][10] = None  #status_msg
                    self.stop[BTN].setEnabled(
                        True
                    )  #deshabilitar el boton de stop ya que acaban de detener la descarga.
                    self.start[BTN].setEnabled(False)

            #self.downloads.get_status() #iniciar update de lista.
            id_item_list = [row[0] for row in items]
            api.reorder_queue(id_item_list)