134 Commits
141 ... master

Author SHA1 Message Date
Jannik 3805e6563d Merge branch 'dev' of Seil0/Project-HomeFlix into master 2 years ago
Jannik ae20909012
update version to 0.8.0 2 years ago
Jannik 75a80535a7
reworked the UpdateController 2 years ago
Jannik d8062513e9
fixed animation coordinates for 9f8a7c0f4c 2 years ago
Jannik 9f8a7c0f4c
fixed scrollpane jumping to the top after returning from detailview 2 years ago
Jannik 5488bece2d
minor bugfixes and clean up 2 years ago
Jannik 9af3ad26bd
implemented settings as nested conroller 2 years ago
Jannik 989281ff8d
added SettingsView 2 years ago
Jannik e84e7f9d20
removed all table-mode stuff, minor ui tweaks 2 years ago
Jannik c38be08905
some css style improvements 2 years ago
Jannik 512b715c1a
first working version of the PosterMode, enabled by default 2 years ago
Jannik 693650fece
added first layout for SeriesDetailView 2 years ago
Jannik 656c22d48a
added FilmDetailView 2 years ago
Jannik 2bbbfff532
more FilmDeatilView work 2 years ago
Jannik f23e6c77ea
added a sample nested controller 2 years ago
Jannik bb8bcd460a
PosterMode now has posters, UI optimizations 2 years ago
Jannik 4d503546ff
bug fixes 2 years ago
Jannik 4ff8b7819f
Use a FlowPane fot the PosterMode 2 years ago
Jannik 7dbe0d46d8
some clean up and first bits for poster mode GUI logic 2 years ago
Jannik ea9e740552
minor clean up 2 years ago
Jannik fdb39ea2f5
fixed missing elements when searching 2 years ago
Jannik 46cd28a642 updated to javafx 12 3 years ago
Jannik 3381047e76 updated javafx to 11.0.2 3 years ago
Jannik 0786770e97 added a comment 3 years ago
Jannik e47f3ea2f7 minor bug fixes 3 years ago
Jannik c735583a04 cache is now date based, minor clean up 3 years ago
Jannik 5600456556 fixed open folder btn when using Linux, more clean up 3 years ago
Jannik cc05600e0a removed all mwc usage in DBController 3 years ago
Jannik 291f183f5e removed more mwc dependencies & code clean up 3 years ago
Jannik a80e077d47 code clean up and removed some unneeded mwc uses in DBController 3 years ago
Jannik 3e80354d88 don't use mains primarystage, disabled column resizeing 3 years ago
Jannik d3d22db7a8 moved static vars and save & load code to XMLController 3 years ago
Jannik 060527ae03 removed travis.yml 3 years ago
Jannik 2daeb86d67 updated readme 3 years ago
Jannik 29c6b30168 small omdbAPI query fixes 3 years ago
Jannik 1d06aaeaa2 clean up 3 years ago
Jannik a677abc15c added a "next episode" button to the player 3 years ago
Jannik c3a148b267 reworked the DBController 3 years ago
Jannik 6585908717 minor gui fixes 3 years ago
Jannik 201109e79d updated jfoenix 9.0.6 -> 9.0.8 3 years ago
Jannik f1ccb04f9e „README.md“ ändern 3 years ago
Jannik 9f8c19ab8e fixed issue #6 3 years ago
Jannik 079f15cd59 player fixes & lib updates 3 years ago
Jannik 0d9ffb36e5 Merge remote-tracking branch 'origin/dev' into dev 3 years ago
Jannik 5e89faff49 use gitea instead of github 3 years ago
Jannik fed25f2fce „README.md“ ändern 3 years ago
Jannik 0cf02c52a6 updated gitignore 3 years ago
Jannik b8a67fbc27 removed eclipse specific files 3 years ago
Jannik 5a3b647060 „.project“ löschen 3 years ago
Jannik ffe068e1b0 „.classpath“ löschen 3 years ago
Jannik 4d31e53a7c updated gitignore to ignore eclipse files 3 years ago
Jannik 2e86836041 small code cleanup 3 years ago
Jannik a23b87fcb8 fixed first startup issue 3 years ago
Jannik a1319382ff removed the usage of mwc in omdbAPIQuery 3 years ago
Jannik a491937b30 Merge branch 'java11' of Seil0/Project-HomeFlix into dev 3 years ago
Jannik e6ce1dc464 fixed javafx11 executable jar 3 years ago
Jannik abbb272bff fixed java11 execution 3 years ago
Jannik 96bfc461cb formation fixes 3 years ago
Jannik 32fc533c00 fixed junit 3 years ago
Jannik 76bb0fa8b1 prepare java11 3 years ago
Jannik 8f6832c147 updated some libraries 3 years ago
Jannik fe1dc01605 code cleanup 3 years ago
Jannik 814bb00158 added getAllNotCachedEntries() 3 years ago
Jannik f68b0c0feb code clean up 3 years ago
Jannik d16e724cce documentation improvements 3 years ago
Jannik 23ac33ca9b 'README.md' ändern 3 years ago
Jannik 67142662d8 'README.md' ändern 3 years ago
Jannik b603051c59 typo 3 years ago
Jannik 3b188904f6 nothing to see here 3 years ago
Jannik 50ae1747e6 update sqlite-jdbc 3.21.0.1 -> 3.23.1 3 years ago
Jannik b1f9a6c505 java 9/10 3 years ago
Jannik 4b1b20f814 build against java 9/10/11 3 years ago
Jannik 95d29d772c try openjdk build too 3 years ago
Jannik 3840e31849 try to build with java 10 again 3 years ago
Jannik 031046643c save&load are now in the main class 3 years ago
Jannik 1fca1c551d more code cleanup 3 years ago
Jannik 036ed8ad11 DBController cleanup 3 years ago
Jannik 26f26ec9f8 target java 9 until travis offers jdk10 3 years ago
Jannik e1ec3cae7e travis oraclejdk9 & openjdk8 3 years ago
Jannik 311577fe7c openjdk9 3 years ago
Jannik 9577508311 openjdk10 3 years ago
Jannik d7ed7c7b21 target java 10 3 years ago
Jannik 1e0ab2b943 code cleanup 3 years ago
Jannik 46efa77fce omdb fixes 3 years ago
Jannik 402a004ef6 jfoenix 9.0.3 -> 9.0.4 3 years ago
Jannik 48b9c99baa more TODO 3 years ago
Jannik 74e8783082 HomeFLix now shows the plot for each episode of a series 3 years ago
Jannik 391ef59f70 code cleanup 3 years ago
Jannik 85a403a834 fixed Hamburger icon has wrong color after color change 3 years ago
Jannik 46c1c43cab
Update README.md 3 years ago
Jannik d7e9ce56c1 Merge remote-tracking branch 'origin/dev' into dev 3 years ago
Jannik d70ad34df4 added travis 3 years ago
Jannik d609715771
Merge pull request #25 from Seil0/master 3 years ago
Jannik 53f68c9a69
Merge pull request #24 from Seil0/dev 3 years ago
Jannik 535efd98ee release 0.7.0 3 years ago
Jannik 9a4eae0be9 autoplay fixes 3 years ago
Jannik 23e46b7913 cleanup 3 years ago
Jannik d3ea1b1956 fixed api arror if title dosent exist at omdbAPI 3 years ago
Jannik 75ad137346 minor player improvements 3 years ago
Jannik 7631169d26
Update README.md 3 years ago
Jannik 0c1b21ac05 series work 3 years ago
Jannik 94e32b938a saving the progress you mad on series by now 3 years ago
Jannik 913513a237 series work 3 years ago
Jannik 2c1ce23315 maven cleanup 4 years ago
Jannik e3feebcbb4 UpdateController update 4 years ago
Jannik e12da3d116 code cleanup & processbuilder 4 years ago
Jannik 78fa84758d cleanup 4 years ago
Jannik 96e3d9e3ac code cleanup 4 years ago
Jannik 4b5c9482c8 code cleanup 4 years ago
Jannik ffa7de49dd added autoplay option 4 years ago
Jannik 87b3eae9fb set time to hide controlls to 1 second 4 years ago
Jannik ee3ec73a63 fixed series are expanded when sorting 4 years ago
Jannik 3afc836df7 code cleanup 4 years ago
Jannik d6554b9acd minor player fixes and no more other files than videos in the db 4 years ago
Jannik 2c3e9fd5e7 autoplay fixes 4 years ago
Jannik 0379de6179 fixed time slider and autoplay 4 years ago
Jannik 5e4373d70d documentation work 4 years ago
Jannik a918b0b1d8 new player part 2 4 years ago
Jannik 2881c1f9d6 added first version of the new player 4 years ago
Jannik 2d0d138c08 cleanup 4 years ago
Jannik 22df604093 use alerts instead of dialogs 4 years ago
Jannik 34371bb2b5 added info alert 4 years ago
Jannik 8ec7653a5e added to option to select a local or streaming source at the first start 4 years ago
Jannik 2d5887db4f windows 10 & sql fixes 4 years ago
Jannik f9a54abf68 small cleanup 4 years ago
Jannik 4be971efee bug fixes 4 years ago
Jannik 1299748bed
Merge pull request #22 from Seil0/dev 4 years ago
Jannik 865e732445 Merge pull request #16 from Seil0/dev 4 years ago
Jannik 4ca4f7ad3a Merge pull request #13 from Seil0/dev 4 years ago
Jannik 85d65b6235 Merge pull request #12 from Seil0/dev 4 years ago
Jannik 08048d57ac Merge pull request #11 from Seil0/dev 4 years ago
Jannik 6baa47b852 Merge pull request #10 from Seil0/dev 4 years ago
Jannik 944151d35f Merge pull request #8 from Seil0/dev 5 years ago
Jannik b331ffd270 Merge pull request #7 from Seil0/dev 5 years ago
  1. 27
      .classpath
  2. 4
      .gitignore
  3. 23
      .project
  4. 5
      .settings/org.eclipse.core.resources.prefs
  5. 5
      .settings/org.eclipse.jdt.core.prefs
  6. 4
      .settings/org.eclipse.m2e.core.prefs
  7. 20
      README.md
  8. 242
      pom.xml
  9. 86
      src/main/java/com/cemu_UI/uiElements/JFXInfoDialog.java
  10. 142
      src/main/java/com/cemu_UI/uiElements/JFXOkayCancelDialog.java
  11. 98
      src/main/java/com/cemu_UI/uiElements/JFXTextAreaInfoDialog.java
  12. 226
      src/main/java/kellerkinder/HomeFlix/application/FilmDetailView.java
  13. 8
      src/main/java/kellerkinder/HomeFlix/application/JavaFX11Main.java
  14. 198
      src/main/java/kellerkinder/HomeFlix/application/Main.java
  15. 1221
      src/main/java/kellerkinder/HomeFlix/application/MainWindowController.java
  16. 239
      src/main/java/kellerkinder/HomeFlix/application/SeriesDetailView.java
  17. 308
      src/main/java/kellerkinder/HomeFlix/application/SettingsView.java
  18. 863
      src/main/java/kellerkinder/HomeFlix/controller/DBController.java
  19. 230
      src/main/java/kellerkinder/HomeFlix/controller/OMDbAPIController.java
  20. 179
      src/main/java/kellerkinder/HomeFlix/controller/SourcesController.java
  21. 172
      src/main/java/kellerkinder/HomeFlix/controller/UpdateController.java
  22. 306
      src/main/java/kellerkinder/HomeFlix/controller/XMLController.java
  23. 95
      src/main/java/kellerkinder/HomeFlix/datatypes/DatabaseDataType.java
  24. 120
      src/main/java/kellerkinder/HomeFlix/datatypes/FilmTabelDataType.java
  25. 268
      src/main/java/kellerkinder/HomeFlix/datatypes/OMDbAPIResponseDataType.java
  26. 107
      src/main/java/kellerkinder/HomeFlix/datatypes/PosterModeElement.java
  27. 67
      src/main/java/kellerkinder/HomeFlix/datatypes/SeriresDVEpisode.java
  28. 3
      src/main/java/kellerkinder/HomeFlix/datatypes/SourceDataType.java
  29. 161
      src/main/java/kellerkinder/HomeFlix/player/Player.java
  30. 310
      src/main/java/kellerkinder/HomeFlix/player/PlayerController.java
  31. 196
      src/main/java/org/kellerkinder/Alerts/JFX2BtnCancelAlert.java
  32. 106
      src/main/java/org/kellerkinder/Alerts/JFXInfoAlert.java
  33. 123
      src/main/resources/css/MainWindow.css
  34. 216
      src/main/resources/fxml/FilmDetailView.fxml
  35. 150
      src/main/resources/fxml/MainWindow.fxml
  36. 75
      src/main/resources/fxml/PlayerWindow.fxml
  37. 167
      src/main/resources/fxml/SeriesDetailView.fxml
  38. 154
      src/main/resources/fxml/SettingsView.fxml
  39. BIN
      src/main/resources/icons/baseline_favorite_black_48dp.png
  40. BIN
      src/main/resources/icons/baseline_favorite_border_black_48dp.png
  41. BIN
      src/main/resources/icons/baseline_folder_black_48dp.png
  42. BIN
      src/main/resources/icons/baseline_fullscreen_black_48dp.png
  43. BIN
      src/main/resources/icons/baseline_fullscreen_exit_black_48dp.png
  44. BIN
      src/main/resources/icons/baseline_keyboard_arrow_down_black_48dp.png
  45. BIN
      src/main/resources/icons/baseline_keyboard_arrow_down_white_48dp.png
  46. BIN
      src/main/resources/icons/baseline_keyboard_arrow_down_white_48dp_48x16.png
  47. BIN
      src/main/resources/icons/baseline_list_black_48dp.png
  48. BIN
      src/main/resources/icons/baseline_pause_black_48dp.png
  49. BIN
      src/main/resources/icons/baseline_play_arrow_black_48dp.png
  50. BIN
      src/main/resources/icons/baseline_stop_black_48dp.png
  51. BIN
      src/main/resources/icons/ic_favorite_black_18dp_1x.png
  52. BIN
      src/main/resources/icons/ic_favorite_border_black_18dp_1x.png
  53. BIN
      src/main/resources/icons/ic_play_arrow_black_18dp_1x.png
  54. BIN
      src/main/resources/icons/ic_play_arrow_white_18dp_1x.png
  55. BIN
      src/main/resources/icons/ic_search_black_18dp_1x.png
  56. BIN
      src/main/resources/icons/ic_skip_next_black_18dp_1x.png
  57. BIN
      src/main/resources/icons/ic_skip_next_white_18dp_1x.png
  58. BIN
      src/main/resources/icons/ic_skip_previous_black_18dp_1x.png
  59. BIN
      src/main/resources/icons/ic_skip_previous_white_18dp_1x.png
  60. 36
      src/main/resources/locals/HomeFlix-Local_de_DE.properties
  61. 36
      src/main/resources/locals/HomeFlix-Local_en_US.properties

