Browse Source

Merge pull request #22 from Seil0/dev

"plasma vampire" 0.6.0
pull/25/head
Jannik 3 years ago
committed by GitHub
parent
commit
1299748bed
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
93 changed files with 3996 additions and 3121 deletions
  1. +24
    -8
      .classpath
  2. +0
    -3
      .directory
  3. +2
    -0
      .gitignore
  4. +3
    -4
      .project
  5. +5
    -0
      .settings/org.eclipse.core.resources.prefs
  6. +4
    -11
      .settings/org.eclipse.jdt.core.prefs
  7. +4
    -0
      .settings/org.eclipse.m2e.core.prefs
  8. +46
    -0
      CODE_OF_CONDUCT.md
  9. +11
    -7
      README.md
  10. +0
    -1
      bin/.gitignore
  11. BIN
      bin/application/DBController.class
  12. BIN
      bin/application/Main.class
  13. +0
    -115
      bin/application/MainWindow.fxml
  14. BIN
      bin/application/MainWindowController$1.class
  15. BIN
      bin/application/MainWindowController$2.class
  16. BIN
      bin/application/MainWindowController$3.class
  17. BIN
      bin/application/MainWindowController$4.class
  18. BIN
      bin/application/MainWindowController$5.class
  19. BIN
      bin/application/MainWindowController$6.class
  20. BIN
      bin/application/MainWindowController$7.class
  21. BIN
      bin/application/MainWindowController.class
  22. BIN
      bin/application/apiQuery.class
  23. BIN
      bin/application/tableData.class
  24. BIN
      bin/application/updater.class
  25. BIN
      bin/libraries/commons-io-2.5.jar
  26. BIN
      bin/libraries/jfoenix-1.4.0.jar
  27. BIN
      bin/libraries/minimal-json-0.9.4.jar
  28. BIN
      bin/libraries/sqlite-jdbc-3.18.0.jar
  29. +0
    -63
      bin/resources/HomeFlix-Local_de_DE.properties
  30. +0
    -63
      bin/resources/HomeFlix-Local_en_US.properties
  31. +0
    -8
      build.fxbuild
  32. +103
    -0
      pom.xml
  33. +0
    -634
      src/application/DBController.java
  34. +0
    -188
      src/application/Main.java
  35. +0
    -4
      src/application/MainWindow.css
  36. +0
    -115
      src/application/MainWindow.fxml
  37. +0
    -1163
      src/application/MainWindowController.java
  38. +0
    -211
      src/application/apiQuery.java
  39. +0
    -158
      src/application/tableData.java
  40. +0
    -105
      src/application/updater.java
  41. +0
    -202
      src/libraries/Licenses/Apache_License.txt
  42. +0
    -19
      src/libraries/Licenses/MIT_License.txt
  43. BIN
      src/libraries/commons-io-2.5.jar
  44. BIN
      src/libraries/jfoenix-1.4.0.jar
  45. BIN
      src/libraries/minimal-json-0.9.4.jar
  46. BIN
      src/libraries/sqlite-jdbc-3.18.0.jar
  47. +86
    -0
      src/main/java/com/cemu_UI/uiElements/JFXInfoDialog.java
  48. +142
    -0
      src/main/java/com/cemu_UI/uiElements/JFXOkayCancelDialog.java
  49. +98
    -0
      src/main/java/com/cemu_UI/uiElements/JFXTextAreaInfoDialog.java
  50. +218
    -0
      src/main/java/kellerkinder/HomeFlix/application/Main.java
  51. +1104
    -0
      src/main/java/kellerkinder/HomeFlix/application/MainWindowController.java
  52. +590
    -0
      src/main/java/kellerkinder/HomeFlix/controller/DBController.java
  53. +126
    -0
      src/main/java/kellerkinder/HomeFlix/controller/OMDbAPIController.java
  54. +163
    -0
      src/main/java/kellerkinder/HomeFlix/controller/UpdateController.java
  55. +149
    -0
      src/main/java/kellerkinder/HomeFlix/datatypes/FilmTabelDataType.java
  56. +64
    -0
      src/main/java/kellerkinder/HomeFlix/datatypes/SourceDataType.java
  57. +109
    -0
      src/main/resources/css/MainWindow.css
  58. +177
    -0
      src/main/resources/fxml/MainWindow.fxml
  59. +0
    -0
      src/main/resources/icons/Homeflix_Icon_64x64.png
  60. +0
    -0
      src/main/resources/icons/Homeflix_Poster.png
  61. +0
    -0
      src/main/resources/icons/close_black_2048x2048.png
  62. +0
    -0
      src/main/resources/icons/ic_favorite_black_18dp_1x.png
  63. +0
    -0
      src/main/resources/icons/ic_favorite_border_black_18dp_1x.png
  64. +0
    -0
      src/main/resources/icons/ic_play_arrow_black_18dp_1x.png
  65. +0
    -0
      src/main/resources/icons/ic_play_arrow_white_18dp_1x.png
  66. +0
    -0
      src/main/resources/icons/ic_search_black_18dp_1x.png
  67. +0
    -0
      src/main/resources/icons/ic_skip_next_black_18dp_1x.png
  68. +0
    -0
      src/main/resources/icons/ic_skip_next_white_18dp_1x.png
  69. +0
    -0
      src/main/resources/icons/ic_skip_previous_black_18dp_1x.png
  70. +0
    -0
      src/main/resources/icons/ic_skip_previous_white_18dp_1x.png
  71. +2
    -3
      src/main/resources/licenses/apache2.txt
  72. +675
    -0
      src/main/resources/licenses/gnu_gpl3.txt
  73. +1
    -1
      src/main/resources/licenses/mit.txt
  74. +16
    -16
      src/main/resources/locals/HomeFlix-Local_de_DE.properties
  75. +16
    -16
      src/main/resources/locals/HomeFlix-Local_en_US.properties
  76. +20
    -0
      src/main/resources/log4j2.xml
  77. BIN
      src/resources/Homeflix_Icon_64x64.png
  78. BIN
      src/resources/Homeflix_Poster.png
  79. BIN
      src/resources/icons/close_black_2048x2048.png
  80. BIN
      src/resources/icons/ic_favorite_black_18dp_1x.png
  81. BIN
      src/resources/icons/ic_favorite_border_black_18dp_1x.png
  82. BIN
      src/resources/icons/ic_play_arrow_black_18dp_1x.png
  83. BIN
      src/resources/icons/ic_play_arrow_white_18dp_1x.png
  84. BIN
      src/resources/icons/ic_search_black_18dp_1x.png
  85. BIN
      src/resources/icons/ic_skip_next_black_18dp_1x.png
  86. BIN
      src/resources/icons/ic_skip_next_white_18dp_1x.png
  87. BIN
      src/resources/icons/ic_skip_previous_black_18dp_1x.png
  88. BIN
      src/resources/icons/ic_skip_previous_white_18dp_1x.png
  89. +38
    -0
      src/test/java/org/kellerkinder/Project_HomeFlix/AppTest.java
  90. BIN
      updates/ProjectHomeFlix.jar
  91. +0
    -1
      updates/buildNumber.txt
  92. +0
    -1
      updates/downloadLink.txt
  93. +0
    -1
      updates/version.txt

