Browse Source

windows 10 & sql fixes

* fixed files wit ' in the name causing a crash
*fixed windows 10 is not detected
pull/24/head
Jannik 4 years ago
parent
commit
2d5887db4f
  1. 2
      src/main/java/kellerkinder/HomeFlix/application/Main.java
  2. 2
      src/main/java/kellerkinder/HomeFlix/controller/DBController.java

2
src/main/java/kellerkinder/HomeFlix/application/Main.java

@ -93,7 +93,7 @@ public class Main extends Application {
// get OS and the specific paths
if (osName.equals("Windows")) {
if (osName.contains("Windows")) {
directory = new File(dirWin);
configFile = new File(dirWin + "/config.xml");
posterCache = new File(dirWin + "/posterCache");

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

@ -333,7 +333,7 @@ public class DBController {
if (!filmsdbStreamURL.contains(episode.getPath())) {
LOGGER.info("Added \"" + file.getName() + "\", Episode: " + episode.getName() + " to database");
stmt.executeUpdate("insert into films values ("
+ "'" + episode.getPath() + "',"
+ "'" + episode.getPath().replace("'", "''") + "',"
+ "'" + cutOffEnd(file.getName()) + "','" + sn + "','" + ep + "', 0, 0)");
connection.commit();
stmt.close();

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