Skip to content

Commit

Permalink
add changes for properly gettting speed from config and also limiting
Browse files Browse the repository at this point in the history
  • Loading branch information
datawhores committed Aug 7, 2024
1 parent 3c46dec commit fad3ba3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ofscraper/utils/config/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def get_download_limit(config=None,mediatype=None):
.get((mediatype or "").lower(), {})
.get("download_limit")
or config.get("download_limit",)
or config.get("download_options", {}).get("download_limit")
or config.get("performance_options", {}).get("download_limit")
or constants_attr.getattr("DOWNLOAD_LIMIT_DEFAULT")
)
)
Expand Down
2 changes: 1 addition & 1 deletion ofscraper/utils/system/speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def speed(self):
previous_stats = self.previous_stats[pid]
previous_time=self.previous_time[pid]
previous_speed=self.previous_speed[pid]
if curr_time-previous_time<1.6:
if curr_time-previous_time<1.5:
total_bytes_second=total_bytes_second+previous_speed
else:
self.previous_stats[pid] = curr_stats # Update previous stats
Expand Down

0 comments on commit fad3ba3

Please sign in to comment.