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

[pixiv] include ugoira_meta in zip #1297

Open
TestPolygon opened this issue Feb 5, 2021 · 4 comments
Open

[pixiv] include ugoira_meta in zip #1297

TestPolygon opened this issue Feb 5, 2021 · 4 comments

Comments

@TestPolygon
Copy link

The program currently downloads only zip with frames, but there is ugoira_meta.json (https://www.pixiv.net/ajax/illust/${id}/ugoira_meta) that contains meta data about the animation — the delays that are required for the correct FPS.

Maybe it makes sense to include this json in zip?
For example, Pixiv Toolkit includes body.frames array from this json as animation.json file.

@TestPolygon
Copy link
Author

By the way, there is frames[][delay] property for ugoira files, but this does not work for the purpose of filenaming: [pixiv][error] FilenameFormatError: Applying filename format string failed (ValueError: Empty attribute in format string).

@TestPolygon
Copy link
Author

I have tried to save the delay frames[0][delay] in HTML generated by postprocessor, but ?:// operator does not work with it.
{frames[0][delay]?:<br>Ugoira delay: //}

It shows [postprocessor][error] 'metadata' initialization failed: ValueError: Only '.' or '[' may follow ']' in format field specifier.

@mikf
Copy link
Owner

mikf commented Jun 5, 2021

You mixed ? and :. Try {frames[0][delay]:?<br>Ugoira delay: //}.

It is also now possible to set a filter for post processors (3cbbefd), which, according to #1460 (comment), might help with this issue here.

@TestPolygon
Copy link
Author

{frames[0][delay]:?<br>Ugoira delay: / ms/} works.

But is it possible to escape /?
{frames[0][delay]:?<br>Ugoira delay: <span class='delay'>/<\/span> ms/} does not work.

[pixiv][error] An unexpected error occurred: ValueError - Invalid format specifier.

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