minor fixes

*fixed [Linux] filenames with blank are not supported
*fixed exception output if api response is bad
This commit is contained in:
Jannik
2017-06-06 02:12:59 +02:00
parent 2c92af45c9
commit 70a6485a36
13 changed files with 4 additions and 14 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -11
View File
@@ -199,7 +199,6 @@ public class MainWindowController {
private String errorLoad;
private String errorSave;
private String infoText;
private String linuxBugText;
private String vlcNotInstalled;
private String currentWorkingDirectory;
private String path;
@@ -308,16 +307,9 @@ public class MainWindowController {
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.initOwner(main.primaryStage);
alert.showAndWait();
}else{
try {
Runtime.getRuntime().exec("vlc "+getPath()+"/"+ datPath);
Runtime.getRuntime().exec(new String[] { "vlc", getPath()+"/"+ datPath});
} catch (IOException e) {
showErrorMsg(errorPlay,e);
}
@@ -332,7 +324,7 @@ public class MainWindowController {
}
}else if(mode.equals("streaming")){
try {
Desktop.getDesktop().browse(new URI(datPath)); //open the streaming URL in browser (TODO other option?)
Desktop.getDesktop().browse(new URI(datPath)); //open the streaming URL in browser
} catch (URISyntaxException | IOException e) {
showErrorMsg(errorOpenStream, (IOException) e);
}
@@ -960,7 +952,6 @@ public class MainWindowController {
errorSave = bundle.getString("errorSave");
noFilmFound = bundle.getString("noFilmFound");
infoText = bundle.getString("version")+" "+version+" (Build: "+buildNumber+") "+versionName+bundle.getString("infoText");
linuxBugText = bundle.getString("linuxBug");
vlcNotInstalled = bundle.getString("vlcNotInstalled");
title = bundle.getString("title");
+1
View File
@@ -176,6 +176,7 @@ public class apiQuery{
}
} catch (Exception e) {
mainWindowController.textFlow.getChildren().remove(0, mainWindowController.textFlow.getChildren().size());
mainWindowController.textFlow.getChildren().add(new Text(e.toString()));
System.out.println(e);
} finally {
@@ -27,7 +27,6 @@ errorOpenStream = Beim \u00F6ffnen des Streams ist ein Fehler aufgetreten!
errorLoad = Beim laden der Einstellungen ist ein Fehler aufgetreten!
errorSave = Beim speichern der Einstellungen ist ein Fehler aufgetreten!
noFilmFound = Kein Film mit diesem Titel gefunden!
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-2017 Kellerkinder www.kellerkinder.xyz
title = Titel
@@ -27,7 +27,6 @@ errorOpenStream = An error has occurred during opening the stream!
errorLoad = An error occurred while loading the settings!
errorSave = An error occurred while saving the settings!
noFilmFound = No film with this title found!
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-2017 Kellerkinder www.kellerkinder.xyz
title = Title