summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/defaults.lua9
-rw-r--r--player/lua/stats.lua8
2 files changed, 7 insertions, 10 deletions
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua
index 1da6420182..523b649b8c 100644
--- a/player/lua/defaults.lua
+++ b/player/lua/defaults.lua
@@ -476,12 +476,9 @@ function mp.dispatch_events(allow_wait)
while mp.keep_running do
local wait = 0
if not more_events then
- wait = process_timers()
- if wait == nil then
- for _, handler in ipairs(idle_handlers) do
- handler()
- end
- wait = 1e20 -- infinity for all practical purposes
+ wait = process_timers() or 1e20 -- infinity for all practical purposes
+ for _, handler in ipairs(idle_handlers) do
+ handler()
end
-- Resume playloop - important especially if an error happened while
-- suspended, and the error was handled, but no resume was done.
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index 6272aab9c2..db3df01c6d 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -430,7 +430,8 @@ local function add_file(s)
append_property(s, "media-title", {prefix="Title:"})
end
- append_property(s, "file-format", {prefix="Format/Protocol:"})
+ local fs = append_property(s, "file-size", {prefix="Size:"})
+ append_property(s, "file-format", {prefix="Format/Protocol:", nl=fs and "" or o.nl})
local ch_index = mp.get_property_number("chapter")
if ch_index and ch_index >= 0 then
@@ -457,7 +458,6 @@ local function add_file(s)
indent=o.prefix_sep, no_prefix_markup=true})
end
end
- append_property(s, "file-size", {prefix="Size:"})
end
@@ -536,9 +536,9 @@ local function add_audio(s)
append(s, "", {prefix=o.nl .. o.nl .. "Audio:", nl="", indent=""})
append_property(s, "audio-codec", {prefix_sep="", nl="", indent=""})
- append(s, r["format"], {prefix="Format:"})
+ local cc = append(s, r["channel-count"], {prefix="Channels:"})
+ append(s, r["format"], {prefix="Format:", nl=cc and "" or o.nl})
append(s, r["samplerate"], {prefix="Sample Rate:", suffix=" Hz"})
- append(s, r["channel-count"], {prefix="Channels:"})
append_property(s, "packet-audio-bitrate", {prefix="Bitrate:", suffix=" kbps"})
append_filters(s, "af", "Filters:")
end