27
.classpath

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

4
.gitignore

@ -49,4 +49,6 @@ config.xml
.directory
target/
apiKeys.json
.classpath
.project
.settings/*

23
.project

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Project-HomeFlix</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

5
.settings/org.eclipse.core.resources.prefs

@ -1,5 +0,0 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8

5
.settings/org.eclipse.jdt.core.prefs

@ -1,5 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=9
org.eclipse.jdt.core.compiler.compliance=9
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=9

4
.settings/org.eclipse.m2e.core.prefs

@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

20
README.md

@ -1,24 +1,18 @@
![Total Downloads](https://img.shields.io/github/downloads/Seil0/Project-HomeFlix/total.svg?style=flat-square)
[![Latest](https://img.shields.io/github/release/Seil0/Project-HomeFlix/all.svg?style=flat-square)](https://github.com/Seil0/Project-HomeFlix/releases)
[![Latest](https://img.shields.io/badge/Download-latest-brightgreen.svg?style=flat-square)](https://git.mosad.xyz/Seil0/Project-HomeFlix/releases)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0)
# Project-HomeFlix
Project-HomeFlix is a Kellerkinder Project, that alowes you to sort all your local saved movies in clean UI. Project-HomeFlix is free and open-source software and uses other open-source projects to provied a nice user experience.
## Installation
Simply download the Project-HomeFlix.jar from [releases](https://github.com/Seil0/Project-HomeFlix/releases), make sure you have the latest version of java 8 oracle jre/jdk installed, open the .jar file. If you need additional information pleas visit our [wiki](https://github.com/Seil0/Project-HomeFlix/wiki).
Simply download the Project-HomeFlix.jar from [releases](https://git.mosad.xyz/Seil0/Project-HomeFlix/releases), make sure you have the latest version of java 8 oracle jre/jdk installed, open the .jar file. If you need additional information pleas visit our [wiki](https://git.mosad.xyz/Seil0/Project-HomeFlix/wiki).
## Development information
The dev branch is **only merged** into master when a **new release** is released, so **master contains the latest released version**. Please commit all changes to [dev](https://github.com/Seil0/Project-HomeFlix/tree/dev).
The dev branch is **only merged** into master when a **new release** is released, so **master contains the latest released version**. Please commit all changes to [dev](https://git.mosad.xyz/Seil0/Project-HomeFlix/src/branch/dev).
Librarys used in this Project:
JFoenix: https://github.com/jfoenixadmin/JFoenix
minimal-json: https://github.com/ralfstx/minimal-json
sqlite-jdbc: https://github.com/xerial/sqlite-jdbc
apache commons io : https://commons.apache.org/proper/commons-io/
[Libraries used in this Project](https://git.mosad.xyz/Seil0/Project-HomeFlix/wiki/Documentation#used-libraries-and-apis)
## screenshots
![Screenshot](https://github.com/Seil0/Seil0.github.io/blob/master/pictures/Project-HomeFlix_MainWindow.png)
## Screenshots
![Screenshot](https://raw.githubusercontent.com/Seil0/Seil0.github.io/master/images/Project-HomeFlix_MainWindow.png)
Project-HomeFlix © 2016-2018 Kellerkinder ([Seil0](https://github.com/Seil0), [Windoofs](https://github.com/Windoofs))
www.kellerkinder.xyz
Project-HomeFlix © 2016-2019 mosad www.mosad.xyz, Project by [@Seil0](https://git.mosad.xyz/Seil0) and [@localhorst](https://git.mosad.xyz/localhorst)

242
pom.xml

@ -1,103 +1,141 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.kellerkinder</groupId>
<artifactId>Project-HomeFlix</artifactId>
<version>0.6.0</version>
<packaging>jar</packaging>
<name>Project-HomeFlix</name>
<url>http://www.kellerkinder.xyz</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.jfoenix</groupId>
<artifactId>jfoenix</artifactId>
<version>9.0.2</version>
</dependency>
<dependency>
<groupId>com.eclipsesource.minimal-json</groupId>
<artifactId>minimal-json</artifactId>
<version>0.9.5</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.21.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.10.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>9</source>
<target>9</target>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>kellerkinder.HomeFlix.application.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.kellerkinder</groupId>
<artifactId>Project-HomeFlix</artifactId>
<version>0.7.0</version>
<packaging>jar</packaging>
<name>Project-HomeFlix</name>
<url>http://www.mosad.xyz</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>12.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>12.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-media</artifactId>
<version>12.0.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.jfoenix</groupId>
<artifactId>jfoenix</artifactId>
<version>9.0.9</version>
</dependency>
<dependency>
<groupId>com.eclipsesource.minimal-json</groupId>
<artifactId>minimal-json</artifactId>
<version>0.9.5</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.27.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>11</source>
<target>11</target>
<!--<release>11</release> -->
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>kellerkinder.HomeFlix.application.Main</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<finalName>Project-HomeFlix</finalName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>kellerkinder.HomeFlix.application.JavaFX11Main</mainClass>
</transformer>
</transformers>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

86
src/main/java/com/cemu_UI/uiElements/JFXInfoDialog.java

@ -1,86 +0,0 @@
/**
* cemu_UI
*
* Copyright 2017 <@Seil0>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package com.cemu_UI.uiElements;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXDialog;
import com.jfoenix.controls.JFXDialogLayout;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.text.Text;
public class JFXInfoDialog {
private String headingText;
private String bodyText;
private String dialogBtnStyle;
private int dialogWidth;
private int dialogHeight;
private Pane pane;
/**
* Creates a new JFoenix Dialog to show some information
* @param headingText Heading Text, just the heading
* @param bodyText body Text, all other text belongs here
* @param dialogBtnStyle Style of the okay button
* @param dialogWidth dialog width
* @param dialogHeight dialog height
* @param pane pane to which the dialog belongs
*/
public JFXInfoDialog(String headingText, String bodyText, String dialogBtnStyle, int dialogWidth, int dialogHeight, Pane pane) {
this.headingText = headingText;
this.bodyText = bodyText;
this.dialogBtnStyle = dialogBtnStyle;
this.dialogWidth = dialogWidth;
this.dialogHeight = dialogHeight;
this.pane = pane;
}
public void show() {
JFXDialogLayout content = new JFXDialogLayout();
content.setHeading(new Text(headingText));
content.setBody(new Text(bodyText));
content.setPrefSize(dialogWidth, dialogHeight);
StackPane stackPane = new StackPane();
stackPane.autosize();
JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true);
JFXButton button = new JFXButton("Okay");
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
dialog.close();
}
});
button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
button.setPrefHeight(32);
button.setStyle(dialogBtnStyle);
content.setActions(button);
pane.getChildren().add(stackPane);
AnchorPane.setTopAnchor(stackPane, (pane.getHeight() - content.getPrefHeight()) / 2);
AnchorPane.setLeftAnchor(stackPane, (pane.getWidth() - content.getPrefWidth()) / 2);
dialog.show();
}
}

