diff --git a/.classpath b/.classpath
index 0499fc0..36c3e99 100644
--- a/.classpath
+++ b/.classpath
@@ -5,5 +5,6 @@
+
diff --git a/.gitignore b/.gitignore
index 2891925..70e9dff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,3 +50,4 @@ minimal-json-0.9.4.jar
config.xml
config.xml
+commons-lang3-3.4.jar
diff --git a/bin/application/MainWindowController$1.class b/bin/application/MainWindowController$1.class
index 56bcab9..eaf7445 100644
Binary files a/bin/application/MainWindowController$1.class and b/bin/application/MainWindowController$1.class differ
diff --git a/bin/application/MainWindowController$2$1.class b/bin/application/MainWindowController$2$1.class
index 0446fd1..7c0de3f 100644
Binary files a/bin/application/MainWindowController$2$1.class and b/bin/application/MainWindowController$2$1.class differ
diff --git a/bin/application/MainWindowController$2$2.class b/bin/application/MainWindowController$2$2.class
index 72ebfcf..7e5d3de 100644
Binary files a/bin/application/MainWindowController$2$2.class and b/bin/application/MainWindowController$2$2.class differ
diff --git a/bin/application/MainWindowController$2$3.class b/bin/application/MainWindowController$2$3.class
index c5035cf..d6a63e4 100644
Binary files a/bin/application/MainWindowController$2$3.class and b/bin/application/MainWindowController$2$3.class differ
diff --git a/bin/application/MainWindowController$2$4.class b/bin/application/MainWindowController$2$4.class
index 8ddb7a5..bbd9c30 100644
Binary files a/bin/application/MainWindowController$2$4.class and b/bin/application/MainWindowController$2$4.class differ
diff --git a/bin/application/MainWindowController$2$5.class b/bin/application/MainWindowController$2$5.class
index 58c4944..0ea76c1 100644
Binary files a/bin/application/MainWindowController$2$5.class and b/bin/application/MainWindowController$2$5.class differ
diff --git a/bin/application/MainWindowController$2$6.class b/bin/application/MainWindowController$2$6.class
index 5c31ace..ef115da 100644
Binary files a/bin/application/MainWindowController$2$6.class and b/bin/application/MainWindowController$2$6.class differ
diff --git a/bin/application/MainWindowController$2.class b/bin/application/MainWindowController$2.class
index b4cbb9e..b81e147 100644
Binary files a/bin/application/MainWindowController$2.class and b/bin/application/MainWindowController$2.class differ
diff --git a/bin/application/MainWindowController$3.class b/bin/application/MainWindowController$3.class
index 31aa30d..0a4ba50 100644
Binary files a/bin/application/MainWindowController$3.class and b/bin/application/MainWindowController$3.class differ
diff --git a/bin/application/MainWindowController$4.class b/bin/application/MainWindowController$4.class
index 2866a08..7482610 100644
Binary files a/bin/application/MainWindowController$4.class and b/bin/application/MainWindowController$4.class differ
diff --git a/bin/application/MainWindowController$5.class b/bin/application/MainWindowController$5.class
index 1b07de0..bda9136 100644
Binary files a/bin/application/MainWindowController$5.class and b/bin/application/MainWindowController$5.class differ
diff --git a/bin/application/MainWindowController$6.class b/bin/application/MainWindowController$6.class
index 67e61fa..14f2d9e 100644
Binary files a/bin/application/MainWindowController$6.class and b/bin/application/MainWindowController$6.class differ
diff --git a/bin/application/MainWindowController.class b/bin/application/MainWindowController.class
index bbf7c09..651c214 100644
Binary files a/bin/application/MainWindowController.class and b/bin/application/MainWindowController.class differ
diff --git a/bin/recources/HomeFlix-Local_de_DE.properties b/bin/recources/HomeFlix-Local_de_DE.properties
index b45c53e..6458573 100644
--- a/bin/recources/HomeFlix-Local_de_DE.properties
+++ b/bin/recources/HomeFlix-Local_de_DE.properties
@@ -13,4 +13,7 @@ columnRating = Bewertung
columnDatName = Datei Name
errorUpdateV = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not check update version (nvc)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
errorUpdateD = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not download update files (ndf)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
-infoText = \nMaintainer: seilo@kellerkinder.xyz und \nhendrik.schutter@coptersicht.de \n(c) 2016 Kellerkinder www.kellerkinder.xyz
\ No newline at end of file
+errorPlay = Beim \u00F6ffnen der Datei ist ein Fehler aufgetreten! \nError: could not open file (nof) \nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
+linuxBug = Zurzeit werden unter Linux leider keine Dateien mit Leerzeichen unterst\u00FCtzt!
+vlcNotInstalled = Um einen Film abspielen wird der VLC Media Player ben\u00F6tigt!
+infoText = \nMaintainer: seilo@kellerkinder.xyz und \nhendrik.schutter@coptersicht.de \n(c) 2016 Kellerkinder www.kellerkinder.xyz
diff --git a/bin/recources/HomeFlix-Local_en_US.properties b/bin/recources/HomeFlix-Local_en_US.properties
index c6eb5ca..857b80b 100644
--- a/bin/recources/HomeFlix-Local_en_US.properties
+++ b/bin/recources/HomeFlix-Local_en_US.properties
@@ -13,4 +13,7 @@ columnRating = Rating
columnDatName = File Name
errorUpdateV = An error has occurred during update! \nError: could not check update version (nvc) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
errorUpdateD = An error has occurred during update! \nError: could not download update files (ndf) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
-infoText = \nMaintainer: seilo@kellerkinder.xyz and \nhendrik.schutter@coptersicht.de \n(c) 2016 Kellerkinder www.kellerkinder.xyz
\ No newline at end of file
+errorPlay = An error has occurred during opening the file! \nError: could not open file (nof) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
+linuxBug = Currently no files are supported with additional space under Linux unfortunately!
+vlcNotInstalled = VLC Media Player is required to play a movie!
+infoText = \nMaintainer: seilo@kellerkinder.xyz and \nhendrik.schutter@coptersicht.de \n(c) 2016 Kellerkinder www.kellerkinder.xyz
diff --git a/src/application/MainWindowController.java b/src/application/MainWindowController.java
index 79ad5de..2596fd6 100644
--- a/src/application/MainWindowController.java
+++ b/src/application/MainWindowController.java
@@ -40,6 +40,8 @@ import java.util.Properties;
import java.util.ResourceBundle;
import java.util.Scanner;
+import org.apache.commons.lang3.SystemUtils;
+
import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonObject;
import com.jfoenix.controls.JFXButton;
@@ -109,9 +111,9 @@ public class MainWindowController {
@FXML
private JFXButton settingsBtn = new JFXButton("Settings");
@FXML
- private JFXButton updateBtn = new JFXButton("Auf Update prüfen");
+ private JFXButton updateBtn = new JFXButton("Auf Update pr�fen");
@FXML
- private JFXButton directoryBtn = new JFXButton("Ordner auswählen");
+ private JFXButton directoryBtn = new JFXButton("Ordner ausw�hlen");
@FXML
private JFXToggleButton autoupdateBtn = new JFXToggleButton();
@FXML
@@ -129,7 +131,7 @@ public class MainWindowController {
@FXML
private Label versionlbl = new Label();
@FXML
- private Label sizelbl = new Label("Schriftgröße:");
+ private Label sizelbl = new Label("Schriftgr��e:");
@FXML
private Label aulbl = new Label("beim starten nach Updates suchen:");
@FXML
@@ -144,16 +146,19 @@ public class MainWindowController {
@FXML
TreeTableColumn columnDatName = new TreeTableColumn<>("Datei Name");
- private boolean menutrue = false; //merker für menubtn (öffnen oder schließen)
+ private boolean menutrue = false; //merker f�r menubtn (�ffnen oder schlie�en)
private boolean settingstrue = false;
- private String version = "0.3.5";
+ private String version = "0.3.6";
private String versionURL = "https://raw.githubusercontent.com/Seil0/Project-HomeFlix/master/updates/version.txt";
private String downloadLink = "https://raw.githubusercontent.com/Seil0/Project-HomeFlix/master/updates/downloadLink.txt";
private String updateDataURL;
private String errorUpdateD;
private String errorUpdateV;
+ private String errorPlay;
private String infoText;
+ private String linuxBugText;
+ private String vlcNotInstalled;
private String aktVersion;
private String path;
private String color;
@@ -280,7 +285,7 @@ public class MainWindowController {
}
});
- //demoBtn clicked
+ //demoBtn clicked debbuging
demoBtn.setOnAction(new EventHandler(){
@Override
public void handle(ActionEvent event) {
@@ -306,18 +311,66 @@ public class MainWindowController {
@FXML
private void playbtnclicked(){
- try {
- Desktop.getDesktop().open(new File(getPath()+"\\"+ datPath)); //öffnt die aktuell ausgewählte Datei
- } catch (IOException e) {
- // Auto-generated catch block
- e.printStackTrace();
+ if(SystemUtils.IS_OS_LINUX){
+ System.out.println("This is Linux");
+ String line;
+ String output = "";
+ Process p;
+ try {
+ p = Runtime.getRuntime().exec("which vlc");
+ BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
+ while ((line = input.readLine()) != null) {
+ output = line;
+ }
+ System.out.println(output);
+ input.close();
+ } catch (IOException e1) {
+ // Auto-generated catch block
+ e1.printStackTrace();
+ }
+ if(output.contains("which: no vlc")||output == ""){
+ Alert alert = new Alert(AlertType.INFORMATION);
+ alert.setHeaderText("");
+ alert.setTitle("Info");
+ alert.setContentText(vlcNotInstalled);
+ alert.showAndWait();
+ }else if(datPath.contains(" ")){
+ Alert alert = new Alert(AlertType.INFORMATION);
+ alert.setHeaderText("");
+ alert.setTitle("Info");
+ alert.setContentText(linuxBugText);
+ alert.showAndWait();
+ }else{
+ try {
+ Runtime.getRuntime().exec("vlc "+getPath()+"/"+ datPath);
+ } catch (IOException e) {
+ Alert alert = new Alert(AlertType.ERROR);
+ alert.setHeaderText("");
+ alert.setTitle("Info");
+ alert.setContentText(errorPlay);
+ alert.showAndWait();
+ e.printStackTrace();
+ }
+ }
+ }else if(SystemUtils.IS_OS_WINDOWS || SystemUtils.IS_OS_MAC_OSX){
+ System.out.println("This is Windows or Mac OSX");
+ try {
+ Desktop.getDesktop().open(new File(getPath()+"\\"+ datPath));
+ } catch (IOException e) {
+ Alert alert = new Alert(AlertType.ERROR);
+ alert.setHeaderText("");
+ alert.setTitle("Info");
+ alert.setContentText(errorPlay);
+ alert.showAndWait();
+ e.printStackTrace();
+ }
}
}
@FXML
private void openfolderbtnclicked(){
try {
- Desktop.getDesktop().open(new File(getPath())); //öffnet den aktuellen Pfad
+ Desktop.getDesktop().open(new File(getPath())); //�ffnet den aktuellen Pfad
} catch (IOException e) {
// Auto-generated catch block
e.printStackTrace();
@@ -352,7 +405,7 @@ public class MainWindowController {
demoBtn.setPrefWidth(130);
demoBtn.setPrefHeight(32);
demoBtn.setFont(Font.font("System", FontWeight.BOLD, 15));
- demoBtn.setDisable(true);
+ demoBtn.setDisable(false);
menubtn.setText("");
menubtn.setMaxSize(32, 32);
@@ -451,7 +504,7 @@ public class MainWindowController {
}
for(int i = 0; i < filterData.size(); i++){
- root.getChildren().addAll(new TreeItem(filterData.get(i))); //fügt daten zur Rootnode hinzu
+ root.getChildren().addAll(new TreeItem(filterData.get(i))); //f�gt daten zur Rootnode hinzu
}
}
});
@@ -492,18 +545,18 @@ public class MainWindowController {
treeTableViewfilm.getColumns().addAll(columnName, columnRating, columnDatName);
- //Changelistener für TreeTable
+ //Changelistener f�r TreeTable
treeTableViewfilm.getSelectionModel().selectedItemProperty().addListener(new ChangeListener