# HG changeset patch # User Kim Alvefur # Date 1537619319 -7200 # Node ID 3620f7b3517be4e1d192cc624db20fe88f3ac797 # Parent 0444e321b7575cbd1f337b46875a0ee28b6e091f mod_scansion_record: Split up construction of filename for reuse of parts later diff -r 0444e321b757 -r 3620f7b3517b plugins/mod_scansion_record.lua --- a/plugins/mod_scansion_record.lua Sat Sep 22 14:27:24 2018 +0200 +++ b/plugins/mod_scansion_record.lua Sat Sep 22 14:28:39 2018 +0200 @@ -6,8 +6,11 @@ local filters = require "util.filters"; local id = require "util.id"; +local dm = require "util.datamanager"; -local record_file = require "util.datamanager".getpath(id.medium():lower(), "scansion", os.date("%Y%b%d"):lower(), "scs", true); +local record_id = id.medium():lower(); +local record_date = os.date("%Y%b%d"):lower(); +local record_file = dm.getpath(record_id, "scansion", record_date, "scs", true); local scan = io.open(record_file, "w");