Commit Graph

1133 Commits

Author SHA1 Message Date
Kacper Michajłow 48f944d21b TOOLS/umpv: add Windows support
While there are native ways to implement this in mpv itself on Windows.
We can also support this script without any problem.
2025-02-05 20:22:01 +01:00
Kacper Michajłow f9a7179f37 TOOLS/umpv: use append-play
It makes more sense to star playback if nothing is playing.
2025-02-05 20:22:01 +01:00
Kacper Michajłow dfbd60f9bb TOOLS/umpv: don't wait for mpv after it is run
We just want to start mpv, there is no need to keep umpv script alive.
2025-02-05 20:22:01 +01:00
Kacper Michajłow b870d1933a TOOLS/umpv: use builtin profile for pseudo gui options 2025-02-05 20:22:01 +01:00
Kacper Michajłow 62847c9f39 TOOLS/umpv: handle the case when mpv disappears during adding files 2025-02-05 20:22:01 +01:00
Kacper Michajłow 7372bc5f12 TOOLS/umpv: minor fixes to style and typing
Add UMPV_SOCKET_DIR for socket base dir selection and fallback to TMPDIR
as last resort.
2025-02-05 20:22:01 +01:00
Leo Izen a7357c221e TOOLS/mpv_identify.sh: handle forward slash in property names
Property names contain '-' characters, which are translated into
underscores because POSIX shell variables cannot contain hyphens.

We should do the same thing for forward slash characters (i.e. '/')
because these also cannot be present in the names of shell variables.

Fixes: #15782
2025-02-05 04:54:04 +01:00
Guido Cella e07c78f2db TOOLS/mpv-osd-symbols.sfdir: add a menu icon
Taken from the last freely licensed version of Symbola and manually
adjusted the number in the glyph file to match the adjacent arrows.

Saving sfdir with fontforge also automatically removed the O flag from 2
existing glyphs. According to
https://fontforge.org/docs/techref/sfdformat.html "O" just meant "the
character was open when last saved", so it doesn't change anything
visible.
2025-01-27 21:06:50 +01:00
Guido Cella 118ef75c27 TOOLS/mpv-osd-symbols.sfdir: document how to add icons 2025-01-27 21:06:50 +01:00
Kacper Michajłow e8fa2a7aaa TOOLS/osxbundle: fix inplace argument type 2025-01-25 02:35:54 +01:00
Kacper Michajłow 805793154d TOOLS/macos-sdk-version: check if xcodebuild is defined
Makes mypy happy.
2025-01-25 02:35:54 +01:00
Kacper Michajłow 37b513a760 TOOLS/file2string: use array of tuples to avoid unpacking strings 2025-01-25 02:35:54 +01:00
Kacper Michajłow da2880fb54 TOOLS/dylib_unhell: check regex search result 2025-01-25 02:35:54 +01:00
Kacper Michajłow 2d5c5030e5 TOOLS/stats-conv: typing fixes
To make mypy happy. PyQtGraph doesn't define types, so ignore those.
PyQt6 has types, but we use only one function from it, so to avoid
installing it, ignore it too.
2025-01-25 02:35:54 +01:00
Kacper Michajłow 59afdf2ef8 TOOLS/gen-mpv-desktop: don't overlap variable with different types 2025-01-25 02:35:54 +01:00
Kacper Michajłow 4cf914d44d TOOLS/gen-interface-changes: fix variable type mismatch 2025-01-25 02:35:54 +01:00
Kacper Michajłow 59d1dc43b9 various: fix typos 2025-01-04 15:59:49 +02:00
der richter e0f82b1a77 gamma-auto.lua: add this script as replacement for --gamma-auto
also mention this replacement for --gamma-auto.
2024-12-21 16:15:44 +01:00
Guido Cella 1b53793a4c various: convert tabs to spaces 2024-10-18 18:32:26 +02:00
Kacper Michajłow baabc291f1 build: fix dynamic generation of mpv.desktop file protocols
Running cross-compiled binaries may be possible, but the runtime
environment must be configured correctly. In some configurations, an
exe_wrapper needs to be used, and in all cases, the library path must be
set correctly for the given binary. Fortunately, Meson handles all of
this if cross-compilation is configured correctly.

Fix this by having Meson run the mpv binary directly, instead of as a
subprocess of a Python script. This ensures that the environment is
properly set for running host binaries, if possible.

