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
952 return952 return
953 end953 end
954 954
955 append(s, "", {prefix="Video:", nl=o.nl .. o.nl, indent=""})
956 local track = mp.get_property_native("current-tracks/video")955 local track = mp.get_property_native("current-tracks/video")
957 if track and append(s, track["codec-desc"], {prefix_sep="", nl="", indent=""}) then956 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=""})
958 append(s, track["codec-profile"], {prefix="[", nl="", indent=" ", prefix_sep="",959 append(s, track["codec-profile"], {prefix="[", nl="", indent=" ", prefix_sep="",
959 no_prefix_markup=true, suffix="]"})960 no_prefix_markup=true, suffix="]"})
960 if track["codec"] ~= track["decoder"] then961 if track["codec"] ~= track["decoder"] then
@@ -1217,7 +1218,7 @@ local function add_track(c, t, i) · 256 unmodified lines
1217 return1218 return
1218 end1219 end
1219 1220
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)
1221 append(c, "", {prefix=type .. ":", nl=o.nl .. o.nl, indent=""})1222 append(c, "", {prefix=type .. ":", nl=o.nl .. o.nl, indent=""})
1222 append(c, t["title"], {prefix_sep="", nl="", indent=""})1223 append(c, t["title"], {prefix_sep="", nl="", indent=""})
1223 append(c, t["id"], {prefix="ID:"})1224 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