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

Is there a simple way to load scripts from ~/.config/mpv/scripts ? #57

Open
Anskrevy opened this issue Mar 18, 2023 · 0 comments
Open

Comments

@Anskrevy
Copy link

Anskrevy commented Mar 18, 2023

I'm getting a feel for the api with the simple example but my attempts at loading scripts have not worked. I've tried the following

    check_error(mpv_set_option_string(ctx, "config-dir", "/home/anon/.config/mpv"));
    check_error(mpv_set_option_string(ctx, "load-scripts", "yes"));

but to no avail. Will I really need to pass each script from the directory manually like so?

    for (int i = 0; i < argc; ++i)
        check_error(mpv_set_option_string(ctx, "script", argv[i]));

(assuming **argv is an array of script files)

@Anskrevy Anskrevy changed the title Is there a way to load scripts from ~/ Is there a simple way to load scripts from ~/.config/mpv/scripts ? Mar 18, 2023
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

No branches or pull requests

1 participant