diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2014-05-04 12:59:21 -0700 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2014-05-04 12:59:21 -0700 |
commit | 20b5fecdf14736b739db5c53c740484cedb2fbf5 (patch) | |
tree | 69b4fd0b0500a18fc66aca6bcdd0d2e7dcf7aaf0 /TOOLS/lua/autocrop.lua | |
parent | c91373a20204237110556c81507cdbbf3991c61b (diff) | |
download | mpv-20b5fecdf14736b739db5c53c740484cedb2fbf5.tar.bz2 mpv-20b5fecdf14736b739db5c53c740484cedb2fbf5.tar.xz |
TOOLS/lua: use double quotes unless there's a good reason
Diffstat (limited to 'TOOLS/lua/autocrop.lua')
-rw-r--r-- | TOOLS/lua/autocrop.lua | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/TOOLS/lua/autocrop.lua b/TOOLS/lua/autocrop.lua index 0da94796df..2523dd99de 100644 --- a/TOOLS/lua/autocrop.lua +++ b/TOOLS/lua/autocrop.lua @@ -40,11 +40,11 @@ end function del_filter_if_present(label) -- necessary because mp.command('vf del @label:filter') raises an -- error if the filter doesn't exist - local vfs = mp.get_property_native('vf') + local vfs = mp.get_property_native("vf") for i,vf in pairs(vfs) do - if vf['label'] == label then + if vf["label"] == label then table.remove(vfs, i) - mp.set_property_native('vf', vfs) + mp.set_property_native("vf", vfs) return true end end @@ -77,21 +77,21 @@ end function do_crop() -- get the metadata local cropdetect_metadata = mp.get_property_native( - string.format('vf-metadata/%s', cropdetect_label) + string.format("vf-metadata/%s", cropdetect_label) ) -- use it to crop if its valid if cropdetect_metadata then - if cropdetect_metadata['lavfi.cropdetect.w'] - and cropdetect_metadata['lavfi.cropdetect.h'] - and cropdetect_metadata['lavfi.cropdetect.x'] - and cropdetect_metadata['lavfi.cropdetect.y'] + if cropdetect_metadata["lavfi.cropdetect.w"] + and cropdetect_metadata["lavfi.cropdetect.h"] + and cropdetect_metadata["lavfi.cropdetect.x"] + and cropdetect_metadata["lavfi.cropdetect.y"] then - mp.command(string.format('vf add @%s:crop=%s:%s:%s:%s', + mp.command(string.format("vf add @%s:crop=%s:%s:%s:%s", crop_label, - cropdetect_metadata['lavfi.cropdetect.w'], - cropdetect_metadata['lavfi.cropdetect.h'], - cropdetect_metadata['lavfi.cropdetect.x'], - cropdetect_metadata['lavfi.cropdetect.y'])) + cropdetect_metadata["lavfi.cropdetect.w"], + cropdetect_metadata["lavfi.cropdetect.h"], + cropdetect_metadata["lavfi.cropdetect.x"], + cropdetect_metadata["lavfi.cropdetect.y"])) else mp.msg.error( "Got empty crop data. You might need to increase detect_seconds." |