Browse Source

playlist option logic for clamping playcount added, Squished VLCJ breaking change on loading

LH 6 years ago
parent
commit
cfb9af4350

+ 2 - 2
iZpl/src/main/java/de/nplusc/izc/iZpl/Main.java

@@ -490,7 +490,7 @@ public class Main extends javax.swing.JFrame
         try
         {
             l.trace("fpl|" + stts.forcePregen + "|shitmp|" + isShittyPlayer + "|a1|" + stts.file_path + "|vp|" + vlcpath +"|optionspath|"+stts.optionpath);
-            HashMap<String,String> options = new HashMap<>();
+            HashMap<String,Object> options = new HashMap<>();
             if(stts.optionpath!=null)
             {
                 File f = new File(stts.optionpath);
@@ -499,7 +499,7 @@ public class Main extends javax.swing.JFrame
                     try
                     {
                         FileReader r = new FileReader(f);
-                        options = (HashMap<String, String>) new Yaml().load(r);
+                        options = (HashMap<String, Object>) new Yaml().load(r);
                     }
                     catch(IOException e)
                     {

+ 2 - 2
iZpl/src/main/java/de/nplusc/izc/iZpl/PLServer.java

@@ -42,10 +42,10 @@ public class PLServer
     
     public PLServer(String plPath)
     {
-        this(plPath, true, new HashMap<String,String>());
+        this(plPath, true, new HashMap<String,Object>());
     }
     
-    public PLServer(String plPath,boolean serverOn,HashMap<String,String> options)
+    public PLServer(String plPath,boolean serverOn,HashMap<String,Object> options)
     {
         try
         {

+ 4 - 4
iZpl/src/main/java/de/nplusc/izc/iZpl/PlProcessorV2.java

@@ -55,7 +55,7 @@ public class PlProcessorV2 implements HttpHandler
     private List<PlayListItem> forceList;
     private List<PlayListItem> history; 
     private final HashMap<String,WatchKey> registeredFolders;
-    private HashMap<String,String> options;
+    private HashMap<String,Object> options;
     private WatchService observer;
     private final Object lock;
     
@@ -188,7 +188,7 @@ public class PlProcessorV2 implements HttpHandler
             {
                 try
                 {
-                    clampPlayCount = Integer.valueOf(options.get("PLAYCOUNTLIMIT"));
+                    clampPlayCount = Integer.valueOf(options.get("PLAYCOUNTLIMIT")+"");
                 }
                 catch(NumberFormatException lickme)
                 {
@@ -394,12 +394,12 @@ public class PlProcessorV2 implements HttpHandler
         this.history = history;
     }
        
-    public HashMap<String, String> getOptions()
+    public HashMap<String, Object> getOptions()
     {
         return options;
     }
 
-    public void setOptions(HashMap<String, String> options)
+    public void setOptions(HashMap<String, Object> options)
     {
         this.options = options;
     }

+ 1 - 1
iZpl/src/main/java/de/nplusc/izc/iZpl/Utils/VlcInterface.java

@@ -150,7 +150,7 @@ public class VlcInterface implements PlaybackPlugin , MediaPlayerEventListener
                 throw new UnsupportedOperationException("ERROR! invalid OSType detected, embedded VLC doesnt work here");
             }
         }
-        Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
+        //Native.load(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
         
     }