Browse Source

jfoenix 9.0.3 -> 9.0.4

pull/5/head
Jannik 4 years ago
parent
commit
402a004ef6
  1. 2
      pom.xml
  2. 4
      src/main/java/kellerkinder/HomeFlix/controller/DBController.java
  3. 8
      src/main/java/kellerkinder/HomeFlix/controller/OMDbAPIController.java

2
pom.xml

@ -32,7 +32,7 @@
<dependency>
<groupId>com.jfoenix</groupId>
<artifactId>jfoenix</artifactId>
<version>9.0.3</version>
<version>9.0.4</version>
</dependency>
<dependency>

4
src/main/java/kellerkinder/HomeFlix/controller/DBController.java

@ -615,8 +615,8 @@ public class DBController {
try {
mainWindowController.getPosterImageView().setImage(new Image(new File(rs.getString("Poster")).toURI().toString()));
} catch (Exception e) {
mainWindowController.getPosterImageView().setImage(new Image("resources/icons/close_black_2048x2048.png"));
LOGGER.error(e);
mainWindowController.getPosterImageView().setImage(new Image("icons/close_black_2048x2048.png"));
LOGGER.error("No Poster found, useing default.");
}
stmt.close();

8
src/main/java/kellerkinder/HomeFlix/controller/OMDbAPIController.java

@ -110,7 +110,7 @@ public class OMDbAPIController implements Runnable {
try {
BufferedImage originalImage = ImageIO.read(new URL(object.getString("Poster", "")));
// change path to where file is located
omdbResponse.setPoster(main.getPosterCache() + "/" + mainWindowController.getCurrentTitle() + ".png");
omdbResponse.setPoster(main.getPosterCache() + "/" + omdbResponse.getTitle() + ".png");
ImageIO.write(originalImage, "png", new File(omdbResponse.getPoster()));
LOGGER.info("adding poster to cache: " + omdbResponse.getPoster());
} catch (Exception e) {
@ -146,6 +146,7 @@ public class OMDbAPIController implements Runnable {
BufferedReader ina = new BufferedReader(new InputStreamReader(apiUrl.openStream()));
output = ina.readLine();
ina.close();
System.out.println(apiUrl.toString());
LOGGER.info("response from '" + URL + "&t=" + title + "' was:" + output);
} catch (IOException e) {
LOGGER.error("error while making api request or reading response");
@ -156,6 +157,11 @@ public class OMDbAPIController implements Runnable {
return Json.parse(output).asObject();
}
/** TODO if responser == false & isSereis, query without series
* search for a movie/series title
* @param title the movie/series title
* @return the correct title if found
*/
private String searchByTitle(String title) {
String output = null;
// if the movie was not found try to search it

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close