Skip to content

Added tags to the title for common failure conditions#50

Open
glop102 wants to merge 3 commits intohappypandax:masterfrom
glop102:master
Open

Added tags to the title for common failure conditions#50
glop102 wants to merge 3 commits intohappypandax:masterfrom
glop102:master

Conversation

@glop102
Copy link

@glop102 glop102 commented Sep 1, 2022

There are two common failure modes for e(x)hentai galleries

  1. the gallery is expunged (eg copyright takedown)
  2. the user is out of GP to download the archive
    Failure 2 is easily detectable as the response to getting the
    archive URL specifically reports such a failure.
    Failure 1 is more of an educated guess as the point of detection
    is getting a 404 even though we were given an archive key.

Also a seemingly innocuous bug of the condition of which login
service to use. The condition to choose x or non-x was backwards.

There are two common failure modes for e(x)hentai galleries
  1) the gallery is expunged (eg copyright takedown)
  2) the user is out of GP to download the archive
Failure 2 is easily detectable as the response to getting the
archive URL specifically reports such a failure.
Failure 1 is more of an educated guess as the point of detection
is getting a 404 even though we were given an archive key.

Also a seemingly innocuous bug of the condition of which login
service to use. The condition to choose x or non-x was backwards.
@glop102
Copy link
Author

glop102 commented Sep 2, 2022

Uhhh, whoops, i just realized i screwed up a little bit.
The way i am detecting if a gallery is expunged is with assuming that is what happened when we get a 404 when trying to grab that archive. There is a very straight forward and obvious field "expunged" of true/false that is handed to us instead of just assuming things later on that should be used instead.
I will make that change to do things correctly tomorrow.

This is only a failure because the flag seems to make zero sense.
I have examples where things are marked as expunged but are still
totally available on both domains, archives included.
I also have examples where the archives are not available but the
expunged flag is still false.
I have not found a single example yet where a gallery is marked as
expunged and is unavailable, ergo, the flag is useless.
The code was a bit silly with the indentation due to nesting things
inside of if statements that never even had an else clause.
Mostly code was just moved up in scope and the if statements were
inverted to return early when meeting the pre-condition.

Also added in comments for different sections and organized the sections
to keep logical parts together.
@glop102
Copy link
Author

glop102 commented Sep 16, 2022

Well i gave up on using the "expunged" flag because it is nonsensical for when it is true or false.
I also cleaned up the downloader plugin a bit for readability.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant