Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split behaviour of the "showtitle" option into two separate options #1

Merged
merged 1 commit into from
Oct 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions mordenx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ local user_opts = {
seekbarkeyframes = true, -- use keyframes when dragging the seekbar
title = '${media-title}', -- string compatible with property-expansion
-- to be shown as OSC title
showtitle = true, -- show title and no hide timeout on pause
showtitle = true, -- show title in OSC
showonpause = true, -- whether to disable the hide timeout on pause
timetotal = true, -- display total time instead of remaining time?
timems = false, -- Display time down to millliseconds by default
visibility = 'auto', -- only used at init to set visibility_mode(...)
Expand Down Expand Up @@ -135,7 +136,7 @@ local state = {
border = true,
maximized = false,
osd = mp.create_osd_overlay('ass-events'),
lastvisibility = user_opts.visibility, -- save last visibility on pause if showtitle
lastvisibility = user_opts.visibility, -- save last visibility on pause if showonpause
fulltime = user_opts.timems,
}

Expand Down Expand Up @@ -1529,7 +1530,7 @@ end

function pause_state(name, enabled)
state.paused = enabled
if user_opts.showtitle then
if user_opts.showonpause then
if enabled then
state.lastvisibility = user_opts.visibility
visibility_mode("always", true)
Expand Down