stats.lua: add track_info_selected_only script option

Allow displaying info for all tracks rather than only selected tracks.
This commit is contained in:
nanahi authored and Kacper Michajłow committed 2026-02-24 19:36:33 +01:00
1 parent e6bd564723
commit ccdb098fb4
3 files changed
+9 -2

No files matched your search

+1
View File
@@ -0,0 +1 @@
add `track_info_selected_only` script option for stats
+5
View File
@@ -120,6 +120,11 @@ Configurable Options
Whether to clip lines to the terminal width.
``track_info_selected_only``
Default: yes
Show track info for selected tracks only instead of all tracks.
``plot_perfdata``
Default: no
+3 -2
View File
@@ -35,6 +35,7 @@ local o = {
file_tag_max_count = 16, -- only show the first x file tags
show_frame_info = false, -- whether to show the current frame info
term_clip = true,
track_info_selected_only = true, -- only show selected track info
debug = false,
-- Graph options and style
@@ -1328,7 +1329,7 @@ local function track_info()
table.insert(c, o.nl .. o.nl)
add_file(c, false, true)
for i, track in ipairs(mp.get_property_native("track-list")) do
if track['selected'] then
if track['selected'] or not o.track_info_selected_only then
add_track(c, track, i - 1)
end
end
@@ -1472,7 +1473,7 @@ pages = {
[o.key_page_2] = { idx = 2, f = vo_stats, desc = "Extended Frame Timings", scroll = true },
[o.key_page_3] = { idx = 3, f = cache_stats, desc = "Cache Statistics" },
[o.key_page_4] = { idx = 4, f = keybinding_info, desc = "Active Key Bindings", scroll = true },
[o.key_page_5] = { idx = 5, f = track_info, desc = "Selected Tracks Info", scroll = true },
[o.key_page_5] = { idx = 5, f = track_info, desc = "Tracks Info", scroll = true },
[o.key_page_0] = { idx = 0, f = perf_stats, desc = "Internal Performance Info", scroll = true },
}