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

(feat) add configurable loop count option #4

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

mal0ner
Copy link
Contributor

@mal0ner mal0ner commented Jan 8, 2024

Adds a configurable loop_count property to the gifos_settings.toml and gifos.py Terminal class, with a setter function in the latter.

I had a bit of trouble trying to generate a non-looping gif with the library and ended up having to just yoink the call to ffmpeg from the Terminal.gen_gif() method and change it to add a -loop flag.

From ffmpeg -h muxer=gif the loop count options are:

-loop arg num loops
-1 no loop
0 infinite loop
1..65535 loop n times

with a default argument of 0

Having the default as zero in both the configuration file as well as the terminal class should mean that default behaviour is unchanged. This is my first ever pull request so let me know if it needs changing or is just terrible.

Thank you for such a fun library!

@x0rzavi
Copy link
Owner

x0rzavi commented Jan 9, 2024

Hi, the PR is absolutely fine, LGTM. Thank you for your contribution! :)

@x0rzavi x0rzavi merged commit b2c268b into x0rzavi:main Jan 9, 2024
1 check passed
@mal0ner
Copy link
Contributor Author

mal0ner commented Jan 9, 2024

Hi, the PR is absolutely fine, LGTM. Thank you for your contribution! :)

Thank you very much that's great : )

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.

None yet

2 participants