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

Some way to use the same archive for multiple sites? #1711

Closed
KonoVitoDa opened this issue Jul 19, 2021 · 8 comments
Closed

Some way to use the same archive for multiple sites? #1711

KonoVitoDa opened this issue Jul 19, 2021 · 8 comments

Comments

@KonoVitoDa
Copy link

I would like to use the same file for Sankaku Complex, Gelbooru and Danbooru, so if I download a file from one site, if I try to download the same file (same md5) from another site, the file will be skipped.

@nisehime
Copy link

nisehime commented Jul 20, 2021

One of the possible configs:

{
  "extractor": {
     "booru": {
       "archive": "./booru_db.sqlite3",
       "archive-format": "{md5}"
    }
}

But it won't work because gallery-dl automatically adds category name at the beginning of each string. So, without code modification there's no easy way.

mikf added a commit that referenced this issue Jul 20, 2021
@mikf
Copy link
Owner

mikf commented Jul 20, 2021

Added an archive-prefix option to control what gets placed before each archive ID, if anything.

     "booru": {
       "archive": "./booru_db.sqlite3",
       "archive-format": "{md5}",
       "archive-prefix": ""
    }

@nisehime
Copy link

@mikf Isn't it basically a duplicate option? There's no difference if I set {category} in the archive-format like {category}{id}_{filename} (assuming there's no prefix) or split it to archive-prefix and archive-format like {category}+{id}_{filename}

@thatfuckingbird
Copy link
Contributor

@mikf Isn't it basically a duplicate option? There's no difference if I set {category} in the archive-format like {category}{id}_{filename} (assuming there's no prefix) or split it to archive-prefix and archive-format like {category}+{id}_{filename}

This way it doesn't break existing configs.

@Hrxn
Copy link
Contributor

Hrxn commented Jul 20, 2021

@mikf Isn't it basically a duplicate option? There's no difference if I set {category} in the archive-format like {category}{id}_{filename} (assuming there's no prefix) or split it to archive-prefix and archive-format like {category}+{id}_{filename}

But it won't work because gallery-dl automatically adds category name at the beginning of each string. So, without code modification there's no easy way.

That's a contradiction, by the way.

Should've looked at the commit first..

@Skyofflad
Copy link

Wait. You can use md5 for archive? Or is it a theoretical parameter?
When i tried using the example above - "archive-format": "{md5}" gallery-dl exited with an error.

@nisehime
Copy link

nisehime commented Jul 21, 2021

Only for the sites which have such keyword, I guess it's only boorus. Check with the -K

@Skyofflad
Copy link

Only for the sites which have such keyword, I guess it's only boorus. Check with the -K

Shame, it would be very useful in kemonoparty extractor.

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

6 participants