+ 24
- 8
.classpath View File

@ -1,11 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_131"/>
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry kind="lib" path="src/libraries/minimal-json-0.9.4.jar"/>
<classpathentry kind="lib" path="src/libraries/commons-io-2.5.jar"/>
<classpathentry kind="lib" path="src/libraries/jfoenix-1.4.0.jar"/>
<classpathentry kind="lib" path="src/libraries/sqlite-jdbc-3.18.0.jar"/>
<classpathentry kind="output" path="bin"/>
<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>

+ 0
- 3
.directory View File

@ -1,3 +0,0 @@
[Dolphin]
Timestamp=2016,8,15,12,18,4
Version=3

+ 2
- 0
.gitignore View File

@ -47,4 +47,6 @@ Temporary Items
.apdisk
config.xml
.directory
target/
apiKeys.json

+ 3
- 4
.project View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Project HomeFlix</name>
<name>Project-HomeFlix</name>
<comment></comment>
<projects>
</projects>
@ -11,14 +11,13 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.fx.ide.css.nature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

+ 5
- 0
.settings/org.eclipse.core.resources.prefs View File

@ -0,0 +1,5 @@
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

+ 4
- 11
.settings/org.eclipse.jdt.core.prefs View File

@ -1,12 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
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
- 0
.settings/org.eclipse.m2e.core.prefs View File

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

+ 46
- 0
CODE_OF_CONDUCT.md View File

@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at admin@kellerkinder.xyz. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

+ 11
- 7
README.md View File

