From e448afbfb51d405f9eb1d1140405c9619ca79153 Mon Sep 17 00:00:00 2001 From: ulrich Date: Sun, 21 Mar 2021 17:33:57 +0000 Subject: [PATCH] Logging, Query Map --- src/de/uhilger/avdirektor/handler/OMXPlayer.java | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/de/uhilger/avdirektor/handler/OMXPlayer.java b/src/de/uhilger/avdirektor/handler/OMXPlayer.java index d8f1f00..82acdde 100644 --- a/src/de/uhilger/avdirektor/handler/OMXPlayer.java +++ b/src/de/uhilger/avdirektor/handler/OMXPlayer.java @@ -16,6 +16,8 @@ import java.io.Writer; import java.net.HttpURLConnection; import java.net.URL; +import java.util.HashMap; +import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; @@ -27,6 +29,19 @@ private static final Logger logger = Logger.getLogger(OMXPlayer.class.getName()); + protected Map getQueryMap(HttpExchange t) { + HashMap map = new HashMap(); + String query = t.getRequestURI().getQuery(); + if(query != null && query.length() > 0) { + String qParts[] = query.split("&"); + for(String qPart : qParts) { + //logger.info("qPart: " + qPart); + String pParts[] = qPart.split("="); + map.put(pParts[0], pParts[1]); + } + } + return map; + } /** * Einen Prozess zum Abspielen mit dem omxplayer starten -- Gitblit v1.9.3