From b16b544a3982da609564491ac207e74c0e121c25 Mon Sep 17 00:00:00 2001
From: undisclosed
Date: Sat, 31 Dec 2022 16:09:31 +0000
Subject: [PATCH] VLC Basiskommandos play, pause, stop eingebaut

---
 src/de/uhilger/calypso/handler/SeekHandler.java |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/de/uhilger/calypso/handler/SeekHandler.java b/src/de/uhilger/calypso/handler/SeekHandler.java
index c230fce..9d3c255 100644
--- a/src/de/uhilger/calypso/handler/SeekHandler.java
+++ b/src/de/uhilger/calypso/handler/SeekHandler.java
@@ -37,8 +37,9 @@
 
   @Override
   protected String process(HttpExchange t, String params) {
-    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;
   }
@@ -55,9 +56,12 @@
           Select the hotkey to use to swap paused state.  
   */
   protected StringBuilder buildParams(HttpExchange t) {
+    Player player = App.getPlayer();
     StringBuilder params = super.buildParams(t);
-    params.append(" --pos ");
-    params.append(getParam(map, "pos"));
+    if(player instanceof OMXPlayer) {
+      params.append(" --pos ");
+      params.append(player.getParam(map, "pos"));
+    }
     return params;
   }  
   

--
Gitblit v1.9.3