@ -1,20 +1,24 @@
![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)
[![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).
Project HomeFlix is a Kellerkinder Project, that alowes you to sort all your local saved movies in clean UI.
## 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).
**Due to some changes with the API we use(not provided by us), the query does not work at the moment!**
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/
## Installation
[wiki](https://github.com/Seil0/Project-HomeFlix/wiki)
## screenshots
![Screenshot](https://github.com/Seil0/Seil0.github.io/blob/master/pictures/Project-HomeFlix_MainWindow.png)
Project HomeFlix © 2016-2017 Kellerkinder ([Seil0](https://github.com/Seil0), [Windoofs](https://github.com/Windoofs))
Project-HomeFlix © 2016-2018 Kellerkinder ([Seil0](https://github.com/Seil0), [Windoofs](https://github.com/Windoofs))
www.kellerkinder.xyz

+ 0
- 1
bin/.gitignore View File

@ -1 +0,0 @@
/application/

BIN
bin/application/DBController.class View File


BIN
bin/application/Main.class View File


+ 0
- 115
bin/application/MainWindow.fxml View File

@ -1,115 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXColorPicker?>
<?import com.jfoenix.controls.JFXHamburger?>
<?import com.jfoenix.controls.JFXSlider?>
<?import com.jfoenix.controls.JFXTextField?>
<?import com.jfoenix.controls.JFXToggleButton?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TreeTableView?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.TextFlow?>
<AnchorPane fx:id="anpane" prefHeight="600.0" prefWidth="950.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainWindowController">
<children>
<ScrollPane fx:id="scrollPane" fitToWidth="true" layoutX="408.0" layoutY="44.0" prefHeight="544.0" prefWidth="320.0" AnchorPane.bottomAnchor="12.0" AnchorPane.leftAnchor="408.0" AnchorPane.rightAnchor="222.0" AnchorPane.topAnchor="44.0">
<content>
<TextFlow fx:id="textFlow" accessibleRole="TEXT_AREA" maxHeight="544.0" maxWidth="320.0" visible="true" />
</content>
</ScrollPane>
<TreeTableView fx:id="treeTableViewfilm" layoutX="14.0" layoutY="88.0" prefHeight="500.0" prefWidth="375.0" AnchorPane.bottomAnchor="12.0" AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="568.0" AnchorPane.topAnchor="88.0" />
<JFXButton fx:id="playbtn" contentDisplay="CENTER" layoutX="690.0" layoutY="363.0" onAction="#playbtnclicked" prefHeight="25.0" prefWidth="198.0" AnchorPane.bottomAnchor="212.0" AnchorPane.rightAnchor="12.0">
<font>
<Font name="System Bold" size="14.0" />
</font></JFXButton>
<JFXButton fx:id="openfolderbtn" layoutX="690.0" layoutY="404.0" onAction="#openfolderbtnclicked" prefHeight="25.0" prefWidth="198.0" text="open Folder" AnchorPane.bottomAnchor="171.0" AnchorPane.rightAnchor="12.0">
<font>
<Font name="System Bold" size="14.0" />
</font></JFXButton>
<JFXTextField fx:id="tfsearch" layoutX="12.0" layoutY="44.0" maxWidth="477.0" minWidth="359.0" prefHeight="31.0" prefWidth="370.0" promptText="Suche ..." AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="568.0" AnchorPane.topAnchor="44.0">
<font>
<Font name="Arial" size="12.0" />
</font></JFXTextField>
<ImageView fx:id="image1" fitHeight="297.0" fitWidth="198.0" layoutX="481.0" layoutY="46.0" pickOnBounds="true" preserveRatio="true" AnchorPane.rightAnchor="12.0" AnchorPane.topAnchor="44.0">
<image>
<Image url="@../resources/Homeflix_Poster.png" />
</image></ImageView>
<JFXButton fx:id="returnBtn" contentDisplay="CENTER" layoutX="690.0" layoutY="443.0" onAction="#returnBtnclicked" prefHeight="25.0" prefWidth="90.0" AnchorPane.bottomAnchor="132.0" AnchorPane.rightAnchor="120.0" />
<JFXButton fx:id="forwardBtn" contentDisplay="CENTER" layoutX="798.0" layoutY="443.0" onAction="#forwardBtnclicked" prefHeight="25.0" prefWidth="90.0" AnchorPane.bottomAnchor="132.0" AnchorPane.rightAnchor="12.0" />
<HBox fx:id="topHBox" layoutY="12.0" prefHeight="32.0" prefWidth="900.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<JFXHamburger fx:id="menuHam">
<padding>
<Insets left="3.0" />
</padding>
</JFXHamburger>
</children>
</HBox>
<VBox fx:id="sideMenuVBox" layoutY="32.0" prefHeight="660.0" prefWidth="150.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="32.0">
<children>
<JFXButton fx:id="infoBtn" onAction="#infoBtnclicked" prefHeight="32.0" prefWidth="150.0" textAlignment="CENTER">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<JFXButton fx:id="settingsBtn" onAction="#settingsBtnclicked" prefHeight="37.0" prefWidth="150.0" textAlignment="CENTER">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<JFXButton fx:id="streamingSettingsBtn" onAction="#streamingSettingsBtnclicked" prefHeight="32.0" prefWidth="150.0" textAlignment="CENTER">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<JFXButton fx:id="switchBtn" onAction="#switchBtnclicked" prefHeight="32.0" prefWidth="150.0" textAlignment="CENTER">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<JFXButton fx:id="debugBtn" onAction="#debugBtnclicked" prefHeight="32.0" prefWidth="150.0" text="debugging" textAlignment="CENTER">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
</children>
</VBox>
<AnchorPane fx:id="streamingSettingsAnchor" layoutX="138.0" layoutY="33.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
<children>
<JFXTextField fx:id="tfStreamingPath" layoutX="14.0" layoutY="14.0" onAction="#tfStreamingPathAction" prefWidth="250.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="5.0" />
<JFXButton fx:id="streamingDirectoryBtn" layoutX="263.0" layoutY="2.0" onAction="#streamingDirectoryBtnAction" prefHeight="25.0" prefWidth="115.0" AnchorPane.leftAnchor="260.0" AnchorPane.topAnchor="5.0" />
<TableView fx:id="tableViewStreamingdata" layoutX="14.0" layoutY="44.0" prefHeight="517.0" prefWidth="370.0" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="40.0" />
</children></AnchorPane>
<AnchorPane fx:id="settingsAnchor" layoutX="160.0" layoutY="44.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
<children>
<JFXTextField fx:id="tfPath" layoutX="14.0" layoutY="81.0" onAction="#tfPathAction" prefWidth="250.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="79.0" />
<JFXButton fx:id="directoryBtn" layoutX="276.0" layoutY="82.0" onAction="#directoryBtnAction" prefHeight="25.0" AnchorPane.leftAnchor="269.0" AnchorPane.topAnchor="82.0" />
<JFXColorPicker fx:id="mainColor" layoutX="118.0" layoutY="130.0" onAction="#mainColorAction" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="130.0" />
<Label fx:id="fontsizeLabel" layoutX="14.0" layoutY="179.0" text="Fontsize" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="175.0" />
<JFXSlider fx:id="sliderFontSize" layoutX="118.0" layoutY="177.0" max="48.0" min="2.0" prefWidth="250.0" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="177.0" />
<ChoiceBox fx:id="cbLocal" layoutX="118.0" layoutY="208.0" prefWidth="150.0" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="208.0" />
<JFXButton fx:id="updateBtn" layoutX="16.0" layoutY="269.0" onAction="#updateBtnAction" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="253.0" />
<Label fx:id="autoUpdateLabel" layoutX="14.0" layoutY="310.0" prefHeight="17.0" text="check at startup for updates:" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="298.0" />
<JFXToggleButton fx:id="autoupdateBtn" layoutX="14.0" layoutY="336.0" onAction="#autoupdateBtnAction" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="320.0" />
<Label fx:id="versionLabel" layoutX="14.0" layoutY="418.0" text="Label" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="396.0" />
<Label fx:id="settingsHead1Label" layoutX="14.0" layoutY="24.0" text="HomeFlix Settings" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="24.0">
<font>
<Font name="System Bold" size="14.0" />
</font>
</Label>
<Label fx:id="mainColorLabel" layoutX="14.0" layoutY="134.0" prefHeight="25.0" text="Main-Color" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="130.0" />
<Label fx:id="localLabel" layoutX="14.0" layoutY="207.0" text="Local" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="212.0" />
</children>
</AnchorPane>
</children>
</AnchorPane>

BIN
bin/application/MainWindowController$1.class View File


BIN
bin/application/MainWindowController$2.class View File


BIN
bin/application/MainWindowController$3.class View File


BIN
bin/application/MainWindowController$4.class View File


BIN
bin/application/MainWindowController$5.class View File


BIN
bin/application/MainWindowController$6.class View File


BIN
bin/application/MainWindowController$7.class View File


BIN
bin/application/MainWindowController.class View File


BIN
bin/application/apiQuery.class View File


BIN
bin/application/tableData.class View File


BIN
bin/application/updater.class View File


BIN
bin/libraries/commons-io-2.5.jar View File


BIN
bin/libraries/jfoenix-1.4.0.jar View File


BIN
bin/libraries/minimal-json-0.9.4.jar View File


BIN
bin/libraries/sqlite-jdbc-3.18.0.jar View File


+ 0
- 63
bin/resources/HomeFlix-Local_de_DE.properties View File

@ -1,63 +0,0 @@
#HomeFlix-Local_de_DE.properties German Local
#main window translations
info = Info
settings = Einstellungen
streamingSettings = Stream Einst.
tfSearch = Suche...
openFolder = Ordner \u00F6ffnen
#settings translations
settingsHead1Label = HomeFlix Einstellungen
tfPath = Pfad...
chooseFolder = Ordner ausw\u00E4hlen
mainColorLabel = Hauptfarbe:
fontsizeLabel = Schriftgr\u00F6\u00DFe:
localLabel = Sprache:
checkUpdates = Auf Update pr\u00FCfen
checkingUpdates = Es wird nach Updates gesucht...
updateBtnavail = Update verf\u00FCgbar
updateBtnNotavail = Kein Update verf\u00FCgbar
autoUpdateLabel = beim Start nach Updates suchen:
version = Version:
#column translations
columnName = Name
columnRating = Bewertung
columnStreamUrl = Datei Name
columnResolution = Aufl\u00F6sung
columnSeason = Staffel
columnYear = Jahr
#error translations
errorUpdateV = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not check update version (nvc)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
errorUpdateD = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not download update files (ndf)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
errorPlay = Beim \u00F6ffnen der Datei ist ein Fehler aufgetreten! \nError: could not open file (nof) \nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
errorMode = Oh, da lief etwas falsch! Da hat jemand einen falschen Modus verwendet. \nError: mode unknow (muk)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
errorOpenStream = Beim \u00F6ffnen des Streams ist ein Fehler aufgetreten!
errorLoad = Beim laden der Einstellungen ist ein Fehler aufgetreten!
errorSave = Beim speichern der Einstellungen ist ein Fehler aufgetreten!
noFilmFound = Kein Film mit diesem Titel gefunden!
vlcNotInstalled = Um einen Film abspielen wird der VLC Media Player ben\u00F6tigt!
infoText = \nMaintainer: seilo@kellerkinder.xyz und \nhendrik.schutter@coptersicht.de \n(c) 2016-2017 Kellerkinder www.kellerkinder.xyz
#textFlow translations
title = Titel
year = Jahr
rating = Einstufung
publishedOn = Ver\u00F6ffentlicht am
duration = Laufzeit
genre = Gener
director = Regisseur
writer = Autor
actors = Schauspieler
plot = Beschreibung
language = Original Sprache
country = Produktionsland
awards = Auszeichnungen
metascore = Metascore
imdbRating = IMDB-Bewertung
type = Type
firstStartHeader = Es ist kein Stammverzeichnis f\u00FCr Filme angegeben!
firstStartContent = Stammverzeichniss angeben?

+ 0
- 63
bin/resources/HomeFlix-Local_en_US.properties View File

@ -1,63 +0,0 @@
#HomeFlix-Local_en_US.properties US-English Local and default
#main window translations
info = Info
settings = Settings
streamingSettings = Stream Settings
tfSearch = Search...
openFolder = open Folder
#settings translations
settingsHead1Label = HomeFlix Settings
tfPath = Path...
chooseFolder = choose Directory
mainColorLabel = main color:
fontsizeLabel = font size:
localLabel = local:
checkUpdates = check for updates
checkingUpdates = checking for updates...
updateBtnavail = update available
updateBtnNotavail = no update available
autoUpdateLabel = check at startup for updates:
version = Version:
#column translations
columnName = Name
columnRating = Rating
columnStreamUrl = File Name
columnResolution = Resolution
columnSeason = Season
columnYear = Year
#error translations
errorUpdateV = An error has occurred during update! \nError: could not check update version (nvc) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
errorUpdateD = An error has occurred during update! \nError: could not download update files (ndf) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
errorPlay = An error has occurred during opening the file! \nError: could not open file (nof) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
errorMode = Oh, something went wrong! It seems someone has used a wrong mode. \nError: mode unknow (muk) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
errorOpenStream = An error has occurred during opening the stream!
errorLoad = An error occurred while loading the settings!
errorSave = An error occurred while saving the settings!
noFilmFound = No film with this title found!
vlcNotInstalled = VLC Media Player is required to play a movie!
infoText = \nMaintainer: seilo@kellerkinder.xyz and \nhendrik.schutter@coptersicht.de \n(c) 2016-2017 Kellerkinder www.kellerkinder.xyz
#textFlow translations
title = Title
year = Year
rating = Rating
publishedOn = published on
duration = Duration
genre = Gener
director = Director
writer = Writer
actors = Actors
plot = Plot
language = Language
country = Country
awards = Awards
metascore = Metascore
imdbRating = IMDB-Rating
type = Type
firstStartHeader = There is no root directory for movies!
firstStartContent = Specify a root directory?

+ 0
- 8
build.fxbuild View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="ASCII"?>
<anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build">
<deploy>
<application name="Project HomeFlix"/>
<info/>
</deploy>
<signjar/>
</anttasks:AntTask>

+ 103
- 0
pom.xml View File

@ -0,0 +1,103 @@
<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>

+ 0
- 634
src/application/DBController.java View File

@ -1,634 +0,0 @@
/**
* @author Jannik
* DBController for Project HomeFlix
* connection is in manual commit!
*/
package application;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonArray;
import com.eclipsesource.json.JsonObject;
import com.eclipsesource.json.JsonValue;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
public class DBController {
public DBController(MainWindowController m, Main main) {
mainWindowController = m;
this.main = main;
}
private MainWindowController mainWindowController;
private Main main;
private String DB_PATH = System.getProperty("user.home") + "\\Documents\\HomeFlix" + "\\" + "Homeflix.db"; //path to database file
private Image favorite_black = new Image("resources/icons/ic_favorite_black_18dp_1x.png");
private Image favorite_border_black = new Image("resources/icons/ic_favorite_border_black_18dp_1x.png");
private List<String> filmsdbAll = new ArrayList<String>();
private List<String> filmsdbLocal = new ArrayList<String>();
private List<String> filmsdbStream = new ArrayList<String>();
private List<String> filmsdbStreamURL = new ArrayList<String>();
private List<String> filmsAll = new ArrayList<String>();
private List<String> filmsDir = new ArrayList<String>();
private List<String> filmsStream = new ArrayList<String>();
private List<String> filmsStreamURL = new ArrayList<String>();
private List<String> filmsStreamData = new ArrayList<String>();
Connection connection = null;
public void main() {
if (System.getProperty("os.name").equals("Linux")) {
DB_PATH = System.getProperty("user.home") + "/HomeFlix/Homeflix.db";
}else{
DB_PATH = System.getProperty("user.home") + "\\Documents\\HomeFlix" + "\\" + "Homeflix.db";
}
try {
// create a database connection
connection = DriverManager.getConnection("jdbc:sqlite:" + DB_PATH);
connection.setAutoCommit(false); //AutoCommit to false -> manual commit is active
} catch (SQLException e) {
// if the error message is "out of memory", it probably means no database file is found
System.err.println(e.getMessage());
}
//close connection -> at the moment this kills the program
// finally {
// try {
// if (connection != null)
// connection.close();
// } catch (SQLException e) {
// // connection close failed.
// System.err.println(e);
// }
// }
}
void createDatabase() {
System.out.println("<==========starting loading sql==========>");
PreparedStatement ps;
PreparedStatement psS;
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("create table if not exists film_local (rating, titel, streamUrl, favIcon, cached)");
stmt.executeUpdate("create table if not exists film_streaming (year, season, episode, rating, resolution, titel, streamUrl, favIcon, cached)");
stmt.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
try {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM film_local");
while (rs.next()) {
filmsdbLocal.add(rs.getString(2));
}
stmt.close();
rs.close();
rs = stmt.executeQuery("SELECT * FROM film_streaming;");
while (rs.next()) {
filmsdbStream.add(rs.getString(6));
filmsdbStreamURL.add(rs.getString(7));
}
stmt.close();
rs.close();
}catch (SQLException ea){
System.err.println("Ups! an error occured!");
ea.printStackTrace();
}
//getting all files from the selected directory TODO rework
String[] entries = new File(mainWindowController.getPath()).list();
if(mainWindowController.getPath().equals("") || mainWindowController.getPath() == null){
System.out.println("Kein Pfad angegeben"); //if path == null or ""
}else if(new File(mainWindowController.getPath()).exists()) {
System.out.println(entries.length);
for(int i=0;i!=entries.length;i++){
filmsDir.add(cutOffEnd(entries[i]));
}
} else {
System.out.println(mainWindowController.getPath() + "dosen't exist!");
}
//getting all entries from the streaming lists
for(int v=0; v< mainWindowController.streamingData.size(); v++){
String fileName = mainWindowController.getStreamingPath()+"/"+mainWindowController.streamingData.get(v).getStreamUrl();
try {
JsonObject object = Json.parse(new FileReader(fileName)).asObject();
JsonArray items = object.get("entries").asArray();
for (JsonValue item : items) {
filmsStream.add(item.asObject().getString("titel",""));
filmsStreamURL.add(item.asObject().getString("streamUrl",""));
filmsStreamData.add(fileName);
}
} catch (IOException e) {
e.printStackTrace();
}
}
//add all entries to filmsAll and filmsdbAl, for later comparing
filmsAll.addAll(filmsDir);
filmsAll.addAll(filmsStream);
filmsdbAll.addAll(filmsdbLocal);
filmsdbAll.addAll(filmsdbStream);
System.out.println("films in directory: "+filmsAll.size());
System.out.println("filme in db: "+filmsdbAll.size());
/**
* if filmsdbAll.size() == 0 database is empty, we need to fill it
* else check if there is something to remove or to add
* TODO separate local and streaming for better error handling
*/
if(filmsdbAll.size() == 0){
System.out.println("creating entries ...");
try{
ps = connection.prepareStatement("insert into film_local values (?, ?, ?, ?, ?)");
psS = connection.prepareStatement("insert into film_streaming values (?, ?, ?, ?, ?, ?, ?, ?, ?)");
if(mainWindowController.getPath().equals("") || mainWindowController.getPath() == null){
System.out.println("Kein Pfad angegeben"); //if path == null or ""
}else if(new File(mainWindowController.getPath()).exists()){
for(int j=0;j!=entries.length;j++) //goes through all the files in the directory
{
ps.setInt(1, 0); //rating as integer 1. column
ps.setString(2, cutOffEnd(entries[j])); //name as String without ending 2. column
ps.setString(3,entries[j]); //path as String 3. column
ps.setString(4, "favorite_border_black");
ps.setBoolean(5, false);
ps.addBatch(); // add command to prepared statement
}
}
if(mainWindowController.getStreamingPath().equals("")||mainWindowController.getStreamingPath().equals(null)){
System.out.println("Kein Pfad angegeben"); //if path == null or ""
}else{
for(int i=0; i< mainWindowController.streamingData.size(); i++){
String fileNamea = mainWindowController.getStreamingPath()+"/"+mainWindowController.streamingData.get(i).getStreamUrl();
try {
JsonObject object = Json.parse(new FileReader(fileNamea)).asObject();
JsonArray items = object.get("entries").asArray();
for (JsonValue item : items) {
psS.setInt(1, item.asObject().getInt("year", 0));
psS.setInt(2, item.asObject().getInt("season", 0));
psS.setInt(3, item.asObject().getInt("episode", 0));
psS.setInt(4, 0);
psS.setString(5, item.asObject().getString("resolution", ""));
psS.setString(6, item.asObject().getString("titel",""));
psS.setString(7, item.asObject().getString("streamUrl", ""));
psS.setString(8, "favorite_border_black");
psS.setBoolean(9, false);
psS.addBatch(); // add command to prepared statement
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
ps.executeBatch(); //execute statement to write entries into table
psS.executeBatch();
connection.commit();
ps.close();
psS.close();
}catch (SQLException ea) {
System.err.println("Ups! an error occured!");
ea.printStackTrace();
}
}else {
try {
try {
checkAddEntry(); //check if added a new file
} catch (IOException e) {
e.printStackTrace();
}
checkRemoveEntry(); //check if removed a file
} catch (SQLException e) {
e.printStackTrace();
}
}
//start of cache-table
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate( "create table if not exists cache (streamUrl, Title, Year, Rated, Released, Runtime, Genre, Director, Writer," //streamUrl is primary key
+" Actors, Plot, Language, Country, Awards, Metascore, imdbRating, imdbVotes, imdbID, Type, Poster, Response)");
stmt.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
//loading data from database to mainWindowController
void loadData(){
System.out.println("loading data to mwc ...");
try {
//load local Data
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM film_local ORDER BY titel");
while (rs.next()) {
if(rs.getString(4).equals("favorite_black")){
mainWindowController.localFilms.add( new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_black),rs.getBoolean(5)));
}else{
mainWindowController.localFilms.add( new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_border_black),rs.getBoolean(5)));
}
}
stmt.close();
rs.close();
//load streaming Data FIXME check if there are streaming data before loading -> maybe there is an issue now
rs = stmt.executeQuery("SELECT * FROM film_streaming ORDER BY titel;");
while (rs.next()) {
if(rs.getString(8).equals("favorite_black")){
mainWindowController.streamingFilms.add(new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_black),rs.getBoolean(9)));
}else{
mainWindowController.streamingFilms.add(new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_border_black),rs.getBoolean(9)));
}
}
stmt.close();
rs.close();
} catch (SQLException e) {
System.err.println("Ups! an error occured!");
e.printStackTrace();
}
System.out.println("<==========finished loading sql==========>");
}
//Refreshes the data in mainWindowController.newDaten and mainWindowController.streamData
//FIXME it seems that there is an issue at the moment with streaming refreshing wrong entry if there is more than one with the same name
void refresh(String name,int i) throws SQLException{
System.out.println("refresh ...");
Statement stmt;
try {
stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM film_local WHERE titel = \""+name+"\";" );
if(rs.getString(4).equals("favorite_black")){
mainWindowController.localFilms.set(i, new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_black),rs.getBoolean(5)));
}else{
mainWindowController.localFilms.set(i, new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_border_black),rs.getBoolean(5)));
}
stmt.close();
rs.close();
} catch (SQLException e) {
try {
stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM film_streaming WHERE titel = \""+name+"\";" );
if(rs.getString(8).equals("favorite_black")){
mainWindowController.streamingFilms.set(i,new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_black),rs.getBoolean(9)));
}else{
mainWindowController.streamingFilms.set(i,new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_border_black),rs.getBoolean(9)));
}
stmt.close();
rs.close();
} catch (SQLException e1) {
System.err.println("Ups! an error occured!");
e1.printStackTrace();
}
}
}
/**
* check if there are any entries that have been removed from the film-directory
* @throws SQLException
*/
private void checkRemoveEntry() throws SQLException{
System.out.println("checking for entrys to remove to DB ...");
Statement stmt = connection.createStatement();
for(int a=0; a<filmsdbLocal.size(); a++){
if(!filmsDir.contains(filmsdbLocal.get(a))){
try {
stmt.executeUpdate("delete from film_local where titel = \""+filmsdbLocal.get(a) + "\"");
connection.commit();
stmt.close();
System.out.println("removed \""+filmsdbLocal.get(a)+"\" from databsae");
} catch (Exception e) {
e.printStackTrace();
}
}
}
for(int b=0; b<filmsdbStreamURL.size(); b++){
if(!filmsStreamURL.contains(filmsdbStreamURL.get(b))){
try {
stmt.executeUpdate("delete from film_streaming where titel = \"" + filmsdbStream.get(b) + "\"");
connection.commit();
stmt.close();
System.out.println("removed \""+filmsdbStream.get(b)+"\" from databsae");
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
/**
* check if there are new films in the film-directory
* @throws SQLException
* @throws FileNotFoundException
* @throws IOException
* if lastName != filmsStreamData.get(b) then set i = 0, file changed
*/
private void checkAddEntry() throws SQLException, FileNotFoundException, IOException{
String lastName = "";
System.out.println("checking for entrys to add to DB ...");
String[] entries = new File(mainWindowController.getPath()).list();
Statement stmt = connection.createStatement();
PreparedStatement ps = connection.prepareStatement("insert into film_streaming values (?, ?, ?, ?, ?, ?, ?, ?, ?)");
int i=0;
for(int a=0; a<filmsDir.size(); a++){
if(!filmsdbLocal.contains(filmsDir.get(a))){
stmt.executeUpdate("insert into film_local values (0, \""+cutOffEnd(entries[a])+"\", \""+entries[a]+"\",\"favorite_border_black\",0)");
connection.commit();
stmt.close();
System.out.println("added \""+filmsDir.get(a)+"\" to databsae");
}
}
for(int b=0; b<filmsStreamURL.size(); b++){
if(filmsdbStreamURL.contains(filmsStreamURL.get(b))) {
} else {
if(lastName != "" && lastName != filmsStreamData.get(b)) {
i = 0;
}
lastName = filmsStreamData.get(b);
JsonObject object = Json.parse(new FileReader(filmsStreamData.get(b))).asObject();
JsonArray items = object.get("entries").asArray();
System.out.println(items.size()+", "+i+"; "+b);
String streamURL = items.get(i).asObject().getString("streamUrl","");
String titel = items.get(i).asObject().getString("titel","");
if(streamURL.equals(filmsStreamURL.get(b))){
System.out.println("added \""+titel+"\"");
ps.setInt(1, items.get(i).asObject().getInt("year", 0));
ps.setInt(2, items.get(i).asObject().getInt("season", 0));
ps.setInt(3, items.get(i).asObject().getInt("episode", 0));
ps.setInt(4, 0);
ps.setString(5, items.get(i).asObject().getString("resolution", ""));
ps.setString(6, items.get(i).asObject().getString("titel",""));
ps.setString(7, items.get(i).asObject().getString("streamUrl", ""));
ps.setString(8, "favorite_border_black");
ps.setBoolean(9, false);
ps.addBatch(); // adds the entry
}
i++;
}
}
ps.executeBatch();
connection.commit();
ps.close();
}
void ausgeben(){
System.out.println("Outputting all entries ... \n");
try {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM film_local");
while (rs.next()) {
System.out.println(rs.getString(1));
System.out.println(rs.getString(2));
System.out.println(rs.getString(3));
System.out.println(rs.getString(4));
System.out.println(rs.getString(5)+"\n");
}
stmt.close();
rs.close();
System.out.println("Streaming Entries: \n");
rs = stmt.executeQuery("SELECT * FROM film_streaming;");
while (rs.next()) {
System.out.println(rs.getString(1));
System.out.println(rs.getString(2));
System.out.println(rs.getString(3));
System.out.println(rs.getString(4));
System.out.println(rs.getString(5));
System.out.println(rs.getString(6));
System.out.println(rs.getString(7));
System.out.println(rs.getString(8));
System.out.println(rs.getString(9)+"\n");
}
stmt.close();
rs.close();
} catch (SQLException e) {
System.err.println("Ups! an error occured!");
e.printStackTrace();
}
}
//get favorite status
void getFavStatus(String name){
try{
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT titel, rating, favIcon FROM film_local WHERE titel = \""+name+"\";" ); //SQL Befehl
System.out.println("local:"+rs.getString("rating")+", "+rs.getString("titel")+", "+rs.getString("favIcon"));
stmt.close();
rs.close();
}catch(SQLException e){
try {
Statement stmtS = connection.createStatement();
ResultSet rsS = stmtS.executeQuery("SELECT titel, rating, favIcon FROM film_streaming WHERE titel = \""+name+"\";" );
System.out.println("streaming:"+rsS.getString("rating")+", "+rsS.getString("titel")+", "+rsS.getString("favIcon"));
stmtS.close();
rsS.close();
} catch (SQLException e1) {
System.out.println("Ups! an error occured!");
e1.printStackTrace();
}
}
}
//set rating=0 and favorite_border_black
void dislike(String name,String streamUrl){
System.out.println("defavorisieren ...");
try{
Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE film_local SET rating=0,favIcon='favorite_border_black' WHERE titel=\""+name+"\";");
connection.commit();
stmt.close();
}catch(SQLException e){
System.out.println("Ups! an error occured!");
e.printStackTrace();
}
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE film_streaming SET rating=0,favIcon='favorite_border_black' WHERE streamUrl=\""+streamUrl+"\";");
connection.commit();
stmt.close();
} catch (SQLException e1) {
System.out.println("Ups! an error occured!");
e1.printStackTrace();
}
}
//set rating=1 and favorite_black
void like(String name,String streamUrl){
System.out.println("favorisieren ...");
try{
Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE film_local SET rating=1,favIcon='favorite_black' WHERE titel=\""+name+"\";");
connection.commit();
stmt.close();
}catch(SQLException e){
System.out.println("Ups! an error occured!");
e.printStackTrace();
}
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE film_streaming SET rating=1,favIcon='favorite_black' WHERE streamUrl=\""+streamUrl+"\";");
connection.commit();
stmt.close();
} catch (SQLException e1) {
System.out.println("Ups! an error occured!");
e1.printStackTrace();
}
}
void setCached(String streamUrl) throws SQLException{
try{
Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE film_local SET cached=1 WHERE streamUrl=\""+streamUrl+"\";");
connection.commit();
stmt.close();
}catch(SQLException e){
System.out.println("Ups! an error occured!");
e.printStackTrace();
}
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE film_streaming SET cached=1 WHERE streamUrl=\""+streamUrl+"\";");
connection.commit();
stmt.close();
} catch (SQLException e1) {
System.out.println("Ups! an error occured!");
e1.printStackTrace();
}
}
void addCache( String streamUrl, String Title, String Year, String Rated, String Released, String Runtime, String Genre, String Director,
String Writer, String Actors, String Plot, String Language, String Country, String Awards, String Metascore, String imdbRating,
String Type, String imdbVotes, String imdbID, String Poster, String Response) throws SQLException{
PreparedStatement ps = connection.prepareStatement("insert into cache values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
System.out.println("adding to cache: " + Title);
ps.setString(1,streamUrl);
ps.setString(2,Title);
ps.setString(3,Year);
ps.setString(4,Rated);
ps.setString(5,Released);
ps.setString(6,Runtime);
ps.setString(7,Genre);
ps.setString(8,Director);
ps.setString(9,Writer);
ps.setString(10,Actors);
ps.setString(11,Plot);
ps.setString(12,Language);
ps.setString(13,Country);
ps.setString(14,Awards);
ps.setString(15,Metascore);
ps.setString(16,imdbRating);
ps.setString(17,imdbVotes);
ps.setString(18,imdbID);
ps.setString(19,Type);
ps.setString(20,Poster);
ps.setString(21,Response);
ps.addBatch();
ps.executeBatch();
connection.commit();
ps.close();
System.out.println("done!");
}
void readCache(String streamUrl){
try{
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM cache WHERE streamUrl=\""+streamUrl+"\";");
ArrayList<Text> nameText = new ArrayList<Text>();
ArrayList<Text> responseText = new ArrayList<Text>();
String fontFamily = main.getFONT_FAMILY();
Image im;
int fontSize = (int) Math.round(mainWindowController.size);
int j=2;
nameText.add(0, new Text(mainWindowController.title+": "));
nameText.add(1, new Text(mainWindowController.year+": "));
nameText.add(2, new Text(mainWindowController.rating+": "));
nameText.add(3, new Text(mainWindowController.publishedOn+": "));
nameText.add(4, new Text(mainWindowController.duration+": "));
nameText.add(5, new Text(mainWindowController.genre+": "));
nameText.add(6, new Text(mainWindowController.director+": "));
nameText.add(7, new Text(mainWindowController.writer+": "));
nameText.add(8, new Text(mainWindowController.actors+": "));
nameText.add(9, new Text(mainWindowController.plot+": "));
nameText.add(10, new Text(mainWindowController.language+": "));
nameText.add(11, new Text(mainWindowController.country+": "));
nameText.add(12, new Text(mainWindowController.awards+": "));
nameText.add(13, new Text(mainWindowController.metascore+": "));
nameText.add(14, new Text(mainWindowController.imdbRating+": "));
nameText.add(15, new Text(mainWindowController.type+": "));
for(int i=0; i<15; i++){
responseText.add(new Text(rs.getString(j)+"\n"));
j++;
}
responseText.add(new Text(rs.getString(19)+"\n"));
im = new Image(new File(rs.getString(20)).toURI().toString());
stmt.close();
rs.close();
for(int i=0; i<nameText.size(); i++){
nameText.get(i).setFont(Font.font (fontFamily, FontWeight.BOLD, fontSize));
responseText.get(i).setFont(Font.font(fontFamily, fontSize));
}
mainWindowController.textFlow.getChildren().remove(0, mainWindowController.textFlow.getChildren().size());
for(int i=0;i<nameText.size(); i++){
mainWindowController.textFlow.getChildren().addAll(nameText.get(i),responseText.get(i));
}
try{
mainWindowController.image1.setImage(im);
}catch (Exception e){
mainWindowController.image1.setImage(new Image("resources/icons/close_black_2048x2048.png"));
e.printStackTrace();
}
mainWindowController.image1.setImage(im);
}catch (SQLException e) {
System.out.println("Ups! an error occured!");
e.printStackTrace();
}
}
//removes the ending
private String cutOffEnd (String str) {
if (str == null) return null;
int pos = str.lastIndexOf(".");
if (pos == -1) return str;
return str.substring(0, pos);
}
}

+ 0
- 188
src/application/Main.java View File

@ -1,188 +0,0 @@
/**
* Project HomeFlix
*
* Copyright 2016-2017 <admin@kellerkinder>
*
* 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 application;
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import java.util.Optional;
import java.util.ResourceBundle;
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;
public class Main extends Application {
Stage primaryStage;
private String path;
String currentWorkingDirectory;
private String COLOR = "ee3523";
private String FONT_FAMILY = "System";
private String mode = "local"; //local or streaming TODO
private String local = System.getProperty("user.language")+"_"+System.getProperty("user.country");
private boolean AUTO_UPDATE = false;
private double FONT_SIZE = 17;
private ResourceBundle bundle;
private MainWindowController mainWindowController;
private File directory;
private File settingsFile;
private File posterCache;
private String dirWin = System.getProperty("user.home") + "/Documents/HomeFlix"; //Windows: C:/Users/"User"/Documents/HomeFlix
private String dirLinux = System.getProperty("user.home") + "/HomeFlix"; //Linux: /home/"User"/HomeFlix
@Override
public void start(Stage primaryStage) throws IOException {
currentWorkingDirectory = new java.io.File( "." ).getCanonicalPath();
this.primaryStage = primaryStage;
mainWindow();
}
private void mainWindow(){
try {
FXMLLoader loader = new FXMLLoader(Main.class.getResource("MainWindow.fxml"));
AnchorPane pane = loader.load();
primaryStage.setMinHeight(600.00);
primaryStage.setMinWidth(900.00);
primaryStage.setResizable(false);
primaryStage.setTitle("Project HomeFlix");
primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/resources/Homeflix_Icon_64x64.png"))); //adds application icon
mainWindowController = loader.getController(); //Link of FXMLController and controller class
mainWindowController.setAutoUpdate(AUTO_UPDATE); //set auto-update
mainWindowController.setCurrentWorkingDirectory(currentWorkingDirectory);
mainWindowController.setMain(this); //call setMain
/**Linux else Windows, check if directory & config exist
* Windows: config file: C:/Users/"User"/Documents/HomeFlix/config.xml
* directory: C:/Users/"User"/Documents/HomeFlix
* Linux: config file: /home/"User"/HomeFlix/config.xml
* directory: /home/"User"/HomeFlix
*/
if(System.getProperty("os.name").equals("Linux")) {
directory = new File(dirLinux);
settingsFile = new File(dirLinux + "/config.xml");
} else {
directory = new File(dirWin);
settingsFile = new File(dirWin + "/config.xml");
}
posterCache = new File(directory+"/posterCache");
if(!settingsFile.exists()){
directory.mkdir();
mainWindowController.setPath(firstStart());
mainWindowController.setStreamingPath(directory.getAbsolutePath());
mainWindowController.setColor(COLOR);
mainWindowController.setSize(FONT_SIZE);
mainWindowController.setAutoUpdate(AUTO_UPDATE);
mainWindowController.setLocal(local);
mainWindowController.setMode(mode);
mainWindowController.saveSettings();
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); //start again (preventing Bugs)
System.exit(0); //finishes it self
}
if(!posterCache.exists()) {
posterCache.mkdir();
}
mainWindowController.loadSettings();
mainWindowController.loadStreamingSettings();
mainWindowController.initUI();
mainWindowController.initActions();
mainWindowController.initTabel();
mainWindowController.setLocalUI();
mainWindowController.applyColor(); //set theme color
mainWindowController.dbController.main(); //initialize database controller
mainWindowController.dbController.createDatabase(); //creating the database
mainWindowController.dbController.loadData(); //loading data from database to mainWindowController
mainWindowController.addDataUI();
Scene scene = new Scene(pane); //create new scene, append pane to scene
scene.getStylesheets().add(Main.class.getResource("MainWindow.css").toExternalForm());
primaryStage.setScene(scene); //append scene to stage
primaryStage.show(); //show stage
} catch (IOException e) {
e.printStackTrace();
}
}
//Method for first Start
private String firstStart(){
MainWindowController.firststart = true;
switch(System.getProperty("user.language")+"_"+System.getProperty("user.country")){
case "en_US": bundle = ResourceBundle.getBundle("resources.HomeFlix-Local", Locale.US); //us_english
break;
case "de_DE": bundle = ResourceBundle.getBundle("resources.HomeFlix-Local", Locale.GERMAN); //German
break;
default: bundle = ResourceBundle.getBundle("resources.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();
} else {
path = "";
}
return path;
}
public static void main(String[] args) {
launch(args);
}
public String getFONT_FAMILY() {
return FONT_FAMILY;
}
public void setFONT_FAMILY(String FONT_FAMILY) {
this.FONT_FAMILY = FONT_FAMILY;
}
public File getPosterCache() {
return posterCache;
}
public void setPosterCache(File posterCache) {
this.posterCache = posterCache;
}
}

