1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-01 14:50:07 +00:00

command: make playlist builtin OSD property show titles instead of URLs

Useful for ytdl.
This commit is contained in:
wm4 2019-01-04 12:24:12 +01:00
parent 8ca4386366
commit 4bc96e8204

View File

@ -2922,12 +2922,15 @@ static int mp_property_playlist(void *ctx, struct m_property *prop,
for (struct playlist_entry *e = pl->first; e; e = e->next)
{
char *p = e->filename;
char *p = e->title;
if (!p) {
p = e->filename;
if (!mp_is_url(bstr0(p))) {
char *s = mp_basename(e->filename);
if (s[0])
p = s;
}
}
const char *m = pl->current == e ? list_current : list_normal;
res = talloc_asprintf_append(res, "%s%s\n", m, p);
}