142
src/main/java/com/cemu_UI/uiElements/JFXOkayCancelDialog.java

@ -1,142 +0,0 @@
/**
* cemu_UI
*
* Copyright 2017 <@Seil0>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package com.cemu_UI.uiElements;
import java.util.ResourceBundle;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXDialog;
import com.jfoenix.controls.JFXDialogLayout;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.text.Text;
public class JFXOkayCancelDialog {
private String headingText;
private String bodyText;
private String dialogBtnStyle;
private String okayText;
private String cancelText;
private int dialogWidth;
private int dialogHeight;
private EventHandler<ActionEvent> okayAction;
private EventHandler<ActionEvent> cancelAction;
private Pane pane;
/**
* Creates a new JFoenix Dialog to show some information with okay and cancel option
* @param headingText Heading Text, just the heading
* @param bodyText body Text, all other text belongs here
* @param dialogBtnStyle Style of the okay button
* @param dialogWidth dialog width
* @param dialogHeight dialog height
* @param okayAction action which is performed if the okay button is clicked
* @param cancelAction action which is performed if the cancel button is clicked
* @param pane pane to which the dialog belongs
*/
public JFXOkayCancelDialog(String headingText, String bodyText, String dialogBtnStyle, int dialogWidth,
int dialogHeight, EventHandler<ActionEvent> okayAction, EventHandler<ActionEvent> cancelAction, Pane pane,
ResourceBundle bundle) {
this.headingText = headingText;
this.bodyText = bodyText;
this.dialogBtnStyle = dialogBtnStyle;
this.dialogWidth = dialogWidth;
this.dialogHeight = dialogHeight;
this.okayAction = okayAction;
this.cancelAction = cancelAction;
this.pane = pane;
okayText = bundle.getString("okayBtnText");
cancelText = bundle.getString("cancelBtnText");
}
public void show() {
JFXDialogLayout content = new JFXDialogLayout();
content.setHeading(new Text(headingText));
content.setBody(new Text(bodyText));
StackPane stackPane = new StackPane();
stackPane.autosize();
JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true);
JFXButton okayBtn = new JFXButton(okayText);
okayBtn.addEventHandler(ActionEvent.ACTION, (e)-> {
dialog.close();
});
okayBtn.addEventHandler(ActionEvent.ACTION, okayAction);
okayBtn.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
okayBtn.setPrefHeight(32);
okayBtn.setStyle(dialogBtnStyle);
JFXButton cancelBtn = new JFXButton(cancelText);
cancelBtn.addEventHandler(ActionEvent.ACTION, (e)-> {
dialog.close();
});
cancelBtn.addEventHandler(ActionEvent.ACTION, cancelAction);
cancelBtn.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
cancelBtn.setPrefHeight(32);
cancelBtn.setStyle(dialogBtnStyle);
content.setActions(cancelBtn, okayBtn);
content.setPrefSize(dialogWidth, dialogHeight);
pane.getChildren().add(stackPane);
AnchorPane.setTopAnchor(stackPane, (pane.getHeight()-content.getPrefHeight())/2);
AnchorPane.setLeftAnchor(stackPane, (pane.getWidth()-content.getPrefWidth())/2);
dialog.show();
}
public String getOkayText() {
return okayText;
}
public void setOkayText(String okayText) {
this.okayText = okayText;
}
public String getCancelText() {
return cancelText;
}
public void setCancelText(String cancelText) {
this.cancelText = cancelText;
}
public EventHandler<ActionEvent> getOkayAction() {
return okayAction;
}
public void setOkayAction(EventHandler<ActionEvent> okayAction) {
this.okayAction = okayAction;
}
public EventHandler<ActionEvent> getCancelAction() {
return cancelAction;
}
public void setCancelAction(EventHandler<ActionEvent> cancelAction) {
this.cancelAction = cancelAction;
}
}