+ 0
- 4
src/application/MainWindow.css View File

@ -1,4 +0,0 @@
.jfx-hamburgerW StackPane { -fx-background-color: white;
-fx-background-radius: 5px; }
.jfx-hamburgerB StackPane { -fx-background-color: black;
-fx-background-radius: 5px; }

+ 0
- 115
src/application/MainWindow.fxml View File

@ -1,115 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXColorPicker?>
<?import com.jfoenix.controls.JFXHamburger?>
<?import com.jfoenix.controls.JFXSlider?>
<?import com.jfoenix.controls.JFXTextField?>
<?import com.jfoenix.controls.JFXToggleButton?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TreeTableView?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.TextFlow?>
<AnchorPane fx:id="anpane" prefHeight="600.0" prefWidth="950.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainWindowController">
<children>
<ScrollPane fx:id="scrollPane" fitToWidth="true" layoutX="408.0" layoutY="44.0" prefHeight="544.0" prefWidth="320.0" AnchorPane.bottomAnchor="12.0" AnchorPane.leftAnchor="408.0" AnchorPane.rightAnchor="222.0" AnchorPane.topAnchor="44.0">
<content>
<TextFlow fx:id="textFlow" accessibleRole="TEXT_AREA" maxHeight="544.0" maxWidth="320.0" visible="true" />
</content>
</ScrollPane>
<TreeTableView fx:id="treeTableViewfilm" layoutX="14.0" layoutY="88.0" prefHeight="500.0" prefWidth="375.0" AnchorPane.bottomAnchor="12.0" AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="568.0" AnchorPane.topAnchor="88.0" />
<JFXButton fx:id="playbtn" contentDisplay="CENTER" layoutX="690.0" layoutY="363.0" onAction="#playbtnclicked" prefHeight="25.0" prefWidth="198.0" AnchorPane.bottomAnchor="212.0" AnchorPane.rightAnchor="12.0">
<font>
<Font name="System Bold" size="14.0" />
</font></JFXButton>
<JFXButton fx:id="openfolderbtn" layoutX="690.0" layoutY="404.0" onAction="#openfolderbtnclicked" prefHeight="25.0" prefWidth="198.0" text="open Folder" AnchorPane.bottomAnchor="171.0" AnchorPane.rightAnchor="12.0">
<font>
<Font name="System Bold" size="14.0" />
</font></JFXButton>
<JFXTextField fx:id="tfsearch" layoutX="12.0" layoutY="44.0" maxWidth="477.0" minWidth="359.0" prefHeight="31.0" prefWidth="370.0" promptText="Suche ..." AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="568.0" AnchorPane.topAnchor="44.0">
<font>
<Font name="Arial" size="12.0" />
</font></JFXTextField>
<ImageView fx:id="image1" fitHeight="297.0" fitWidth="198.0" layoutX="481.0" layoutY="46.0" pickOnBounds="true" preserveRatio="true" AnchorPane.rightAnchor="12.0" AnchorPane.topAnchor="44.0">
<image>
<Image url="@../resources/Homeflix_Poster.png" />
</image></ImageView>
<JFXButton fx:id="returnBtn" contentDisplay="CENTER" layoutX="690.0" layoutY="443.0" onAction="#returnBtnclicked" prefHeight="25.0" prefWidth="90.0" AnchorPane.bottomAnchor="132.0" AnchorPane.rightAnchor="120.0" />
<JFXButton fx:id="forwardBtn" contentDisplay="CENTER" layoutX="798.0" layoutY="443.0" onAction="#forwardBtnclicked" prefHeight="25.0" prefWidth="90.0" AnchorPane.bottomAnchor="132.0" AnchorPane.rightAnchor="12.0" />
<HBox fx:id="topHBox" layoutY="12.0" prefHeight="32.0" prefWidth="900.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<JFXHamburger fx:id="menuHam">
<padding>
<Insets left="3.0" />
</padding>
</JFXHamburger>
</children>
</HBox>
<VBox fx:id="sideMenuVBox" layoutY="32.0" prefHeight="660.0" prefWidth="150.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="32.0">
<children>
<JFXButton fx:id="infoBtn" onAction="#infoBtnclicked" prefHeight="32.0" prefWidth="150.0" textAlignment="CENTER">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<JFXButton fx:id="settingsBtn" onAction="#settingsBtnclicked" prefHeight="37.0" prefWidth="150.0" textAlignment="CENTER">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<JFXButton fx:id="streamingSettingsBtn" onAction="#streamingSettingsBtnclicked" prefHeight="32.0" prefWidth="150.0" textAlignment="CENTER">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<JFXButton fx:id="switchBtn" onAction="#switchBtnclicked" prefHeight="32.0" prefWidth="150.0" textAlignment="CENTER">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<JFXButton fx:id="debugBtn" onAction="#debugBtnclicked" prefHeight="32.0" prefWidth="150.0" text="debugging" textAlignment="CENTER">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
</children>
</VBox>
<AnchorPane fx:id="streamingSettingsAnchor" layoutX="138.0" layoutY="33.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
<children>
<JFXTextField fx:id="tfStreamingPath" layoutX="14.0" layoutY="14.0" onAction="#tfStreamingPathAction" prefWidth="250.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="5.0" />
<JFXButton fx:id="streamingDirectoryBtn" layoutX="263.0" layoutY="2.0" onAction="#streamingDirectoryBtnAction" prefHeight="25.0" prefWidth="115.0" AnchorPane.leftAnchor="260.0" AnchorPane.topAnchor="5.0" />
<TableView fx:id="tableViewStreamingdata" layoutX="14.0" layoutY="44.0" prefHeight="517.0" prefWidth="370.0" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="40.0" />
</children></AnchorPane>
<AnchorPane fx:id="settingsAnchor" layoutX="160.0" layoutY="44.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
<children>
<JFXTextField fx:id="tfPath" layoutX="14.0" layoutY="81.0" onAction="#tfPathAction" prefWidth="250.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="79.0" />
<JFXButton fx:id="directoryBtn" layoutX="276.0" layoutY="82.0" onAction="#directoryBtnAction" prefHeight="25.0" AnchorPane.leftAnchor="269.0" AnchorPane.topAnchor="82.0" />
<JFXColorPicker fx:id="mainColor" layoutX="118.0" layoutY="130.0" onAction="#mainColorAction" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="130.0" />
<Label fx:id="fontsizeLabel" layoutX="14.0" layoutY="179.0" text="Fontsize" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="175.0" />
<JFXSlider fx:id="sliderFontSize" layoutX="118.0" layoutY="177.0" max="48.0" min="2.0" prefWidth="250.0" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="177.0" />
<ChoiceBox fx:id="cbLocal" layoutX="118.0" layoutY="208.0" prefWidth="150.0" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="208.0" />
<JFXButton fx:id="updateBtn" layoutX="16.0" layoutY="269.0" onAction="#updateBtnAction" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="253.0" />
<Label fx:id="autoUpdateLabel" layoutX="14.0" layoutY="310.0" prefHeight="17.0" text="check at startup for updates:" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="298.0" />
<JFXToggleButton fx:id="autoupdateBtn" layoutX="14.0" layoutY="336.0" onAction="#autoupdateBtnAction" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="320.0" />
<Label fx:id="versionLabel" layoutX="14.0" layoutY="418.0" text="Label" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="396.0" />
<Label fx:id="settingsHead1Label" layoutX="14.0" layoutY="24.0" text="HomeFlix Settings" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="24.0">
<font>
<Font name="System Bold" size="14.0" />
</font>
</Label>
<Label fx:id="mainColorLabel" layoutX="14.0" layoutY="134.0" prefHeight="25.0" text="Main-Color" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="130.0" />
<Label fx:id="localLabel" layoutX="14.0" layoutY="207.0" text="Local" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="212.0" />
</children>
</AnchorPane>
</children>
</AnchorPane>

+ 0
- 1163
src/application/MainWindowController.java
File diff suppressed because it is too large
View File


+ 0
- 211
src/application/apiQuery.java View File

@ -1,211 +0,0 @@
/**
* apiQuery for Project HomeFlix
* sends a query to the omdb api
*/
package application;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.File;