Fix the autostop sharing - a mere history item count of > 0 should not be interpreted as an in-progress download when the timer runs out

This commit is contained in:
Miguel Jacq 2019-11-29 16:52:00 +11:00
parent e18c6bf768
commit 60de9fd335
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -176,7 +176,7 @@ class ShareMode(Mode):
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 self.web.share_mode.cur_history_id == 0 or self.web.done:
if self.history.in_progress_count == 0 or self.web.done:
self.server_status.stop_server()
self.server_status_label.setText(strings._("close_on_autostop_timer"))
return True