History

various: print Image instead or Video for image tracks

Fixes #8561.

Guido Cella committed 2 years ago

Commit 2fd88ff1 parent 21df8534 files · +13 −8Browse files

Showing the changes to player/lua/stats.lua (1 of 4 files). Show all

Unified · Split

player/lua/stats.lua+4−3
@@ -952,9 +952,10 @@ local function add_video(s) · 951 unmodified lines
952952 return
953953 end
954954
955− append(s, "", {prefix="Video:", nl=o.nl .. o.nl, indent=""})
956955 local track = mp.get_property_native("current-tracks/video")
957− if track and append(s, track["codec-desc"], {prefix_sep="", nl="", indent=""}) then
956+ if track then
957+ append(s, "", {prefix=track.image and "Image:" or "Video:", nl=o.nl .. o.nl, indent=""})
958+ append(s, track["codec-desc"], {prefix_sep="", nl="", indent=""})
958959 append(s, track["codec-profile"], {prefix="[", nl="", indent=" ", prefix_sep="",
959960 no_prefix_markup=true, suffix="]"})
960961 if track["codec"] ~= track["decoder"] then
@@ -1217,7 +1218,7 @@ local function add_track(c, t, i) · 256 unmodified lines
12171218 return
12181219 end
12191220
1220− local type = t["type"]:sub(1,1):upper() .. t["type"]:sub(2)
1221+ local type = t.image and "Image" or t["type"]:sub(1, 1):upper() .. t["type"]:sub(2)
12211222 append(c, "", {prefix=type .. ":", nl=o.nl .. o.nl, indent=""})
12221223 append(c, t["title"], {prefix_sep="", nl="", indent=""})
12231224 append(c, t["id"], {prefix="ID:"})

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t