mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
10.84k stars 889 forks source link

[Feature Request] Compare abort/terminate/exit settings #1592

Closed Copy-link closed 2 years ago

Copy-link commented 3 years ago
compare.finish
----------------
Type
    ``string``
Default
    ``null``
Description
    Controls whether to halt extraction when files compare as equal.

    * ``"abort"``: Stop the current extractor run
    * ``"abort:N"``: Stop the current extractor run after ``N`` consecutive matches

    * ``"terminate"``: Stop the current extractor run, including parent extractors
    * ``"terminate:N"``: Stop the current extractor run, including parent
      extractors, after ``N`` consecutive matches

    * ``"exit"``: Exit the program altogether
    * ``"exit:N"``: Exit the program after ``N`` consecutive matches
Copy-link commented 2 years ago

@mikf Since you just added FUNDING.yml, I'd be willing to put $5 in the tip jar to make this a priority. I've been holding off on scraping kemono.party waiting for this feature.

The idea is I want to set the filenames back to {id}_{title}_{filename}.{extension} and I'd use compare with enumerate. This works great for the initial run, but consecutive runs have no way of stopping automatically without redownloading everything.

Copy-link commented 2 years ago

@mikf I noticed you added this suggestion to the action setting instead, but based it off replace. As I mentioned above though, I needed it for enumerate.

I sent the tip as promised, but unfortunately I still can't do what I was hoping to.

mikf commented 2 years ago

@ImportTaste https://github.com/mikf/gallery-dl/commit/df8050b81de71f5981b2109864d9191ec39fdb34 moves abort/terminate/exit to their own separate equal option (it triggers when files compare as equal). Hopefully that's more useful than https://github.com/mikf/gallery-dl/commit/cdd72e14139f059674a640d1ab11d9bf0f5bd469.

Copy-link commented 2 years ago

Yes, thank you!