Skip to content

[BUG] Download limit flag and exclude_id flag options cause unexpected results #986

@Weldawadyathink

Description

@Weldawadyathink
  • I am reporting a bug.
  • I am running the latest version of BDfR
  • I have read the Opening an issue

Description

If a post is not downloaded because it is in the exclusion list, it is still counted against the --limit.

Command

Any download command with ID exclusions should trigger the bug. I am currently using:

bdfr download --verbose ./bdfr --log ./bdfr.log.txt --subreddit audiobookcovers --limit 1 --sort new --file-scheme {POSTID} --exclude-id-file bdfr/exclude_id.txt

Environment (please complete the following information)

  • OS: Linux docker, running on fly.io
  • Python version: 3.13.5

Additional info

I haven't seriously used python in a long time, but I poked around the code a bit. It appears that the iterator is first created from the PRAW output, and then limited. Then when a post is excluded, it is just skipped in the download process, effectively downloading less than the expected posts.

If you would like, I may be able to throw together a pull request for this, but my python is very rusty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions