Skip to content

Commit

Permalink
Remove some whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrxy committed Oct 18, 2024
1 parent e2e2db4 commit 2abab76
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions spinget.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ def download_segment(seguri, n, total_segments):
chunk_file = segtofile(n, seguri)
if os.path.exists(chunk_file):
print(f"--> using cached: {chunk_file}")
return True

return True
try:
r = requests.get(seguri, stream=True, timeout=(5, 30))
if r.status_code != 200:
Expand Down Expand Up @@ -127,10 +126,8 @@ def download(segment_list):
executor.submit(download_segment, seguri, n, total_segments)
for n, seguri in enumerate(segment_list, start=1)
]

# Wait for all downloads to complete
results = [future.result() for future in concurrent.futures.as_completed(futures)]

# Return True only if all downloads were successful
return all(results)

Expand Down

0 comments on commit 2abab76

Please sign in to comment.