From 7c4c9bc86f55f4d1224814fbeafdee8f1c3c3108 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Tue, 2 May 2023 19:29:27 -0500 Subject: player: use XDG_STATE_HOME for watch_later A pain point for some users is the fact that watch_later is stored in the ~/.config directory when it's really not configuration data. Roughly 2 years ago, XDG_STATE_DIR was added to the XDG Base Directory Specification[0] and its description, user-specific state data, actually perfectly matches what watch_later data is for. Let's go ahead and use this directory as the default for watch_later. This change only affects non-darwin unix-like systems (i.e. Linux, BSDs, etc.). The directory doesn't move for anyone else. Internally, quite a few things change with regards to the path selection. If the platform in question does not have a statedir concept, then the path selection will simply return "home" instead (old behavior). Fixes #9147. [0]: https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/4f2884e16db35f2962d9b64312917c81be5cb54b --- DOCS/man/mpv.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'DOCS/man/mpv.rst') diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index c1314ef2c2..63042e2925 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -461,6 +461,8 @@ Name Meaning ``~~desktop/`` the path to the desktop (win32, macOS) ``~~exe_dir/`` win32 only: the path to the directory containing the exe (for config file purposes; ``$MPV_HOME`` overrides it) +``~~state/`` the path to application state data (``~/.local/state/mpv/``) + On some platforms, this will be the same as ``~~home/``. ``~~old_home/`` do not use ================ =============================================================== @@ -1584,7 +1586,7 @@ For Windows-specifics, see `FILES ON WINDOWS`_ section. See `Script location`_ for details. -``~/.config/mpv/watch_later/`` +``~/.local/state/mpv/watch_later/`` Contains temporary config files needed for resuming playback of files with the watch later feature. See for example the ``Q`` key binding, or the ``quit-watch-later`` input command. -- cgit v1.2.3