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

[Feature request] Option to wait indefinitely when gallery-dl detects not everything can be downloaded #3338

Open
Scripter17 opened this issue Nov 30, 2022 · 6 comments

Comments

@Scripter17
Copy link
Contributor

Scripter17 commented Nov 30, 2022

[Revised for clarity]

The request should be simple to add: When gallery-dl can't download something, tell the user and then wait for a new login cookie or for the post to be paid for or whatnot

The config might look a bit like this:

"cant-download-better-name-pending": {
    "login" : "wait",  // Check for a new login cookie every few seconds
    "follow": "wait",  // Check if the... downloadee?... is being followed yet
    "pay"   : "ignore" // Current behavior - Just keep going
}

However it's implemented, I think the user should be able to press enter in the console to continue anyway. That part may be complicated.


It's definitely not required and should probably wait for gdl 2.0, but it'd be neat if this could run user-specified commands like a postprocessor. Seems like this'd be something users would want a phone notification for

...Web UI...

@afterdelight
Copy link

until the user fixes it and then continue

what do you mean by this

@Scripter17
Copy link
Contributor Author

Case I ran into: The login cookie that gallery-dl was using was expired and couldn't get mature scraps on deviantart

So the idea is that gallery-dl would say "you need to login again" or something, then I log in ("fix it") and gallery-dl continues

Yeah my writing tends to break down when doing feature requests. Gonna go in and edit the post for clarity now

@afterdelight
Copy link

yeah, now i see it. but this kind of feature is kind of unnecessary for now isnt it

@rautamiekka
Copy link
Contributor

yeah, now i see it. but this kind of feature is kind of unnecessary for now isnt it

How come ?

@mikf
Copy link
Owner

mikf commented Dec 2, 2022

I think this could be implemented in general by having an option that triggers certain actions for logging messages/exceptions.

Maybe something like

"option-name": {
    "warning:*cookies*": "wait",
    "error:Unable to *": "abort"
}

wait, abort, etc could be custom commands as well

However it's implemented, I think the user should be able to press enter in the console to continue anyway. That part may be complicated.

Waiting for user input is just input(). The complicated part would be restarting or re-initializing the current extractor to load new cookies etc.

Waiting for user input while running is also not something a command line should ever do. In general you'd throw an error, exit the process, and let the user restart.

@Scripter17
Copy link
Contributor Author

Someone's got to have solved the problem of "accept user input or continue after 5 seconds". Put that in a while loop and then you're good

And yeah, trying to hot-reload cookies seems impossible to do without modifying every extractor it applies to...

This whole thing should probably wait for 2.0 if it ever happens

mikf added a commit that referenced this issue Feb 13, 2023
Very much a work in progress.

At the moment, it allows to
- wait and restart an extractor (#3338)
- change the exit code (#3630)
- change the log level of a logging message
based on the contents of a logging message
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

4 participants