Skip to content

Commit

Permalink
Formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Johnson committed Nov 28, 2024
1 parent 0b4326e commit 00ed508
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bdfr/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(self, args: Configuration, logging_handlers: Iterable[logging.Handl
self._apply_logging_handlers(itertools.chain(logging_handlers, [file_log]))
self.run_time = datetime.now().isoformat()
self._setup_internal_objects()
self.existcount=0
self.existcount = 0

self.reddit_lists = self.retrieve_reddit_lists()

Expand Down
8 changes: 4 additions & 4 deletions bdfr/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ def _download_submission(self, submission: praw.models.Submission):
if destination.exists():
logger.debug(f"File {destination} from submission {submission.id} already exists, continuing")
if self.args.stop_on_exist and not submission.stickied:
self.existcount+=1
if self.existcount>=5:
logger.warning(f"Prevously-downloaded threshold met, exiting")
self.existcount += 1
if self.existcount >= 5:
logger.warning("Prevously-downloaded threshold met, exiting")
exit(0)
continue
elif not self.download_filter.check_resource(res):
logger.debug(f"Download filter removed {submission.id} file with URL {submission.url}")
continue
self.existcount=0
self.existcount = 0
try:
res.download({"max_wait_time": self.args.max_wait_time})
except errors.BulkDownloaderException as e:
Expand Down

0 comments on commit 00ed508

Please sign in to comment.