Skip to content

Commit fdcea13

Browse files
committed
Revert "{osc,select}.lua: show playlist entries with trailing /"
This reverts commit ee05804. Only the select.lua part since osc.lua list formatting was removed. Since playlist/N/filename is now normalized, it is never going to have trailing slashes so there is no need to strip them.
1 parent 5eac8a0 commit fdcea13

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

player/lua/select.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,13 @@ mp.add_key_binding(nil, "select-playlist", function ()
4343
local playlist = {}
4444
local default_item
4545
local show = mp.get_property_native("osd-playlist-entry")
46-
local trailing_slash_pattern = mp.get_property("platform") == "windows"
47-
and "[/\\]+$" or "/+$"
4846

4947
for i, entry in ipairs(mp.get_property_native("playlist")) do
5048
playlist[i] = entry.title
5149
if not playlist[i] or show ~= "title" then
5250
playlist[i] = entry.filename
5351
if not playlist[i]:find("://") then
54-
playlist[i] = select(2, utils.split_path(
55-
playlist[i]:gsub(trailing_slash_pattern, "")))
52+
playlist[i] = select(2, utils.split_path(playlist[i]))
5653
end
5754
end
5855
if entry.title and show == "both" then

0 commit comments

Comments
 (0)