summaryrefslogtreecommitdiffstats
path: root/player/lua/ytdl_hook.lua
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-01-22 23:29:28 -0600
committerDudemanguy <random342@airmail.cc>2023-02-27 17:13:21 +0000
commitc5d12305170cf83305617f5bf6693352835dea37 (patch)
treeb31fe7103a0e7acc458c196514b92ac2bb0578bc /player/lua/ytdl_hook.lua
parent80feac62f175173d7a4a002450482e4be6a02a83 (diff)
downloadmpv-c5d12305170cf83305617f5bf6693352835dea37.tar.bz2
mpv-c5d12305170cf83305617f5bf6693352835dea37.tar.xz
{console,ytdl_hook}: use the platform property
The console.lua check is still kind of dumb since we check an environment variable to distinguish between wayland and x11, but otherwise it should be better in theory.
Diffstat (limited to 'player/lua/ytdl_hook.lua')
-rw-r--r--player/lua/ytdl_hook.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index 3cb5f654dd..27e5f4544b 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -91,7 +91,7 @@ local function map_codec_to_mpv(codec)
end
local function platform_is_windows()
- return package.config:sub(1,1) == "\\"
+ return mp.get_property_native("platform") == "windows"
end
local function exec(args)