From 7acfc3916b6ac2f360b50f1dbafc3f78dc17c0fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Shadowsun=E2=84=A2?= <12494967+CattoGamer@users.noreply.github.com> Date: Tue, 29 Oct 2024 01:01:35 +0100 Subject: [PATCH] add file name and extension to url parser --- .../cinema_modded/gamemode/extensions/sh_url.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/workshop/gamemodes/cinema_modded/gamemode/extensions/sh_url.lua b/workshop/gamemodes/cinema_modded/gamemode/extensions/sh_url.lua index 8a5391c..181102c 100644 --- a/workshop/gamemodes/cinema_modded/gamemode/extensions/sh_url.lua +++ b/workshop/gamemodes/cinema_modded/gamemode/extensions/sh_url.lua @@ -316,6 +316,14 @@ function parse(url, default) -- path is whatever was left if url ~= "" then parsed.path = url + + -- get file information + if string.GetFileFromFilename(url) then + parsed.file = { + name = string.GetFileFromFilename(url), + ext = string.GetExtensionFromFilename(url) + } + end else parsed.path = "/" end