From 2f2aa7d344d41c6d4083149b1ea6b41e7fb1f683 Mon Sep 17 00:00:00 2001
From: undisclosed
Date: Sat, 07 Jan 2023 15:24:26 +0000
Subject: [PATCH] Baustelle: Calypso 'ins Reine' bauen

---
 src/de/uhilger/calypso/App.java |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/de/uhilger/calypso/App.java b/src/de/uhilger/calypso/App.java
index 92111cb..3b17088 100644
--- a/src/de/uhilger/calypso/App.java
+++ b/src/de/uhilger/calypso/App.java
@@ -18,9 +18,12 @@
 
 package de.uhilger.calypso;
 
+import de.uhilger.calypso.handler.MPVPlayer;
+import de.uhilger.calypso.handler.MPlayer;
 import de.uhilger.calypso.handler.OMXPlayer;
 import de.uhilger.calypso.handler.Player;
 import de.uhilger.calypso.handler.VLCPlayer;
+import java.io.File;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.logging.Level;
@@ -57,8 +60,11 @@
   public static final String IP_PLAYER = "player";
   public static final String VLC_PLAYER = "vlc";
   public static final String OMX_PLAYER = "omx";
+  public static final String M_PLAYER = "mpl";
+  public static final String MPV_PLAYER = "mpv";
   public static final String OMX_WD = "omx.wd";
   public static final String CTX = "ctx";
+  public static final String CONF_PATH = "conf";
   
   public static final String DEFAULT_CTX = "/calypso";
   
@@ -70,6 +76,7 @@
    * @param args the command line arguments
    */
   public static void main(String[] args) {
+    Logger.getLogger(App.class.getName()).log(Level.INFO, new File(".").getAbsolutePath());
     initParams = new HashMap();
     for(String arg: args) {
       String[] argParts = arg.split("=");
@@ -78,6 +85,12 @@
         
     String playerType = getInitParameter(IP_PLAYER);
     switch(playerType) {
+      case MPV_PLAYER:
+        player = new MPVPlayer();
+        break;
+      case M_PLAYER:
+        player = new MPlayer();
+        break;
       case VLC_PLAYER:
         player = new VLCPlayer();
         break;
@@ -86,6 +99,7 @@
         break;
     }
     Server server = new Server(Integer.parseInt(getInitParameter(IP_PORT)));
+    server.setPath(getInitParameter(CONF_PATH));
     String ctx = getInitParameter(CTX);
     if(ctx != null && ctx.length() > 0) {
       server.setContextName(ctx);    

--
Gitblit v1.9.3