Skip to content

Commit

Permalink
update track title format
Browse files Browse the repository at this point in the history
  • Loading branch information
dyphire authored and tsl0922 committed Jan 7, 2024
1 parent 36aa50c commit 9c3ff72
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lua/dyn_menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ function build_track_title(track, prefix, filename)
if track['demux-h'] then
h(track['demux-w'] and (track['demux-w'] .. 'x' .. track['demux-h'] or track['demux-h'] .. 'p'))
end
if track['demux-fps'] then h(string.format('%.5g fps', track['demux-fps'])) end
if track['demux-fps'] then h(string.format('%.3g fps', track['demux-fps'])) end
if track['audio-channels'] then h(track['audio-channels'] .. ' ch') end
if track['demux-samplerate'] then h(string.format('%.3g kHz', track['demux-samplerate'] / 1000)) end
if track['demux-bitrate'] then h(string.format('%.3g kpbs', track['demux-bitrate'] / 1000)) end
if track.forced then h('forced') end
if track.external then h('external') end
if track['demux-bitrate'] then h(string.format('%.3g kbps', track['demux-bitrate'] / 1000)) end
if #hints > 0 then title = string.format('%s [%s]', title, table.concat(hints, ', ')) end

if track.forced then title = title .. ' (forced)' end
if track.external then title = title .. ' (external)' end
if track.default then title = title .. ' (*)' end

if track.lang then title = string.format('%s\t%s', title, track.lang:upper()) end
Expand Down

0 comments on commit 9c3ff72

Please sign in to comment.