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

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");

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 {