Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change settings mid-download via script or exec postprocessor? #5811

Open
Twi-Hard opened this issue Jun 30, 2024 · 1 comment
Open

Change settings mid-download via script or exec postprocessor? #5811

Twi-Hard opened this issue Jun 30, 2024 · 1 comment

Comments

@Twi-Hard
Copy link

Is it possible to change settings with a bash script when something happens in a download for example, hitting 429 or 403 error codes, cookies not working anymore, etc in the middle of a download?
I run gallery-dl through a bash script that changes settings based on certain conditions based on which domain is being downloaded from for things gallery-dl can't do by itself.
This could also be useful to people within gallery-dl if it's done via a exec post processor instead of a wrapper script like mine.

@mikf
Copy link
Owner

mikf commented Jun 30, 2024

Changing setting mid-download would maybe be possible via python post processor and metadata-extractor by modifying the extractor's internal state.

Doing this with an external script is currently impossible and would require gallery-dl to listen on a socket / implement some sort of server for another program to send "commands" to. Maybe even some sort of local API server like Hydrus. (Or maybe a signal handler that causes gallery-dl to re-read its config file, but that's not portable)

hitting 429 or 403 error codes, cookies not working anymore

Cursor support, i.e. being able to resume an extractor run from where it left off, might help here. I'll probably add something like this for Twitter before the next release, similar to Instagram.

based on which domain is being downloaded from for things gallery-dl can't do by itself.

Maybe we could add a (post processor) event or something to that extend that triggers for unsupported URLs, as they can currently only be written to a file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants