From aaed2d146028ba1488a7ba7c7e924192b9df8394 Mon Sep 17 00:00:00 2001
From: undisclosed
Date: Mon, 02 Jan 2023 08:58:15 +0000
Subject: [PATCH] Kommentare ergaenzt

---
 src/de/uhilger/calypso/handler/PlayHandler.java |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/de/uhilger/calypso/handler/PlayHandler.java b/src/de/uhilger/calypso/handler/PlayHandler.java
index f11a935..86b99b4 100644
--- a/src/de/uhilger/calypso/handler/PlayHandler.java
+++ b/src/de/uhilger/calypso/handler/PlayHandler.java
@@ -55,6 +55,16 @@
     super(cmd);
   }
 
+  
+  @Override
+  protected StringBuilder buildParams(HttpExchange t) {
+    StringBuilder params = super.buildParams(t);
+    params.append(App.getPlayer().buildParams(t, map));
+    return params;
+  }
+  
+  
+  /*
   protected StringBuilder buildParams(HttpExchange t) {
     StringBuilder params = super.buildParams(t);
     params.append("-o ");
@@ -69,7 +79,8 @@
     }
     return params;
   }
-
+  */
+  
   @Override
   protected String process(HttpExchange t, String params) {
     if (cmd.equalsIgnoreCase(OMXPlayer.F_PLAY)) {
@@ -77,14 +88,17 @@
         //FileUtils.deleteDirectory(new File(System.getProperty("omx.wd"), "omx-logs"));
         FileSystem fs = FileSystems.getDefault();
         Path path = fs.getPath(System.getProperty("omx.wd"), "omx-logs");
-        deleteDirectory(path);
+        if(path.toFile().exists()) {
+          deleteDirectory(path);
+        }
         //Files.delete(path);
       } catch (IOException ex) {
         logger.log(Level.SEVERE, null, ex);
       }
     }
-    String antwort = App.getPlayer().abspielen(
-            getParam(map, "titel"), params, getParam(map, "r"), "1");
+    Player player = App.getPlayer();
+    String antwort = player.abspielen(
+            player.getParam(map, "titel"), params, player.getParam(map, "r"), "1");
     logger.log(Level.FINE, antwort);
     return antwort;
   }

--
Gitblit v1.9.3