98
src/main/java/com/cemu_UI/uiElements/JFXTextAreaInfoDialog.java

@ -1,98 +0,0 @@
/**
* cemu_UI
*
* Copyright 2017 <@Seil0>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package com.cemu_UI.uiElements;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXDialog;
import com.jfoenix.controls.JFXDialogLayout;
import com.jfoenix.controls.JFXTextArea;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.text.Text;
public class JFXTextAreaInfoDialog {
private String headingText;
private String bodyText;
private String dialogBtnStyle;
private int dialogWidth;
private int dialogHeight;
private JFXTextArea textArea;
private Pane pane;
/**
* Creates a new JFoenix Dialog to show some information
* @param headingText Heading Text, just the heading
* @param bodyText body Text, all other text belongs here
* @param dialogBtnStyle Style of the okay button
* @param dialogWidth dialog width
* @param dialogHeight dialog height
* @param pane pane to which the dialog belongs
*/
public JFXTextAreaInfoDialog(String headingText, String bodyText, String dialogBtnStyle, int dialogWidth, int dialogHeight, Pane pane) {
this.headingText = headingText;
this.bodyText = bodyText;
this.dialogBtnStyle = dialogBtnStyle;
this.dialogWidth = dialogWidth;
this.dialogHeight = dialogHeight;
this.pane = pane;
}
public void show() {
textArea = new JFXTextArea(bodyText);
JFXDialogLayout content = new JFXDialogLayout();
content.setHeading(new Text(headingText));
content.setBody(textArea);
content.setPrefSize(dialogWidth, dialogHeight);
StackPane stackPane = new StackPane();
stackPane.autosize();
JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true);
JFXButton button = new JFXButton("Okay");
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
dialog.close();
}
});
button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
button.setPrefHeight(32);
button.setStyle(dialogBtnStyle);
content.setActions(button);
pane.getChildren().add(stackPane);
AnchorPane.setTopAnchor(stackPane, (pane.getHeight() - content.getPrefHeight()) / 2);
AnchorPane.setLeftAnchor(stackPane, (pane.getWidth() - content.getPrefWidth()) / 2);
dialog.show();
}
public JFXTextArea getTextArea() {
return textArea;
}
public void setTextArea(JFXTextArea textArea) {
this.textArea = textArea;
}
}

