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

Poipiku "count" condition doesn't exist #6445

Closed
baconmeh opened this issue Nov 9, 2024 · 2 comments
Closed

Poipiku "count" condition doesn't exist #6445

baconmeh opened this issue Nov 9, 2024 · 2 comments

Comments

@baconmeh
Copy link

baconmeh commented Nov 9, 2024

        "poipiku":
        {
            "filename": {
    "count == 1": "poipiku {user_id} {post_id} {filename}.{extension}",
    "count > 1": "poipiku {user_id} {post_id} {filename} {num}.{extension}"
                        }
        },

Based on how I've done this with other extractors (Like twitter, misskey, baraag), this should put out something like poipiku 123 1234567 1234567_Vdfa2_A.gif. But it doesn't. It uses the default formatting instead.

A friend looked into it for me and discovered that while "count" is listed for "Keywords for filenames and --filter:", "count" doesn't actually exist as a condition for Poipiku's extractor. So instead of counting anything in the posts I'm fetching, it does nothing and ignores the whole format I laid out.

@mikf
Copy link
Owner

mikf commented Nov 10, 2024

Currently count is not returned as a proper number but a string instead, causing the comparisons to fail and reverting to the default filename format.

As a workaround, convert count to a number first:

"filename": {
    "int(count) > 1" : "poipiku {user_id} {post_id} {filename} {num}.{extension}",
    ""               : "poipiku {user_id} {post_id} {filename}.{extension}"
}

@baconmeh
Copy link
Author

Thank you kindly for your help. This works 👍

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