From 0c8d27c8a1708d1c315aca89db47d48488fd44ca Mon Sep 17 00:00:00 2001 From: ulrich Date: Mon, 22 Mar 2021 07:53:34 +0000 Subject: [PATCH] Play/Stop in Arbeit --- src/de/uhilger/avdirektor/handler/PlayHandler.java | 20 +++++--------------- 1 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/de/uhilger/avdirektor/handler/PlayHandler.java b/src/de/uhilger/avdirektor/handler/PlayHandler.java index 80b5214..304d867 100644 --- a/src/de/uhilger/avdirektor/handler/PlayHandler.java +++ b/src/de/uhilger/avdirektor/handler/PlayHandler.java @@ -54,23 +54,13 @@ @Override public void handle(HttpExchange t) throws IOException { - logger.log(Level.FINE, "RequestURI.getPath: {0}", t.getRequestURI().getPath()); + logger.log(Level.FINE, "RequestURI: {0}", t.getRequestURI().toString()); Map map = getQueryMap(t); - Set keys = map.keySet(); - StringBuffer buf = new StringBuffer(); - buf.append("play"); - buf.append(System.lineSeparator()); - keys.forEach((Object key) -> { - buf.append("key: "); - buf.append(key); - buf.append(System.lineSeparator()); - buf.append("value: "); - buf.append(map.get(key)); - buf.append(System.lineSeparator()); - logger.log(Level.FINE, "key {0} value {1}", new Object[]{key, map.get(key)}); - }); - String response = buf.toString(); + String antwort = abspielenMitParameternUndRueckmeldung(t, + getParam(map, "t"), getParam(map, "p"), getParam(map, "r"), "1"); + + String response = getResponseString(map, "play", antwort); t.sendResponseHeaders(200, response.length()); OutputStream os = t.getResponseBody(); os.write(response.getBytes()); -- Gitblit v1.9.3