diff --git a/DOCS/interface-changes/stats-page-5.txt b/DOCS/interface-changes/stats-page-5.txt new file mode 100644 index 0000000000..0f2d6dc790 --- /dev/null +++ b/DOCS/interface-changes/stats-page-5.txt @@ -0,0 +1 @@ +add `track_info_selected_only` script option for stats diff --git a/DOCS/man/stats.rst b/DOCS/man/stats.rst index b66861b2a6..3d057a453c 100644 --- a/DOCS/man/stats.rst +++ b/DOCS/man/stats.rst @@ -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 diff --git a/player/lua/stats.lua b/player/lua/stats.lua index bc1edcd58b..b5ef60862a 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -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 }, }