diff options
author | Ted Trask <ttrask01@yahoo.com> | 2015-08-03 15:54:48 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2015-08-03 15:54:48 +0000 |
commit | f9a09e6fe4d8bd7743a7530d9ef3e848f5a373fe (patch) | |
tree | af08b1200b9068f12bd4a93b757b7dfd167a4e5a /vlc-model.lua | |
parent | c2053788e17c731603b5c50547d4396f29e83721 (diff) | |
download | acf-vlc-daemon-f9a09e6fe4d8bd7743a7530d9ef3e848f5a373fe.tar.bz2 acf-vlc-daemon-f9a09e6fe4d8bd7743a7530d9ef3e848f5a373fe.tar.xz |
Modify logfile to use common view
Diffstat (limited to 'vlc-model.lua')
-rw-r--r-- | vlc-model.lua | 13 |
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) |