mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-26 11:13:00 -03:00
Rename a few more count variables to cur_history_id
This commit is contained in:
parent
ffe12bdead
commit
dee9e40051
3 changed files with 6 additions and 6 deletions
|
@ -262,12 +262,12 @@ def main(cwd=None):
|
||||||
if not app.autostop_timer_thread.is_alive():
|
if not app.autostop_timer_thread.is_alive():
|
||||||
if mode == 'share' or (mode == 'website'):
|
if mode == 'share' or (mode == 'website'):
|
||||||
# If there were no attempts to download the share, or all downloads are done, we can stop
|
# If there were no attempts to download the share, or all downloads are done, we can stop
|
||||||
if web.share_mode.download_count == 0 or web.done:
|
if web.share_mode.cur_history_id == 0 or web.done:
|
||||||
print("Stopped because auto-stop timer ran out")
|
print("Stopped because auto-stop timer ran out")
|
||||||
web.stop(app.port)
|
web.stop(app.port)
|
||||||
break
|
break
|
||||||
if mode == 'receive':
|
if mode == 'receive':
|
||||||
if web.receive_mode.upload_count == 0 or not web.receive_mode.uploads_in_progress:
|
if web.receive_mode.cur_history_id == 0 or not web.receive_mode.uploads_in_progress:
|
||||||
print("Stopped because auto-stop timer ran out")
|
print("Stopped because auto-stop timer ran out")
|
||||||
web.stop(app.port)
|
web.stop(app.port)
|
||||||
break
|
break
|
||||||
|
|
|
@ -97,7 +97,7 @@ class ReceiveMode(Mode):
|
||||||
The auto-stop timer expired, should we stop the server? Returns a bool
|
The auto-stop timer expired, should we stop the server? Returns a bool
|
||||||
"""
|
"""
|
||||||
# If there were no attempts to upload files, or all uploads are done, we can stop
|
# If there were no attempts to upload files, or all uploads are done, we can stop
|
||||||
if self.web.receive_mode.upload_count == 0 or not self.web.receive_mode.uploads_in_progress:
|
if self.web.receive_mode.cur_history_id == 0 or not self.web.receive_mode.uploads_in_progress:
|
||||||
self.server_status.stop_server()
|
self.server_status.stop_server()
|
||||||
self.server_status_label.setText(strings._('close_on_autostop_timer'))
|
self.server_status_label.setText(strings._('close_on_autostop_timer'))
|
||||||
return True
|
return True
|
||||||
|
@ -112,7 +112,7 @@ class ReceiveMode(Mode):
|
||||||
Starting the server.
|
Starting the server.
|
||||||
"""
|
"""
|
||||||
# Reset web counters
|
# Reset web counters
|
||||||
self.web.receive_mode.upload_count = 0
|
self.web.receive_mode.cur_history_id = 0
|
||||||
self.web.reset_invalid_passwords()
|
self.web.reset_invalid_passwords()
|
||||||
|
|
||||||
# Hide and reset the uploads if we have previously shared
|
# Hide and reset the uploads if we have previously shared
|
||||||
|
|
|
@ -132,7 +132,7 @@ class ShareMode(Mode):
|
||||||
The auto-stop timer expired, should we stop the server? Returns a bool
|
The auto-stop timer expired, should we stop the server? Returns a bool
|
||||||
"""
|
"""
|
||||||
# If there were no attempts to download the share, or all downloads are done, we can stop
|
# If there were no attempts to download the share, or all downloads are done, we can stop
|
||||||
if self.web.share_mode.download_count == 0 or self.web.done:
|
if self.web.share_mode.cur_history_id == 0 or self.web.done:
|
||||||
self.server_status.stop_server()
|
self.server_status.stop_server()
|
||||||
self.server_status_label.setText(strings._('close_on_autostop_timer'))
|
self.server_status_label.setText(strings._('close_on_autostop_timer'))
|
||||||
return True
|
return True
|
||||||
|
@ -146,7 +146,7 @@ class ShareMode(Mode):
|
||||||
Starting the server.
|
Starting the server.
|
||||||
"""
|
"""
|
||||||
# Reset web counters
|
# Reset web counters
|
||||||
self.web.share_mode.download_count = 0
|
self.web.share_mode.cur_history_id = 0
|
||||||
self.web.reset_invalid_passwords()
|
self.web.reset_invalid_passwords()
|
||||||
|
|
||||||
# Hide and reset the downloads if we have previously shared
|
# Hide and reset the downloads if we have previously shared
|
||||||
|
|
Loading…
Add table
Reference in a new issue