Bladeren bron

bugfixxes & RadioManager copymode working

LH 10 jaren geleden
bovenliggende
commit
1c19bb7cf0

+ 1 - 1
iZpl/build.gradle

@@ -4,7 +4,7 @@ apply plugin: 'java'
 apply plugin: 'application'
 apply from: "$rootDir/utils/IO.gradle"
 
-version = 'SNAPSHOT'
+version = '0.4.1.1-SNAPSHOT'
 mainClassName = 'de.nplusc.izc.iZpl.Main'
 //'de.nplusc.izc.iZpl.Main'
 

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

@@ -395,14 +395,23 @@ public class Main extends javax.swing.JFrame
         
         if(cl.hasOption("e"))
         {
-            if(filemode||statefile)
+            boolean listmode=true;
+            
+            if(cl.getOptionValue("e")!=null)
+            {
+                listmode=false;
+                featurePluginID=cl.getOptionValue("e");
+                System.out.println("Listmode disabled due to e param=\""+featurePluginID+"\"");
+            }
+                                        //handling für den ListPluginMode
+            if((filemode||statefile||listmode))
             {
                 pluginParameter="";
                 featurePluginMode=true;
-                featurePluginID="";
-                if(cl.getOptionValue("e")!=null)
+                if(listmode)
                 {
-                    featurePluginID=cl.getOptionValue("e");
+                    featurePluginID="";
+                    System.out.println("\"\"");
                 }
             }
             else
@@ -410,6 +419,7 @@ public class Main extends javax.swing.JFrame
                 System.out.println("Error: FeaturePlugins need either a file or a statefile to resume");
                 System.exit(9263);
             }
+            System.out.println("Parameter of e is now:\""+pluginParameter+"\"");
         }
         
         if(cl.hasOption("x"))
@@ -468,13 +478,13 @@ public class Main extends javax.swing.JFrame
                 selectedSkinPath = "default";
             }
         }
-        if (!(burnDisc || filemode || statefile || firstrunmode||loadConfigMode||updateInit)&&uimodestate==UIMODE_NONE)
+        if (!(burnDisc || filemode || statefile || firstrunmode||loadConfigMode||updateInit||featurePluginMode)&&uimodestate==UIMODE_NONE)
         {
             HelpFormatter formatter = new HelpFormatter();
             formatter.printHelp("izpl", options);
             System.exit(0);
         }
-        if(burnDisc||filemode||statefile||firstrunmode||loadConfigMode||updateInit)
+        if(burnDisc||filemode||statefile||firstrunmode||loadConfigMode||updateInit||featurePluginMode)
         {
             allowPluginLoad=true;
         }
@@ -690,7 +700,7 @@ public class Main extends javax.swing.JFrame
         }
         
         //pluginhandling interception: abort load if only enumerating of Features is wanted
-        if(featurePluginID.equals(""))
+        if(featurePluginMode && featurePluginID.equals(""))
         {
             System.out.println("Features available:");
             for (FeaturePlugin featurePlugin : registeredFeatures) 
@@ -856,7 +866,7 @@ public class Main extends javax.swing.JFrame
 
             if (!isWMShit && !isOtherShit)
             {
-                if (useGUI)
+                if (useGUI&&!featurePluginMode)
                 {
                     EventQueue.invokeLater(() ->
                     {
@@ -1117,6 +1127,9 @@ public class Main extends javax.swing.JFrame
      * V0.3.0.0 UI ready; added some debugUtils
      * NOTE: converted to GIT & gradle 
      * V0.4.0.0 added the missing UI parts & a standalone mode. Made the software more modular
+     * V0.4.0.1 cleanup & bugfixxes
+     * V0.4.1.0 work on adding FeaturePlugins
+     * V0.4.1.1 Bugfixes
      */
     // Variables declaration - do not modify//GEN-BEGIN:variables
     private static javax.swing.JProgressBar pload;

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

@@ -519,7 +519,9 @@ public class VlcInterface implements PlaybackPlugin , MediaPlayerEventListener
         try
         {
             //killen der alten vlc-natives
-            new TFile(IZPLApi.APPDIR+File.separator+"lib"+File.separator+"vlcbinaries").rm_r();
+            TFile f =  new TFile(IZPLApi.APPDIR+File.separator+"lib"+File.separator+"vlcbinaries");
+            if(f.exists())
+                f.rm_r();
         }
         catch (IOException ex)
         {

+ 4 - 2
iZplPlugins/GameRadio/src/main/java/de/nplusc/izc/izpl/plugins/gameradio/RadioManager.java

@@ -33,7 +33,7 @@ public class RadioManager implements FeaturePlugin
     @Override
     public void parseParameter(String param)
     {
-        if(!(param.equals(""))&&param.startsWith("radio:"))
+        if(param!=null&&!(param.equals(""))&&param.startsWith("radio:"))
         {
             String[] cstring = param.split(":");
             if(cstring.length<10)//patsh can cause that more than 10 :s appear, that error is handled later
@@ -137,7 +137,9 @@ public class RadioManager implements FeaturePlugin
                         for(int j=0;j<tracks;j++)
                         {
                             String pli = getPlayListItemPath();
-                            FileTK.kopierpaste(new File(pli), new File(baseDir+File.separator+stationBase+"_"+i+File.separator+FileTK.getFileName(pli)));
+                            File d = new File(baseDir+File.separator+stationBase+"_"+i+File.separator+FileTK.getFileName(pli));
+                            d.getParentFile().mkdirs();
+                            FileTK.kopierpaste(new File(pli), d);
                         }
                     }
                 }

+ 1 - 1
iZplPlugins/GameRadio/src/main/resources/plugin.yml

@@ -1,4 +1,4 @@
-pluginbaseclass: de.nplusc.izc.izpl.pluginsgameradio.radioManager
+pluginbaseclass: de.nplusc.izc.izpl.plugins.gameradio.RadioManager
 supportedoses:
   - 'windows'
 # can be windows, mac or linux