From 41a25e2afc15ca74e99d7b8bccbf7607d23e8446 Mon Sep 17 00:00:00 2001 From: Annika Backstrom Date: Sat, 8 Apr 2017 12:46:31 -0400 Subject: [PATCH] Move stop and pause ids into config --- config.json.sample | 5 ++++- player.js | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config.json.sample b/config.json.sample index d8847b6..89be3d3 100644 --- a/config.json.sample +++ b/config.json.sample @@ -1,5 +1,8 @@ { "port": "80", "tag_reader": ["./lib/bin/python", "./bin/tag-reader"], - "mpg321": ["/usr/bin/mpg321", "-R", "-"] + "mpg321": ["/usr/bin/mpg321", "-R", "-"], + + "stop_id": "abcdef1234", + "pause_id": "567890abcd" } diff --git a/player.js b/player.js index 232ef13..9eecdf9 100644 --- a/player.js +++ b/player.js @@ -57,10 +57,10 @@ var last_tag = null; var debounce_until = 0; function lookup(tag, cb) { - if (tag === 'b9506555d9') { + if (tag === config.stop_id) { return cb('STOP'); } - if (tag === 'aa89665510') { + if (tag === config.pause_id) { return cb('PAUSE', 2); }