summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorsunpenghao <sunpenghao1997@outlook.com>2024-03-02 16:48:08 +0800
committerKacper Michajłow <kasper93@gmail.com>2024-04-17 23:46:35 +0200
commitc70cc5b01d9ce0469f424f6d52bf68f09ac598f1 (patch)
treeb2acce00d62cfeff1350514cd27c90690ee0708b /player/lua
parent715feea8d82a750c3d627ee10c4fd6c6fe1fbe86 (diff)
downloadmpv-c70cc5b01d9ce0469f424f6d52bf68f09ac598f1.tar.bz2
mpv-c70cc5b01d9ce0469f424f6d52bf68f09ac598f1.tar.xz
osc: add playlist_media_title option
Showing media titles in the playlist is pointless when sources are ill tagged and media titles contain only garbage. Being able to opt for file names at least gives us a choice in such cases.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/osc.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 3ba1890a92..467f58bea6 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -57,6 +57,7 @@ local user_opts = {
livemarkers = true, -- update seekbar chapter markers on duration change
chapters_osd = true, -- whether to show chapters OSD on next/prev
playlist_osd = true, -- whether to show playlist OSD on next/prev
+ playlist_media_title = true, -- whether to use media titles as playlist entry names
chapter_fmt = "Chapter: %s", -- chapter print format for seekbar-hover. "no" to disable
unicodeminus = false, -- whether to use the Unicode minus sign character
}
@@ -913,7 +914,7 @@ function get_playlist()
for i, v in ipairs(limlist) do
local title = v.title
local _, filename = utils.split_path(v.filename)
- if title == nil then
+ if not user_opts.playlist_media_title or title == nil then
title = filename
end
message = string.format('%s %s %s\n', message,