summaryrefslogtreecommitdiffstats
path: root/vlc-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'vlc-model.lua')
-rw-r--r--vlc-model.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/vlc-model.lua b/vlc-model.lua
index 5a8da68..abad8a9 100644
--- a/vlc-model.lua
+++ b/vlc-model.lua
@@ -41,16 +41,17 @@ function mymodule.getconfigfile()
return modelfunctions.getfiledetails(configfile)
end
-function mymodule.getlogfile ()
- local path=logfile
- local path2
+function mymodule.get_logfile(self, clientdata)
+ local retval = cfe({ type="group", value={}, label="Log File Configuration" })
+ retval.value.filename = cfe({value=logfile, label="File name"})
+ local path
if fs.is_file(configfile) then
for line in string.gmatch(fs.read_file(configfile) or "", "(.-)\n") do
- path2=string.match(line,"^VLC_OPTS.*--logfile%s+(%S+)") or path2
+ path=string.match(line,"^VLC_OPTS.*--logfile%s+(%S+)") or path
end
end
- if path2 then path=path2 end
- return cfe({ value=path, label="VLC logfile" })
+ if path then retval.value.filename.value = path end
+ return retval
end
function mymodule.setconfigfile(self, filedetails)