Skip to content

Commit

Permalink
minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mjishnu committed Jun 7, 2024
1 parent 1ddaff5 commit 3934805
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion app/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,20 +271,23 @@ def new_url_gen():
remote_url,
path,
20,
retries=3,
retries=0,
mirror_func=new_url_gen,
block=False,
display=False,
overwrite=False,
)
print(remote_url)
while not d.completed:
download_percentage = int(d.progress)
progress_current.emit(download_percentage)
time.sleep(0.1)
if self.stop.is_set(): # check if the stop event is triggered
d.stop()
d.shutdown()
raise Exception("Stoped By User!")
if d.failed:
d.shutdown()
raise Exception("Download Error Occured!")

progress_main.emit(part)
Expand Down
8 changes: 4 additions & 4 deletions app/modules/url_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ async def geturl(updateid, revisionnumber, file_name, total_prog):

await asyncio.gather(*tasks)

# waiting for all threads to complete
while len(file_dict) != len(final_dict):
check(Event)
time.sleep(0.2)
# # waiting for all threads to complete
if len(file_dict) != len(final_dict):
raise Exception("server returned a incomplete list")

if emit is True:
progress_current.emit(100)
time.sleep(0.2)
Expand Down

0 comments on commit 3934805

Please sign in to comment.