Fixed downloads not downloading when all are selected.
This commit is contained in:
parent
27e0563fde
commit
55fe7aa4c7
3 changed files with 12 additions and 5 deletions
|
|
@ -513,7 +513,8 @@ class CommandBase(object):
|
||||||
|
|
||||||
# shutil will make the directory for us
|
# shutil will make the directory for us
|
||||||
shutil.copytree(os.path.join('files', ex_setting.name),
|
shutil.copytree(os.path.join('files', ex_setting.name),
|
||||||
export_dest)
|
export_dest,
|
||||||
|
ignore=shutil.ignore_patterns('place_holder.txt'))
|
||||||
self.progress_text += '.'
|
self.progress_text += '.'
|
||||||
|
|
||||||
if 'mac' in ex_setting.name:
|
if 'mac' in ex_setting.name:
|
||||||
|
|
@ -545,7 +546,7 @@ class CommandBase(object):
|
||||||
nw_path = os.path.join(export_dest,
|
nw_path = os.path.join(export_dest,
|
||||||
ex_setting.dest_files[0])
|
ex_setting.dest_files[0])
|
||||||
|
|
||||||
if windows and 'x32' in ex_setting.name:
|
if windows:
|
||||||
self.replace_icon_in_exe(nw_path)
|
self.replace_icon_in_exe(nw_path)
|
||||||
|
|
||||||
#self.compress_nw(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)
|
super(MainWindow, self).__init__(parent)
|
||||||
CommandBase.__init__(self)
|
CommandBase.__init__(self)
|
||||||
self.output_package_json = True
|
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.update_json = False
|
||||||
|
|
||||||
self.setup_nw_versions()
|
self.setup_nw_versions()
|
||||||
|
|
@ -262,6 +263,7 @@ class MainWindow(QtGui.QWidget, CommandBase):
|
||||||
return
|
return
|
||||||
|
|
||||||
self.out_file.close()
|
self.out_file.close()
|
||||||
|
self.http.abort()
|
||||||
|
|
||||||
if error:
|
if error:
|
||||||
self.out_file.remove()
|
self.out_file.remove()
|
||||||
|
|
@ -349,9 +351,13 @@ class MainWindow(QtGui.QWidget, CommandBase):
|
||||||
self.http_request_aborted = True
|
self.http_request_aborted = True
|
||||||
self.http.abort()
|
self.http.abort()
|
||||||
self.enable_ui()
|
self.enable_ui()
|
||||||
|
self.progress_bar.setValue(0)
|
||||||
|
self.progress_bar.setVisible(False)
|
||||||
|
|
||||||
def update_progress_bar(self, bytes_read, total_bytes):
|
def update_progress_bar(self, bytes_read, total_bytes):
|
||||||
if self.http_request_aborted:
|
if self.http_request_aborted:
|
||||||
|
self.progress_bar.setValue(0)
|
||||||
|
self.progress_bar.setVisible(False)
|
||||||
return
|
return
|
||||||
self.progress_bar.setMaximum(total_bytes)
|
self.progress_bar.setMaximum(total_bytes)
|
||||||
self.progress_bar.setValue(bytes_read)
|
self.progress_bar.setValue(bytes_read)
|
||||||
|
|
@ -367,7 +373,7 @@ class MainWindow(QtGui.QWidget, CommandBase):
|
||||||
|
|
||||||
archive_exists = QFile.exists(file_name)
|
archive_exists = QFile.exists(file_name)
|
||||||
|
|
||||||
dest_files_exist = False
|
#dest_files_exist = False
|
||||||
|
|
||||||
# for dest_file in setting.dest_files:
|
# for dest_file in setting.dest_files:
|
||||||
# dest_file_path = os.path.join('files', setting.name, dest_file)
|
# 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
|
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()
|
self.continue_downloading_or_extract()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue