updated to 0.3.8
This commit is contained in:
parent
9de3e6a3f1
commit
84b7e2b7a1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -57,6 +57,9 @@ import com.jfoenix.controls.JFXTextArea;
|
||||||
import com.jfoenix.controls.JFXTextField;
|
import com.jfoenix.controls.JFXTextField;
|
||||||
import com.jfoenix.controls.JFXToggleButton;
|
import com.jfoenix.controls.JFXToggleButton;
|
||||||
|
|
||||||
|
import javafx.animation.FadeTransition;
|
||||||
|
import javafx.animation.ParallelTransition;
|
||||||
|
import javafx.animation.TranslateTransition;
|
||||||
import javafx.beans.property.ReadOnlyObjectWrapper;
|
import javafx.beans.property.ReadOnlyObjectWrapper;
|
||||||
import javafx.beans.property.ReadOnlyStringWrapper;
|
import javafx.beans.property.ReadOnlyStringWrapper;
|
||||||
import javafx.beans.value.ChangeListener;
|
import javafx.beans.value.ChangeListener;
|
||||||
|
@ -82,6 +85,7 @@ import javafx.scene.layout.VBox;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.text.Font;
|
import javafx.scene.text.Font;
|
||||||
import javafx.stage.DirectoryChooser;
|
import javafx.stage.DirectoryChooser;
|
||||||
|
import javafx.util.Duration;
|
||||||
|
|
||||||
public class MainWindowController {
|
public class MainWindowController {
|
||||||
@FXML
|
@FXML
|
||||||
|
@ -152,7 +156,7 @@ public class MainWindowController {
|
||||||
private ImageView image1;
|
private ImageView image1;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
TreeItem<streamUiData> root = new TreeItem<>(new streamUiData(1, 1, 5.0,"1", "filme","1"));
|
TreeItem<streamUiData> root = new TreeItem<>(new streamUiData(1, 1, 1, 5.0,"1", "filme","1"));
|
||||||
@FXML
|
@FXML
|
||||||
TreeTableColumn<streamUiData, Double> columnRating = new TreeTableColumn<>("Bewertung");
|
TreeTableColumn<streamUiData, Double> columnRating = new TreeTableColumn<>("Bewertung");
|
||||||
@FXML
|
@FXML
|
||||||
|
@ -165,9 +169,11 @@ public class MainWindowController {
|
||||||
TreeTableColumn<streamUiData, Integer> columnYear = new TreeTableColumn<>("Jahr");
|
TreeTableColumn<streamUiData, Integer> columnYear = new TreeTableColumn<>("Jahr");
|
||||||
@FXML
|
@FXML
|
||||||
TreeTableColumn<streamUiData, Integer> columnSeason = new TreeTableColumn<>("Staffel");
|
TreeTableColumn<streamUiData, Integer> columnSeason = new TreeTableColumn<>("Staffel");
|
||||||
|
@FXML
|
||||||
|
TreeTableColumn<streamUiData, Integer> columnEpisode = new TreeTableColumn<>("Episode");
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TreeItem<streamUiData> streamingRoot =new TreeItem<>(new streamUiData(1 ,1 ,1.0 ,"1" ,"filme" ,"1"));
|
private TreeItem<streamUiData> streamingRoot =new TreeItem<>(new streamUiData(1 ,1 ,1 ,1.0 ,"1" ,"filme" ,"1"));
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<streamUiData, String> dataNameColumn = new TableColumn<>("Datei Name");
|
private TableColumn<streamUiData, String> dataNameColumn = new TableColumn<>("Datei Name");
|
||||||
@FXML
|
@FXML
|
||||||
|
@ -177,7 +183,8 @@ public class MainWindowController {
|
||||||
private boolean menutrue = false; //merker für menubtn (öffnen oder schließen)
|
private boolean menutrue = false; //merker für menubtn (öffnen oder schließen)
|
||||||
private boolean settingstrue = false;
|
private boolean settingstrue = false;
|
||||||
private boolean streamingSettingsTrue = false;
|
private boolean streamingSettingsTrue = false;
|
||||||
private String version = "0.3.7";
|
private String version = "0.3.8";
|
||||||
|
private String versionName = "half glowing bucket";
|
||||||
private String versionURL = "https://raw.githubusercontent.com/Seil0/Project-HomeFlix/master/updates/version.txt";
|
private String versionURL = "https://raw.githubusercontent.com/Seil0/Project-HomeFlix/master/updates/version.txt";
|
||||||
private String downloadLink = "https://raw.githubusercontent.com/Seil0/Project-HomeFlix/master/updates/downloadLink.txt";
|
private String downloadLink = "https://raw.githubusercontent.com/Seil0/Project-HomeFlix/master/updates/downloadLink.txt";
|
||||||
private File dir = new File(System.getProperty("user.home") + "/Documents/HomeFlix");
|
private File dir = new File(System.getProperty("user.home") + "/Documents/HomeFlix");
|
||||||
|
@ -222,15 +229,14 @@ public class MainWindowController {
|
||||||
//wenn menubtn clicked
|
//wenn menubtn clicked
|
||||||
/**
|
/**
|
||||||
* TODO change value of Text-color change
|
* TODO change value of Text-color change
|
||||||
* TODO animation of side menu
|
|
||||||
*/
|
*/
|
||||||
@FXML
|
@FXML
|
||||||
private void menubtnclicked(){
|
private void menubtnclicked(){
|
||||||
if(menutrue == false){
|
if(menutrue == false){
|
||||||
sideMenuVBox.setVisible(true);
|
sideMenuSlideIn();
|
||||||
menutrue = true;
|
menutrue = true;
|
||||||
}else{
|
}else{
|
||||||
sideMenuVBox.setVisible(false);
|
sideMenuSlideOut();
|
||||||
menutrue = false;
|
menutrue = false;
|
||||||
}
|
}
|
||||||
if(settingstrue == true){
|
if(settingstrue == true){
|
||||||
|
@ -400,7 +406,7 @@ public class MainWindowController {
|
||||||
addDataUI();
|
addDataUI();
|
||||||
settingsAnchor.setVisible(false);
|
settingsAnchor.setVisible(false);
|
||||||
streamingSettingsAnchor.setVisible(false);
|
streamingSettingsAnchor.setVisible(false);
|
||||||
sideMenuVBox.setVisible(false); //disables sidemenu
|
sideMenuSlideOut(); //disables sidemenu
|
||||||
menutrue = false;
|
menutrue = false;
|
||||||
settingstrue = false;
|
settingstrue = false;
|
||||||
streamingSettingsTrue = false;
|
streamingSettingsTrue = false;
|
||||||
|
@ -551,7 +557,10 @@ public class MainWindowController {
|
||||||
columnSeason.setCellValueFactory((CellDataFeatures<streamUiData, Integer> p) ->
|
columnSeason.setCellValueFactory((CellDataFeatures<streamUiData, Integer> p) ->
|
||||||
new ReadOnlyObjectWrapper(p.getValue().getValue().getSeason()));
|
new ReadOnlyObjectWrapper(p.getValue().getValue().getSeason()));
|
||||||
|
|
||||||
treeTableViewfilm.getColumns().addAll(columnTitel, columnRating, columnStreamUrl, columnResolution, columnYear, columnSeason);
|
columnEpisode.setCellValueFactory((CellDataFeatures<streamUiData, Integer> p) ->
|
||||||
|
new ReadOnlyObjectWrapper(p.getValue().getValue().getEpisode()));
|
||||||
|
|
||||||
|
treeTableViewfilm.getColumns().addAll(columnTitel, columnRating, columnStreamUrl, columnResolution, columnYear, columnSeason, columnEpisode);
|
||||||
treeTableViewfilm.getColumns().get(2).setVisible(false); //blendet die Column mit den Dateinamen aus (wichtig um sie abzuspielen)
|
treeTableViewfilm.getColumns().get(2).setVisible(false); //blendet die Column mit den Dateinamen aus (wichtig um sie abzuspielen)
|
||||||
|
|
||||||
//Changelistener für TreeTable
|
//Changelistener für TreeTable
|
||||||
|
@ -685,7 +694,7 @@ public class MainWindowController {
|
||||||
for(int i = 0; i < entries.length; i++){
|
for(int i = 0; i < entries.length; i++){
|
||||||
String titel = ohneEndung(entries[i]);
|
String titel = ohneEndung(entries[i]);
|
||||||
String data = entries[i];
|
String data = entries[i];
|
||||||
newDaten.add(new streamUiData(1, 1, 5.0, "1", titel, data));
|
newDaten.add(new streamUiData(1, 1, 1, 5.0, "1", titel, data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,6 +703,7 @@ public class MainWindowController {
|
||||||
String resolution = null;
|
String resolution = null;
|
||||||
String streamUrl = null;
|
String streamUrl = null;
|
||||||
int season;
|
int season;
|
||||||
|
int episode;
|
||||||
int year;
|
int year;
|
||||||
double rating = 5.0;
|
double rating = 5.0;
|
||||||
if(getStreamingPath().equals("")||getStreamingPath().equals(null)){
|
if(getStreamingPath().equals("")||getStreamingPath().equals(null)){
|
||||||
|
@ -708,10 +718,11 @@ public class MainWindowController {
|
||||||
for (JsonValue item : items) {
|
for (JsonValue item : items) {
|
||||||
titel = item.asObject().getString("titel","");
|
titel = item.asObject().getString("titel","");
|
||||||
season = item.asObject().getInt("season", 0);
|
season = item.asObject().getInt("season", 0);
|
||||||
|
episode = item.asObject().getInt("episode", 0);
|
||||||
year = item.asObject().getInt("year", 0);
|
year = item.asObject().getInt("year", 0);
|
||||||
resolution = item.asObject().getString("resolution", "");
|
resolution = item.asObject().getString("resolution", "");
|
||||||
streamUrl = item.asObject().getString("streamUrl", "");
|
streamUrl = item.asObject().getString("streamUrl", "");
|
||||||
streamData.add(new streamUiData(year, season, rating, resolution, titel, streamUrl));
|
streamData.add(new streamUiData(year, season, episode, rating, resolution, titel, streamUrl));
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -732,6 +743,7 @@ public class MainWindowController {
|
||||||
treeTableViewfilm.getColumns().get(3).setVisible(false);
|
treeTableViewfilm.getColumns().get(3).setVisible(false);
|
||||||
treeTableViewfilm.getColumns().get(4).setVisible(false);
|
treeTableViewfilm.getColumns().get(4).setVisible(false);
|
||||||
treeTableViewfilm.getColumns().get(5).setVisible(false);
|
treeTableViewfilm.getColumns().get(5).setVisible(false);
|
||||||
|
treeTableViewfilm.getColumns().get(6).setVisible(false);
|
||||||
}else if(mode.equals("streaming")){
|
}else if(mode.equals("streaming")){
|
||||||
for(int i = 0; i < streamData.size(); i++){
|
for(int i = 0; i < streamData.size(); i++){
|
||||||
root.getChildren().add(new TreeItem<streamUiData>(streamData.get(i))); //fügt daten zur Rootnode hinzu
|
root.getChildren().add(new TreeItem<streamUiData>(streamData.get(i))); //fügt daten zur Rootnode hinzu
|
||||||
|
@ -741,9 +753,11 @@ public class MainWindowController {
|
||||||
columnRating.setMaxWidth(52.5);
|
columnRating.setMaxWidth(52.5);
|
||||||
columnYear.setMaxWidth(40);
|
columnYear.setMaxWidth(40);
|
||||||
columnSeason.setMaxWidth(52.5);
|
columnSeason.setMaxWidth(52.5);
|
||||||
|
columnEpisode.setMaxWidth(0); //disabled for ui size reasons
|
||||||
treeTableViewfilm.getColumns().get(3).setVisible(true);
|
treeTableViewfilm.getColumns().get(3).setVisible(true);
|
||||||
treeTableViewfilm.getColumns().get(4).setVisible(true);
|
treeTableViewfilm.getColumns().get(4).setVisible(true);
|
||||||
treeTableViewfilm.getColumns().get(5).setVisible(true);
|
treeTableViewfilm.getColumns().get(5).setVisible(true);
|
||||||
|
treeTableViewfilm.getColumns().get(6).setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -756,7 +770,7 @@ public class MainWindowController {
|
||||||
if(entries[i].endsWith(".json")){
|
if(entries[i].endsWith(".json")){
|
||||||
String titel = ohneEndung(entries[i]);
|
String titel = ohneEndung(entries[i]);
|
||||||
String data = entries[i];
|
String data = entries[i];
|
||||||
streamingData.add(new streamUiData(1,1,5.0,"1",titel ,data));
|
streamingData.add(new streamUiData(1,1,1,5.0,"1",titel ,data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(int i = 0; i < streamingData.size(); i++){
|
for(int i = 0; i < streamingData.size(); i++){
|
||||||
|
@ -823,7 +837,37 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sideMenuSlideIn(){
|
||||||
|
sideMenuVBox.setVisible(true);
|
||||||
|
//einblenden von 40% nach 100% deckkraft in 400ms
|
||||||
|
FadeTransition fadeTransition = new FadeTransition(Duration.millis(400), sideMenuVBox);
|
||||||
|
fadeTransition.setFromValue(0.4);
|
||||||
|
fadeTransition.setToValue(1.0);
|
||||||
|
//einfahren des side munes in 400ms
|
||||||
|
TranslateTransition translateTransition = new TranslateTransition(Duration.millis(400), sideMenuVBox);
|
||||||
|
translateTransition.setFromX(-150);
|
||||||
|
translateTransition.setToX(0);
|
||||||
|
//falls beides verwendet werden soll
|
||||||
|
ParallelTransition parallelTransition = new ParallelTransition();
|
||||||
|
parallelTransition.getChildren().addAll(translateTransition);//(fadeTransition, translateTransition);
|
||||||
|
parallelTransition.play();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sideMenuSlideOut(){
|
||||||
|
// sideMenuVBox.setVisible(false);
|
||||||
|
//ausblenden von 100% nach 40% deckkraft in 400ms
|
||||||
|
FadeTransition fadeTransition = new FadeTransition(Duration.millis(400), sideMenuVBox);
|
||||||
|
fadeTransition.setFromValue(1.0);
|
||||||
|
fadeTransition.setToValue(0.4);
|
||||||
|
//ausfahren des side munes in 400ms
|
||||||
|
TranslateTransition translateTransition = new TranslateTransition(Duration.millis(400), sideMenuVBox);
|
||||||
|
translateTransition.setFromX(0);
|
||||||
|
translateTransition.setToX(-150);
|
||||||
|
//falls beides verwendet werden soll
|
||||||
|
ParallelTransition parallelTransition = new ParallelTransition();
|
||||||
|
parallelTransition.getChildren().addAll(translateTransition);//(fadeTransition, translateTransition);
|
||||||
|
parallelTransition.play();
|
||||||
|
}
|
||||||
|
|
||||||
public void setLoaclUI(int local){
|
public void setLoaclUI(int local){
|
||||||
switch(local){
|
switch(local){
|
||||||
|
@ -858,7 +902,7 @@ public class MainWindowController {
|
||||||
errorPlay = bundle.getString("errorPlay");
|
errorPlay = bundle.getString("errorPlay");
|
||||||
errorOpenStream = bundle.getString("errorOpenStream");
|
errorOpenStream = bundle.getString("errorOpenStream");
|
||||||
errorMode = bundle.getString("errorMode");
|
errorMode = bundle.getString("errorMode");
|
||||||
infoText = bundle.getString("version")+" "+version+" plasma bucket"+bundle.getString("infoText");
|
infoText = bundle.getString("version")+" "+version+" "+versionName+bundle.getString("infoText");
|
||||||
linuxBugText = bundle.getString("linuxBug");
|
linuxBugText = bundle.getString("linuxBug");
|
||||||
vlcNotInstalled = bundle.getString("vlcNotInstalled");
|
vlcNotInstalled = bundle.getString("vlcNotInstalled");
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,15 +11,17 @@ public class streamUiData {
|
||||||
|
|
||||||
private IntegerProperty year = new SimpleIntegerProperty();
|
private IntegerProperty year = new SimpleIntegerProperty();
|
||||||
private IntegerProperty season = new SimpleIntegerProperty();
|
private IntegerProperty season = new SimpleIntegerProperty();
|
||||||
|
private IntegerProperty episode = new SimpleIntegerProperty();
|
||||||
private DoubleProperty rating = new SimpleDoubleProperty();
|
private DoubleProperty rating = new SimpleDoubleProperty();
|
||||||
private StringProperty resolution = new SimpleStringProperty();
|
private StringProperty resolution = new SimpleStringProperty();
|
||||||
private StringProperty titel = new SimpleStringProperty();
|
private StringProperty titel = new SimpleStringProperty();
|
||||||
private StringProperty streamUrl = new SimpleStringProperty();
|
private StringProperty streamUrl = new SimpleStringProperty();
|
||||||
|
|
||||||
//uiData ist der Typ der Daten in der TreeTabelView
|
//uiData ist der Typ der Daten in der TreeTabelView
|
||||||
public streamUiData (final int year, final int season, final double rating, final String resolution, final String titel, final String streamUrl) {
|
public streamUiData (final int year, final int season, final int episode, final double rating, final String resolution, final String titel, final String streamUrl) {
|
||||||
this.year.set(year);
|
this.year.set(year);
|
||||||
this.season.set(season);
|
this.season.set(season);
|
||||||
|
this.episode.set(episode);
|
||||||
this.rating.set(rating);
|
this.rating.set(rating);
|
||||||
this.resolution.set(resolution);
|
this.resolution.set(resolution);
|
||||||
this.titel.set(titel);
|
this.titel.set(titel);
|
||||||
|
@ -34,6 +36,10 @@ public class streamUiData {
|
||||||
return season.get();
|
return season.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getEpisode() {
|
||||||
|
return episode.get();
|
||||||
|
}
|
||||||
|
|
||||||
public double getRating() {
|
public double getRating() {
|
||||||
return rating.get();
|
return rating.get();
|
||||||
}
|
}
|
||||||
|
@ -59,6 +65,10 @@ public class streamUiData {
|
||||||
this.season.set(season);
|
this.season.set(season);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEpisode(int season) {
|
||||||
|
this.episode.set(season);
|
||||||
|
}
|
||||||
|
|
||||||
public void setRating(int rating) {
|
public void setRating(int rating) {
|
||||||
this.rating.set(rating);
|
this.rating.set(rating);
|
||||||
}
|
}
|
||||||
|
@ -83,6 +93,10 @@ public class streamUiData {
|
||||||
return season;
|
return season;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IntegerProperty episodeProperty(){
|
||||||
|
return episode;
|
||||||
|
}
|
||||||
|
|
||||||
public DoubleProperty ratingProperty(){
|
public DoubleProperty ratingProperty(){
|
||||||
return rating;
|
return rating;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
||||||
0.3.7
|
0.3.8
|
Loading…
Reference in New Issue