Changeset

9361:3620f7b3517b

mod_scansion_record: Split up construction of filename for reuse of parts later
author Kim Alvefur <zash@zash.se>
date Sat, 22 Sep 2018 14:28:39 +0200
parents 9360:0444e321b757
children 9362:31317e8edbbc
files plugins/mod_scansion_record.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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");