mpv-player / mpv-player/mpv

Allowing scripts to set profiles locally

Open
#7,786 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core:option-param-conf meta:feature-request scripting
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

At the moment, scripts can only apply profiles globally with apply-profile. This request is for allowing scripts to apply a profile locally, either through a separate command or by passing an optional flags argument to apply-profile. (In the latter case, I'd also request #7785 or some other way of determining if this feature is available.)

Motivation: I'm the author of a plugin which applies profiles based on full pathnames (kinda like use-filedir-conf on steroids). Obviously, these profiles need to be applied on a file-by-file basis. Right now, I'm going through these profiles and applying each option individually with file-local-options/, which is far from an ideal solution. (I'm basically doing a half-assed job reimplementing m_config_set_option_cli() on my own.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing apply-profile command and the file-local-options path, then compare them with the mentioned m_config_set_option_cli() entry point. Define how scripts apply profiles per file and how availability is detected, considering the separate-command and optional-flags alternatives; done means a script can apply a profile locally without reimplementing option handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.