diff --git a/Covercache/CovercachePrepopulate.lua b/Covercache/CovercachePrepopulate.lua index 26d49f0..9e250a2 100644 --- a/Covercache/CovercachePrepopulate.lua +++ b/Covercache/CovercachePrepopulate.lua @@ -1,4 +1,4 @@ --- {"name": "CovercachePrepopulate", "file": "Covercache/CovercachePrepopulate.lua", "version": 4, "desc": "Prepopulates the myMPD covercache.", "order":1,"arguments":[]} +-- {"name": "CovercachePrepopulate", "file": "Covercache/CovercachePrepopulate.lua", "version": 5, "desc": "Prepopulates the myMPD covercache.", "order":1,"arguments":[]} mympd.init() @@ -12,9 +12,9 @@ local extensions = { } local function file_exists(name) - local f = io.open(name,"r") - if f ~= nil then - io.close(f) + local file = io.open(name,"r") + if file ~= nil then + io.close(file) return true end return false @@ -31,12 +31,12 @@ local function check_image(base) end local function create_placeholder(filename) - local f = io.open(filename, "w") - if f == nil then + local file = io.open(filename, "w") + if file == nil then return false end - io.write(f, '') - io.close(f) + file:write('') + file:close() return true end