From 599fadb06a87dc3a322219dc37c109dc6924044b Mon Sep 17 00:00:00 2001
From: undisclosed
Date: Tue, 03 Jan 2023 12:10:54 +0000
Subject: [PATCH] Baustelle: Versuche mit unterschiedlichen Playern

---
 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