config file #enhancement #1

Closed
opened 2023-03-13 11:23:20 +01:00 by erikLundstedt · 2 comments
erikLundstedt commented 2023-03-13 11:23:20 +01:00 (Migrated from github.com)

would it be possible to implement a config file?
maybe using json as serde_json is already a dependency:

a config file would be useful to, for example, start mpv with -fs/--fullscreen or possibly even replacing mpv completely, or prefixing/wrapping it with something like gobble

I have no experience/knowledge in rust, otherwise I would have made a PR as I dont think it would be hard(basically just parsing 1 or 2 json values and using those instead of the defaults if set)

would it be possible to implement a config file? maybe using json as `serde_json` is [already a dependency](https://github.com/ryze312/ff2mpv-rust/blob/ab554ead23d73ed56764dee9d73e7ba57bf60c01/Cargo.toml#L6-L8): a config file would be useful to, for example, start `mpv` with `-fs/--fullscreen` or possibly even replacing `mpv` completely, or prefixing/wrapping it with something like [gobble](https://github.com/EmperorPenguin18/gobble) I have no experience/knowledge in rust, otherwise I would have made a PR as I dont think it would be hard(basically just parsing 1 or 2 json values and using those instead of the defaults if set)
ryze312 commented 2023-03-13 20:49:40 +01:00 (Migrated from github.com)

Sure, why not.
It would be easier and more useful to just have a value for a full command.
Something like this

{
    "mpv_command": "mpv --fs --vo=gpu --hwdec=vaapi"
}

I am not sure how to go about validating config for possible syntax and shell command errors. ff2mpv doesn't provide a way to do that. Although, it is possible to execute this script directly, not from the browser, so I can have an access to terminal output and report errors there.

Sure, why not. It would be easier and more useful to just have a value for a full command. Something like this ```json { "mpv_command": "mpv --fs --vo=gpu --hwdec=vaapi" } ``` I am not sure how to go about validating config for possible syntax and shell command errors. ff2mpv doesn't provide a way to do that. Although, it is possible to execute this script directly, not from the browser, so I can have an access to terminal output and report errors there.
ryze312 commented 2023-03-14 19:49:02 +01:00 (Migrated from github.com)

Available in v1.1.0!

Available in [v1.1.0](https://github.com/ryze312/ff2mpv-rust/releases/tag/1.1.0)!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ryze/ff2mpv-rust#1
No description provided.