226
src/main/java/kellerkinder/HomeFlix/application/FilmDetailView.java

@ -0,0 +1,226 @@
/**
* Project-HomeFlix
*
* Copyright 2016-2019 <@Seil0>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*/
package kellerkinder.HomeFlix.application;
import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.jfoenix.controls.JFXButton;
import javafx.animation.FadeTransition;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.text.Text;
import javafx.util.Duration;
import kellerkinder.HomeFlix.controller.DBController;
import kellerkinder.HomeFlix.controller.XMLController;
import kellerkinder.HomeFlix.player.Player;
public class FilmDetailView {
@FXML private AnchorPane filmDVPane;
@FXML private Label lblTitle;
@FXML private Label lblYear;
@FXML private Label lblScore;
@FXML private Label lblCrew;
@FXML private Label lblDirectors;
@FXML private Label lblDirectorsInfo;
@FXML private Label lblWriters;
@FXML private Label lblWritersInfo;
@FXML private Label lblActors;
@FXML private Label lblActorsInfo;
@FXML private Label lblInfo;
@FXML private Label lblRuntimeInfo;
@FXML private Label lblRuntime;
@FXML private Label lblLanguageInfo;
@FXML private Label lblLanguage;
@FXML private Label lblRevenueInfo;
@FXML private Label lblRevenue;
@FXML private Label lblRatingInfo;
@FXML private Label lblRating;
@FXML private JFXButton btnWishlist;
@FXML private JFXButton btnFavourite;
@FXML private JFXButton btnHide;
@FXML private JFXButton btnPlay;
@FXML private JFXButton btnDirectory;
@FXML private ImageView wishlistIcon;
@FXML private ImageView favoriteIcon;
@FXML private ImageView imgPoster;
@FXML private Text textPlot;
private DBController dbController;
private static final Logger LOGGER = LogManager.getLogger(FilmDetailView.class.getName());
private String currentStreamURL;
public void initialize() {
dbController = DBController.getInstance();
filmDVPane.setStyle("-fx-background-color: rgba(89,89,89,0.9);");
}
@FXML
private void btnWishlistAction() {
}
@FXML
private void btnFavouriteAction() {
dbController.toggleFavoriteState(currentStreamURL);
// update the favorite icon
if(dbController.getFavoriteState(currentStreamURL) == 1) {
favoriteIcon.setImage(new Image("icons/baseline_favorite_black_48dp.png"));
} else {
favoriteIcon.setImage(new Image("icons/baseline_favorite_border_black_48dp.png"));
}
}
@FXML
private void btnHideAction() {
hidePane();
}
@FXML
private void btnPlayAction() {
playFilm();
}
@FXML
private void btnDirectoryAction() {
File dest = new File(currentStreamURL).getParentFile();
if (!System.getProperty("os.name").contains("Linux")) {
try {
Desktop.getDesktop().open(dest);
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* set the cached data of a stream to the FilmDetailView
* @param streamURL URL of the stream
*/
public void setFilm(String streamURL) {
currentStreamURL = streamURL;
String[] cacheInfo = dbController.readCache(streamURL); // get the cache data from the database
// add the cache data to the GUI
lblTitle.setText(cacheInfo[0]);
lblYear.setText("(" + cacheInfo[1] + ")");
lblScore.setText(XMLController.getLocalBundle().getString("score") + ": " + cacheInfo[15] + "%");
textPlot.setText(cacheInfo[11]);
lblDirectors.setText(cacheInfo[8]);
lblWriters.setText(cacheInfo[9]);
lblActors.setText(cacheInfo[10]);
lblRuntime.setText(cacheInfo[6]);
lblLanguage.setText(cacheInfo[12]);
lblRevenue.setText(cacheInfo[18]);
lblRating.setText(cacheInfo[2]);
try {
if (new File(cacheInfo[20]).isFile()) {
imgPoster.setImage(new Image(new File(cacheInfo[20]).toURI().toString()));
} else {
imgPoster.setImage(new Image(cacheInfo[20]));
}
} catch (Exception e) {
imgPoster.setImage(new Image("icons/Homeflix_Poster.png"));
LOGGER.error("No Poster found, useing default.");
}
// set the favorite correct icon
if(dbController.getFavoriteState(streamURL) == 1) {
favoriteIcon.setImage(new Image("icons/baseline_favorite_black_48dp.png"));
} else {
favoriteIcon.setImage(new Image("icons/baseline_favorite_border_black_48dp.png"));
}
}
/**
* update the text of all static GUI elements of FilmDeatilView
*/
public void updateGUILocal() {
lblCrew.setText(XMLController.getLocalBundle().getString("crew"));
lblDirectorsInfo.setText(XMLController.getLocalBundle().getString("directors"));
lblWritersInfo.setText(XMLController.getLocalBundle().getString("writers"));
lblActorsInfo.setText(XMLController.getLocalBundle().getString("actors"));
lblInfo.setText(XMLController.getLocalBundle().getString("info"));
lblRuntimeInfo.setText(XMLController.getLocalBundle().getString("runtime"));
lblLanguageInfo.setText(XMLController.getLocalBundle().getString("language"));
lblRevenueInfo.setText(XMLController.getLocalBundle().getString("boxOffice"));
lblRatingInfo.setText(XMLController.getLocalBundle().getString("rated"));
}
/**
* show the FilmDVpane
*/
public void showPane() {
filmDVPane.setVisible(true);
FadeTransition fadeIn = new FadeTransition(Duration.millis(300), filmDVPane);
fadeIn.setFromValue(0.3);
fadeIn.setToValue(1.0);
fadeIn.play();
}
/**
* hide the FilmDVpane
*/
private void hidePane() {
FadeTransition fadeOut = new FadeTransition(Duration.millis(200), filmDVPane);
fadeOut.setFromValue(1.0);
fadeOut.setToValue(0.3);
fadeOut.play();
filmDVPane.setVisible(false);
MainWindowController.getInstance().disableBlur(); // disable blur
}
private void playFilm() {
if(new File(currentStreamURL).isDirectory()) {
return;
}
new Player(currentStreamURL);
}
}

8
src/main/java/kellerkinder/HomeFlix/application/JavaFX11Main.java

@ -0,0 +1,8 @@
package kellerkinder.HomeFlix.application;
public class JavaFX11Main {
public static void main(String[] args) {
Main.main(args);
}
}

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

@ -1,7 +1,7 @@
/**
* Project-HomeFlix
*
* Copyright 2016-2018 <@Seil0>
* Copyright 2016-2019 <@Seil0>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,9 +24,6 @@ package kellerkinder.HomeFlix.application;
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import java.util.Optional;
import java.util.ResourceBundle;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -34,185 +31,86 @@ import org.apache.logging.log4j.Logger;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.ButtonType;
import javafx.scene.image.Image;
import javafx.scene.layout.AnchorPane;
import javafx.stage.DirectoryChooser;
import javafx.stage.Stage;
import kellerkinder.HomeFlix.controller.XMLController;
public class Main extends Application {
private Stage primaryStage;
private Scene scene;
private AnchorPane pane;
private MainWindowController mainWindowController;
private static String userHome = System.getProperty("user.home");
private static String userName = System.getProperty("user.name");
private static String osName = System.getProperty("os.name");
private static String osArch = System.getProperty("os.arch");
private static String osVers = System.getProperty("os.version");
private static String javaVers = System.getProperty("java.version");
private static String javaVend= System.getProperty("java.vendor");
private String dirWin = userHome + "/Documents/HomeFlix"; //Windows: C:/Users/"User"/Documents/HomeFlix
private String dirLinux = userHome + "/HomeFlix"; //Linux: /home/"User"/HomeFlix
private File directory;
private File configFile;
private File posterCache;
private String path;
private String FONT_FAMILY = "System";
private String local = System.getProperty("user.language")+"_"+System.getProperty("user.country");
private double FONT_SIZE = 17;
private ResourceBundle bundle;
private static XMLController xmlController;
private static Logger LOGGER;
public static final String version = "0.8.0";
public static final String buildNumber = "173";
public static final String versionName = "toothless dragon";
@Override
public void start(Stage primaryStage) throws IOException {
LOGGER.info("OS: " + osName + " " + osVers + " " + osArch);
LOGGER.info("Java: " + javaVend + " " + javaVers);
LOGGER.info("User: " + userName + " " + userHome);
this.primaryStage = primaryStage;
mainWindow();
}
private void mainWindow(){
//initialize the mainWindowController and the primaryStage
try {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(ClassLoader.getSystemResource("fxml/MainWindow.fxml"));
loader.setLocation(getClass().getResource("/fxml/MainWindow.fxml"));
pane = (AnchorPane) loader.load();
primaryStage.setMinHeight(600.00);
primaryStage.setMinWidth(1000.00);
primaryStage.setResizable(false);
primaryStage.setMinHeight(600.00 + 34); // 34 -> window decoration
primaryStage.setMinWidth(1130.00);
//primaryStage.setResizable(false);
primaryStage.setTitle("Project HomeFlix");
primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/icons/Homeflix_Icon_64x64.png"))); //adds application icon
mainWindowController = loader.getController(); //Link of FXMLController and controller class
mainWindowController.setMain(this); //call setMain
// get OS and the specific paths
if (osName.equals("Windows")) {
directory = new File(dirWin);
configFile = new File(dirWin + "/config.xml");
posterCache = new File(dirWin + "/posterCache");
} else {
directory = new File(dirLinux);
configFile = new File(dirLinux + "/config.xml");
posterCache = new File(dirLinux + "/posterCache");
}
// startup checks
if (!configFile.exists()) {
directory.mkdir();
mainWindowController.addSource(firstStart(), "local");
mainWindowController.setColor("ee3523");
mainWindowController.setSize(FONT_SIZE);
mainWindowController.setAutoUpdate(false);
mainWindowController.setLocal(local);
mainWindowController.saveSettings();
try {
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); // start again (preventing Bugs) TODO is this really needed
System.exit(0); // finishes it self
} catch (Exception e) {
LOGGER.error("error while restarting HomeFlix", e);
}
}
primaryStage.setOnCloseRequest(event -> System.exit(0));
if (!posterCache.exists()) {
posterCache.mkdir();
}
// generate window
scene = new Scene(pane); // create new scene, append pane to scene
scene.getStylesheets().add(getClass().getResource("/css/MainWindow.css").toExternalForm());
primaryStage.setScene(scene); // append scene to stage
primaryStage.show(); // show stage
// init here as it loads the games to the mwc and the gui, therefore the window must exist
mainWindowController = loader.getController(); //Link of FXMLController and controller class
mainWindowController.init();
mainWindowController.getDbController().init();
} catch (IOException e) {
LOGGER.error(e);
LOGGER.error("Error while loading in Main", e);
}
}
// Method for first Start
private String firstStart(){
switch (System.getProperty("user.language") + "_" + System.getProperty("user.country")) {
case "en_US":
bundle = ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.US); // us_english
break;
case "de_DE":
bundle = ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.GERMAN); // German
break;
default:
bundle = ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.US); // default local
break;
}
Alert alert = new Alert(AlertType.CONFIRMATION); //new alert with file-chooser
alert.setTitle("Project HomeFlix");
alert.setHeaderText(bundle.getString("firstStartHeader"));
alert.setContentText(bundle.getString("firstStartContent"));
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK){
DirectoryChooser directoryChooser = new DirectoryChooser();
File selectedDirectory =
directoryChooser.showDialog(primaryStage);
path = selectedDirectory.getAbsolutePath();
/**
* set the log file location and initialize the logger launch the GUI
* @param args arguments given at the start
*/
public static void main(String[] args) {
// Logger initialization
String logPath = "";
if (System.getProperty("os.name").contains("Windows")) {
logPath = System.getProperty("user.home") + "/Documents/HomeFlix/app.log";
} else {
path = "";
logPath = System.getProperty("user.home") + "/HomeFlix/app.log";
}
return path;
}
System.setProperty("logFilename", logPath);
File logFile = new File(logPath);
logFile.delete();
LOGGER = LogManager.getLogger(Main.class.getName());
LOGGER.info("OS: " + XMLController.getOsName() + " " + XMLController.getOsVers() + " " + XMLController.getOsVers());
LOGGER.info("Java: " + XMLController.getJavaVend() + " " + XMLController.getJavaVers());
LOGGER.info("User: " + XMLController.getUserName() + " " + XMLController.getUserHome());
xmlController = new XMLController();
if (!XMLController.getConfigFile().exists()) {
xmlController.saveSettings(); // save the settings file with default values if it doesn't exist
}
xmlController.loadSettings();
public static void main(String[] args) {
if(System.getProperty("os.name").equals("Windows")){
System.setProperty("logFilename", userHome + "/Documents/HomeFlix/app.log");
File logFile = new File(userHome + "/Documents/HomeFlix/app.log");
logFile.delete();
}else{
System.setProperty("logFilename", userHome + "/HomeFlix/app.log");
File logFile = new File(userHome + "/HomeFlix/app.log");
logFile.delete();
if (!XMLController.getPosterCache().exists()) {
XMLController.getPosterCache().mkdir();
}
LOGGER = LogManager.getLogger(Main.class.getName());
launch(args);
}
public Stage getPrimaryStage() {
return primaryStage;
}
public void setPrimaryStage(Stage primaryStage) {
this.primaryStage = primaryStage;
}
public AnchorPane getPane( ) {
return pane;
}
public String getFONT_FAMILY() {
return FONT_FAMILY;
}
public void setFONT_FAMILY(String FONT_FAMILY) {
this.FONT_FAMILY = FONT_FAMILY;
}
public File getDirectory() {
return directory;
}
public File getConfigFile() {
return configFile;
}
public File getPosterCache() {
return posterCache;
}
}
}

1221
src/main/java/kellerkinder/HomeFlix/application/MainWindowController.java
File diff suppressed because it is too large
View File

239
src/main/java/kellerkinder/HomeFlix/application/SeriesDetailView.java

@ -0,0 +1,239 @@
/**
* Project-HomeFlix
*
* Copyright 2016-2019 <@Seil0>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*/
package kellerkinder.HomeFlix.application;
import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.jfoenix.controls.JFXButton;
import javafx.animation.FadeTransition;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.ScrollPane.ScrollBarPolicy;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.text.Text;
import javafx.util.Duration;
import kellerkinder.HomeFlix.controller.DBController;
import kellerkinder.HomeFlix.controller.XMLController;
import kellerkinder.HomeFlix.datatypes.SeriresDVEpisode;
import kellerkinder.HomeFlix.player.Player;
public class SeriesDetailView {
@FXML private AnchorPane seriesDVPane;
@FXML private ScrollPane scrollPaneEpisodes;
@FXML private HBox hBoxEpisodes;
@FXML private Label lblTitle;
@FXML private Label lblYear;
@FXML private Label lblScore;
@FXML private Label lblCrew;
@FXML private Label lblDirectors;
@FXML private Label lblDirectorsInfo;
@FXML private Label lblWriters;
@FXML private Label lblWritersInfo;
@FXML private Label lblActors;