Fixed downloads not downloading when all are selected.
This commit is contained in:
parent
b9464d9f77
commit
93fa6f8636
3 changed files with 12 additions and 5 deletions
|
|
@ -513,7 +513,8 @@ class CommandBase(object):
|
|||
|
||||
# shutil will make the directory for us
|
||||
shutil.copytree(os.path.join('files', ex_setting.name),
|
||||
export_dest)
|
||||
export_dest,
|
||||
ignore=shutil.ignore_patterns('place_holder.txt'))
|
||||
self.progress_text += '.'
|
||||
|
||||
if 'mac' in ex_setting.name:
|
||||
|
|
@ -545,7 +546,7 @@ class CommandBase(object):
|
|||
nw_path = os.path.join(export_dest,
|
||||
ex_setting.dest_files[0])
|
||||
|
||||
if windows and 'x32' in ex_setting.name:
|
||||
if windows:
|
||||
self.replace_icon_in_exe(nw_path)
|
||||
|
||||
#self.compress_nw(nw_path)
|
||||
|
|
|
|||
BIN
files/images/icon.png
Normal file
BIN
files/images/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
12
main.py
12
main.py
|
|
@ -36,7 +36,8 @@ class MainWindow(QtGui.QWidget, CommandBase):
|
|||
super(MainWindow, self).__init__(parent)
|
||||
CommandBase.__init__(self)
|
||||
self.output_package_json = True
|
||||
self.setWindowIcon(QtGui.QIcon('icon.png'))
|
||||
self.setWindowIcon(QtGui.QIcon(os.path.join(CWD, 'files',
|
||||
'images', 'icon.png')))
|
||||
self.update_json = False
|
||||
|
||||
self.setup_nw_versions()
|
||||
|
|
@ -262,6 +263,7 @@ class MainWindow(QtGui.QWidget, CommandBase):
|
|||
return
|
||||
|
||||
self.out_file.close()
|
||||
self.http.abort()
|
||||
|
||||
if error:
|
||||
self.out_file.remove()
|
||||
|
|
@ -349,9 +351,13 @@ class MainWindow(QtGui.QWidget, CommandBase):
|
|||
self.http_request_aborted = True
|
||||
self.http.abort()
|
||||
self.enable_ui()
|
||||
self.progress_bar.setValue(0)
|
||||
self.progress_bar.setVisible(False)
|
||||
|
||||
def update_progress_bar(self, bytes_read, total_bytes):
|
||||
if self.http_request_aborted:
|
||||
self.progress_bar.setValue(0)
|
||||
self.progress_bar.setVisible(False)
|
||||
return
|
||||
self.progress_bar.setMaximum(total_bytes)
|
||||
self.progress_bar.setValue(bytes_read)
|
||||
|
|
@ -367,7 +373,7 @@ class MainWindow(QtGui.QWidget, CommandBase):
|
|||
|
||||
archive_exists = QFile.exists(file_name)
|
||||
|
||||
dest_files_exist = False
|
||||
#dest_files_exist = False
|
||||
|
||||
# for dest_file in setting.dest_files:
|
||||
# dest_file_path = os.path.join('files', setting.name, dest_file)
|
||||
|
|
@ -375,7 +381,7 @@ class MainWindow(QtGui.QWidget, CommandBase):
|
|||
|
||||
forced = self.get_setting('force_download').value
|
||||
|
||||
if (archive_exists or dest_files_exist) and not forced:
|
||||
if archive_exists and not forced:
|
||||
self.continue_downloading_or_extract()
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue