mpv-player / mpv-player/mpv

Numerically-comparable equivalent of 'mpv-version' property

Open
#7,785 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

There is (AFAIK) currently no "proper" way for a script to check which version of mpv is running, as the mpv-version property seems mostly intended for display purposes. It would be nice to have another property providing the mpv version in a numerically-comparable format, similar to MPV_CLIENT_API_VERSION.

(An alternative would be to parse mpv-version myself, but I doubt its format is ever guaranteed to be parsable.)

Motivation: I'm the author of a plugin where I try to maintain compatibility with older mpv releases (back to 0.21.0 so far). While the presence/absence of new properties/commands is obviously easy to determine (although command-list itself is a recent feature), other changes may be more difficult to detect. For example, change-list didn't work with the file-local-options/ prefix until the introduction of shared-script-properties, so I check for that instead; this is not only hackish but also fragile, as it will break if that property is ever removed/renamed.

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 locating the implementation and documentation for the mpv-version property and the MPV_CLIENT_API_VERSION constant. Define how the new property should encode versions for numeric comparison, then add the property and verify that scripts can distinguish releases such as 0.21.0; the issue names no specific test or file.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.