Fixes: #15075
Fixes: 056b03f9ed
2024-10-14 01:56:25 +02:00
Nathan Ruiz 44a296be97 ci/lint: add flake8-commas check 2024-10-06 22:15:08 +02:00
Nathan Ruiz c6903f9963 ci/lint: add isort checks 2024-10-06 22:15:08 +02:00
Nathan Ruiz 416035a174 ci/lint: check for pep8 naming convention 2024-10-06 22:15:08 +02:00
Nathan Ruiz 1562895af7 ci/lint: add pyupgrade check 2024-10-06 22:15:08 +02:00
Nathan Ruiz 8a82882d5e ci/lint: ensure double quotes are used in python 2024-10-06 22:15:08 +02:00
Nathan Ruiz e5a383a525 ci/lint: enable pyflakes and pycodestyle checks
This change required some minor rework to make the code conform to the
following:
- Restrict line length to 88 character
- Use spaces rather than tabs (only affect ci/lint-commit-msg.py)
- Use f-strings rather than % formatting or `str.format()`
2024-10-06 22:15:08 +02:00
Nathan Ruiz bee3598ba6 ci/lint: add python linting
Enabled the ruff python linter in CI, and resolved the issues that were
detected by it. Ruff was used due to it's faster checking compared with
other linters like pylint. This was added to resolve the python linting
request in #13608.
2024-10-06 22:15:08 +02:00
sfan5 5e9e756f53 TOOLS/gen-interface-changes: small usability improvement 2024-09-23 19:20:05 +02:00
Kacper Michajłow 71f2220991 meson: use relative file paths for file2string
This fixes "Generated from" comments to not include local source path in
generated files.
2024-09-21 23:39:10 +02:00
Guido Cella 284293ceb5 TOOLS/cycle-deinterlace-pullup.lua: fix removing the filter
This has been broken since b56e63e2a9 removed vf del. Replace it with vf
remove. Fixes #14881.
2024-09-19 13:38:16 +00:00
llyyr c7dce6a838 TOOLS/gen-mpv-desktop.py: set --no-config when probing protocols
Apparently for an user mpv would crash on startup if built with asan and
mpv attemps to load mpv-mpris. Just set --no-config so we don't load
anything external since this is more correct anyway.
2024-09-15 20:10:29 +02:00
llyyr dcb4b491b2 TOOLS/stats-conv: minor cleanup 2024-08-01 01:58:30 +02:00
llyyr 0c72a2f26d TOOLS/stats-conv: silence linter messages 2024-08-01 01:58:30 +02:00
llyyr f1cd59ba92 TOOLS/stats-conv: convert to pyqt6 2024-08-01 01:58:30 +02:00
Kacper Michajłow e17b5c635e VERSION: rename to MPV_VERSION to avoid standard library header conflict
Root directory is added to include directories and `VERSION` conflicts
with `#include <version>` which is standard library header.
2024-07-29 21:38:19 +02:00
Guido Cella 948faa5482 lua: don't pass nil as the second argument of mp.get_property_number
This doesn't do anything because nil is already the default value of
unavailable properties.
2024-06-08 23:10:37 +02:00
nanahi e8905650fe TOOLS/gen-interface-changes.py: sort interface changes by file content
With the previous commit, they're in effect sorted by the types of the
interface changes.

As a lazy measure to sort changes by the breakages they cause, sort the
content reverse alphabetically, which works OK by accident.
2024-06-08 23:08:43 +02:00
Kacper Michajłow e7630722d8 autoload.lua: always accept current file as a valid file
This allows loading other types of media from the current directory,
with same_type=no, regardless of whether the current type is enabled for
autoload.

Fixes: #14287
2024-06-04 15:39:18 +02:00
Kacper Michajłow a64a5c2222 autoload.lua: match also image extension
For clarity, it is already matched if extention is in EXTENSIONS if
pl_count == 1.
2024-06-04 15:39:18 +02:00
Kacper Michajłow 8dcd5ea288 autoload.lua: cosmetic changes 2024-06-04 15:39:18 +02:00
Kacper Michajłow 7d4719704e autoload.lua: fix options update
The extensions list needs to be cleared in this case. Also, add the
missing split_patterns().
2024-06-04 15:39:18 +02:00
Guido Cella e95af5b607 TOOLS/autoload.lua: fix directory_mode and ext options
Operations on option values need to be performed after they are read.

Fixes 843161d96e.
2024-06-03 15:25:51 +02:00
Guido Cella c5468ba5ff TOOLS/test-hooks.lua: fix lint warning 2024-06-02 22:26:00 +02:00
Guido Cella 3613070380 TOOLS/status-line.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella c28525ac9d TOOLS/osd-test.lua: fix lint warning 2024-06-02 22:26:00 +02:00
Guido Cella 1f356d6784 TOOLS/observe-all.lua: fix lint warning 2024-06-02 22:26:00 +02:00
Guido Cella 5977722adc TOOLS/nan-test.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella c12e437d43 TOOLS/cycle-deinterlace-pullup.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella f3f77353f2 TOOLS/command-test.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella 843161d96e TOOLS/autoload.lua: fix lint warnings 2024-06-02 22:26:00 +02:00