windows 10 & sql fixes
* fixed files wit ' in the name causing a crash *fixed windows 10 is not detected
This commit is contained in:
parent
f9a54abf68
commit
2d5887db4f
|
@ -93,7 +93,7 @@ public class Main extends Application {
|
||||||
|
|
||||||
|
|
||||||
// get OS and the specific paths
|
// get OS and the specific paths
|
||||||
if (osName.equals("Windows")) {
|
if (osName.contains("Windows")) {
|
||||||
directory = new File(dirWin);
|
directory = new File(dirWin);
|
||||||
configFile = new File(dirWin + "/config.xml");
|
configFile = new File(dirWin + "/config.xml");
|
||||||
posterCache = new File(dirWin + "/posterCache");
|
posterCache = new File(dirWin + "/posterCache");
|
||||||
|
|
|
@ -333,7 +333,7 @@ public class DBController {
|
||||||
if (!filmsdbStreamURL.contains(episode.getPath())) {
|
if (!filmsdbStreamURL.contains(episode.getPath())) {
|
||||||
LOGGER.info("Added \"" + file.getName() + "\", Episode: " + episode.getName() + " to database");
|
LOGGER.info("Added \"" + file.getName() + "\", Episode: " + episode.getName() + " to database");
|
||||||
stmt.executeUpdate("insert into films values ("
|
stmt.executeUpdate("insert into films values ("
|
||||||
+ "'" + episode.getPath() + "',"
|
+ "'" + episode.getPath().replace("'", "''") + "',"
|
||||||
+ "'" + cutOffEnd(file.getName()) + "','" + sn + "','" + ep + "', 0, 0)");
|
+ "'" + cutOffEnd(file.getName()) + "','" + sn + "','" + ep + "', 0, 0)");
|
||||||
connection.commit();
|
connection.commit();
|
||||||
stmt.close();
|
stmt.close();
|
||||||
|
|
Loading…
Reference in New Issue