Browse Source

Save options when shuting down using shutdown option

doc-issue-template
MrS0m30n3 10 years ago
parent
commit
8a36744c14
2 changed files with 8 additions and 2 deletions
  1. 3
      youtube_dl_gui/Utils.py
  2. 7
      youtube_dl_gui/YoutubeDLGUI.py

3
youtube_dl_gui/Utils.py

@ -141,4 +141,5 @@ def get_time(seconds):
dtime['minutes'] = seconds % 86400 % 3600 / 60
dtime['seconds'] = seconds % 86400 % 3600 % 60
return dtime
return dtime

7
youtube_dl_gui/YoutubeDLGUI.py

@ -184,7 +184,12 @@ class MainFrame(wx.Frame):
def fin_tasks(self):
if self.opt_manager.options['shutdown']:
shutdown_sys(self.opt_manager.options['sudo_password'])
''' Store sudo password in a temp variable
because we will call _remove_sensitive_data() in
self.opt_manager.save_to_file() '''
sudo_password = self.opt_manager.options['sudo_password']
self.save_options()
shutdown_sys(sudo_password)
else:
self.finished_popup()
self.open_destination_dir()

Loading…
Cancel
Save