From 5d827bdd3f3370acb5d47cb62c473d113f2d7301 Mon Sep 17 00:00:00 2001
From: undisclosed
Date: Sat, 31 Dec 2022 16:29:33 +0000
Subject: [PATCH] Kleine Umstellungen und Erlaeuterungen

---
 src/de/uhilger/calypso/App.java |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/de/uhilger/calypso/App.java b/src/de/uhilger/calypso/App.java
index 8cf84c5..00ddfd1 100644
--- a/src/de/uhilger/calypso/App.java
+++ b/src/de/uhilger/calypso/App.java
@@ -30,7 +30,7 @@
  * Hauptklasse des av-director
  * 
  * Aufruf mit
- * java -jar av-director.jar port=9000
+ * java -jar av-director.jar port=9000 ctx="/calypso"
  * java -jar av-director.jar nfs-prefix="/media/mc" port=9000
  * java -Djava.util.logging.config.file=logging.properties -jar ..
  * 
@@ -52,12 +52,13 @@
   public static final String VLC_PLAYER = "vlc";
   public static final String OMX_PLAYER = "omx";
   public static final String OMX_WD = "omx.wd";
+  public static final String CTX = "ctx";
   
+  public static final String DEFAULT_CTX = "/calypso";
   
   private static HashMap initParams;  
   private static Process playerproc;
   private static Player player;
-  
   
   /**
    * @param args the command line arguments
@@ -79,8 +80,14 @@
         break;
     }
     Server server = new Server(Integer.parseInt(getInitParameter(IP_PORT)));
+    String ctx = getInitParameter(CTX);
+    if(ctx != null && ctx.length() > 0) {
+      server.setContextName(ctx);    
+    } else {
+      server.setContextName(DEFAULT_CTX);
+    }
     try {
-      server.start();
+      server.start(playerType);
     } catch (IOException ex) {
       Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
     }

--
Gitblit v1.9.3