summaryrefslogtreecommitdiffstats
path: root/player/lua/stats.lua
diff options
context:
space:
mode:
Diffstat (limited to 'player/lua/stats.lua')
-rw-r--r--player/lua/stats.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index c10fb53249..b3e2320ac2 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -475,9 +475,21 @@ local function add_file(s)
local fs = append_property(s, "file-size", {prefix="Size:"})
append_property(s, "file-format", {prefix="Format/Protocol:", nl=fs and "" or o.nl})
+ local editions = mp.get_property_number("editions")
+ local edition = mp.get_property_number("current-edition")
+ local ed_cond = (edition and editions > 1)
+ if ed_cond then
+ append_property(s, "edition-list/" .. tostring(edition) .. "/title",
+ {prefix="Edition:"})
+ append_property(s, "edition-list/count",
+ {prefix="(" .. tostring(edition + 1) .. "/", suffix=")", nl="",
+ indent=" ", prefix_sep=" ", no_prefix_markup=true})
+ end
+
local ch_index = mp.get_property_number("chapter")
if ch_index and ch_index >= 0 then
- append_property(s, "chapter-list/" .. tostring(ch_index) .. "/title", {prefix="Chapter:"})
+ append_property(s, "chapter-list/" .. tostring(ch_index) .. "/title", {prefix="Chapter:",
+ nl=ed_cond and "" or o.nl})
append_property(s, "chapter-list/count",
{prefix="(" .. tostring(ch_index + 1) .. "/", suffix=")", nl="",
indent=" ", prefix_sep=" ", no_prefix_markup=true})