Skip to content

Commit bc330f4

Browse files
Add options.enabled
close #22
1 parent cef15af commit bc330f4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ KEY script-binding recentmenu/last
4747
## Options
4848

4949
```ini
50+
enabled = yes # whether to record current playing file, can be used with auto-profile
5051
path = "~~/recent.json" # where the history is stored
5152
length = 10 # number of items
5253
width = 88 # number of characters for the item

recentmenu.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ local utils = require("mp.utils")
22
local options = require("mp.options")
33

44
local o = {
5+
enabled = true,
56
path = "~~/recent.json",
67
length = 10,
78
width = 88,
89
ignore_same_series = true,
910
}
10-
options.read_options(o)
11+
options.read_options(o, _, function() end)
1112

1213
local path = mp.command_native({ "expand-path", o.path })
1314

@@ -324,6 +325,7 @@ end
324325

325326
function on_load()
326327
current_item = { nil, nil, nil }
328+
if not o.enabled then return end
327329
local path = mp.get_property("path")
328330
if not path then return end
329331
local filename = mp.get_property("filename")

0 commit comments

Comments
 (0)