code cleanup
This commit is contained in:
parent
85a403a834
commit
391ef59f70
1
pom.xml
1
pom.xml
|
@ -80,6 +80,7 @@
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.1.1</version>
|
<version>3.1.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<finalName>Project-HomeFlix</finalName>
|
||||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||||
<transformers>
|
<transformers>
|
||||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||||
|
|
|
@ -40,7 +40,6 @@ import javafx.scene.layout.AnchorPane;
|
||||||
import javafx.stage.DirectoryChooser;
|
import javafx.stage.DirectoryChooser;
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import javafx.stage.WindowEvent;
|
|
||||||
|
|
||||||
public class Main extends Application {
|
public class Main extends Application {
|
||||||
|
|
||||||
|
@ -56,8 +55,7 @@ public class Main extends Application {
|
||||||
private static String javaVers = System.getProperty("java.version");
|
private static String javaVers = System.getProperty("java.version");
|
||||||
private static String javaVend = System.getProperty("java.vendor");
|
private static String javaVend = System.getProperty("java.vendor");
|
||||||
private static String local = System.getProperty("user.language") + "_" + System.getProperty("user.country");
|
private static String local = System.getProperty("user.language") + "_" + System.getProperty("user.country");
|
||||||
private String dirWin = userHome + "/Documents/HomeFlix"; // Windows: C:/Users/"User"/Documents/HomeFlix
|
private static String dirHomeFlix;
|
||||||
private String dirLinux = userHome + "/HomeFlix"; // Linux: /home/"User"/HomeFlix
|
|
||||||
private File directory;
|
private File directory;
|
||||||
private File configFile;
|
private File configFile;
|
||||||
private File posterCache;
|
private File posterCache;
|
||||||
|
@ -88,26 +86,14 @@ public class Main extends Application {
|
||||||
primaryStage.setResizable(false);
|
primaryStage.setResizable(false);
|
||||||
primaryStage.setTitle("Project HomeFlix");
|
primaryStage.setTitle("Project HomeFlix");
|
||||||
primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/icons/Homeflix_Icon_64x64.png"))); //adds application icon
|
primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/icons/Homeflix_Icon_64x64.png"))); //adds application icon
|
||||||
primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
|
primaryStage.setOnCloseRequest(event -> System.exit(1));
|
||||||
public void handle(WindowEvent we) {
|
|
||||||
System.exit(1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
mainWindowController = loader.getController(); //Link of FXMLController and controller class
|
mainWindowController = loader.getController(); //Link of FXMLController and controller class
|
||||||
mainWindowController.setMain(this); //call setMain
|
mainWindowController.setMain(this); //call setMain
|
||||||
|
|
||||||
|
directory = new File(dirHomeFlix);
|
||||||
// get OS and the specific paths
|
configFile = new File(dirHomeFlix + "/config.xml");
|
||||||
if (osName.contains("Windows")) {
|
posterCache = new File(dirHomeFlix + "/posterCache");
|
||||||
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");
|
|
||||||
}
|
|
||||||
|
|
||||||
// generate window
|
// generate window
|
||||||
scene = new Scene(pane); // create new scene, append pane to scene
|
scene = new Scene(pane); // create new scene, append pane to scene
|
||||||
|
@ -118,6 +104,7 @@ public class Main extends Application {
|
||||||
// startup checks
|
// startup checks
|
||||||
if (!configFile.exists()) {
|
if (!configFile.exists()) {
|
||||||
directory.mkdir();
|
directory.mkdir();
|
||||||
|
|
||||||
addFirstSource();
|
addFirstSource();
|
||||||
mainWindowController.setColor("ee3523");
|
mainWindowController.setColor("ee3523");
|
||||||
mainWindowController.setFontSize(17.0);
|
mainWindowController.setFontSize(17.0);
|
||||||
|
@ -130,7 +117,7 @@ public class Main extends Application {
|
||||||
posterCache.mkdir();
|
posterCache.mkdir();
|
||||||
}
|
}
|
||||||
|
|
||||||
// init here as it loads the games to the mwc and the gui, therefore the window must exist
|
// initialize here as it loads the games to the mwc and the GUI, therefore the window must exist
|
||||||
mainWindowController.init();
|
mainWindowController.init();
|
||||||
mainWindowController.getDbController().init();
|
mainWindowController.getDbController().init();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -148,7 +135,7 @@ public class Main extends Application {
|
||||||
bundle = ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.US); // us_english
|
bundle = ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.US); // us_english
|
||||||
break;
|
break;
|
||||||
case "de_DE":
|
case "de_DE":
|
||||||
bundle = ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.GERMAN); // German
|
bundle = ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.GERMAN); // de_german
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
bundle = ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.US); // default local
|
bundle = ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.US); // default local
|
||||||
|
@ -200,20 +187,20 @@ public class Main extends Application {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the log file location and initialize the logger
|
* set the log file location and initialize the logger launch the GUI
|
||||||
* launch the GUI
|
|
||||||
* @param args arguments given at the start
|
* @param args arguments given at the start
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
if (System.getProperty("os.name").equals("Windows")) {
|
|
||||||
System.setProperty("logFilename", userHome + "/Documents/HomeFlix/app.log");
|
if (osName.contains("Windows")) {
|
||||||
File logFile = new File(userHome + "/Documents/HomeFlix/app.log");
|
dirHomeFlix = userHome + "/Documents/HomeFlix";
|
||||||
logFile.delete();
|
|
||||||
} else {
|
} else {
|
||||||
System.setProperty("logFilename", userHome + "/HomeFlix/app.log");
|
dirHomeFlix = userHome + "/HomeFlix";
|
||||||
File logFile = new File(userHome + "/HomeFlix/app.log");
|
|
||||||
logFile.delete();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.setProperty("logFilename", dirHomeFlix + "/app.log");
|
||||||
|
File logFile = new File(dirHomeFlix + "/app.log");
|
||||||
|
logFile.delete();
|
||||||
LOGGER = LogManager.getLogger(Main.class.getName());
|
LOGGER = LogManager.getLogger(Main.class.getName());
|
||||||
launch(args);
|
launch(args);
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,29 +201,29 @@ public class MainWindowController {
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<SourceDataType, String> modeColumn;
|
private TableColumn<SourceDataType, String> modeColumn;
|
||||||
|
|
||||||
|
private Main main;
|
||||||
|
private MainWindowController mainWindowController;
|
||||||
|
private UpdateController updateController;
|
||||||
|
private OMDbAPIController omdbAPIController;
|
||||||
|
private DBController dbController;
|
||||||
|
private static final Logger LOGGER = LogManager.getLogger(MainWindowController.class.getName());
|
||||||
|
|
||||||
private boolean menuTrue = false;
|
private boolean menuTrue = false;
|
||||||
private boolean settingsTrue = false;
|
private boolean settingsTrue = false;
|
||||||
private boolean autoUpdate = false;
|
private boolean autoUpdate = false;
|
||||||
private boolean useBeta = false;
|
private boolean useBeta = false;
|
||||||
private boolean autoplay = false;
|
private boolean autoplay = false;
|
||||||
private static final Logger LOGGER = LogManager.getLogger(MainWindowController.class.getName());
|
|
||||||
private int hashA = -647380320;
|
|
||||||
|
|
||||||
private final String version = "0.7.0";
|
private final String version = "0.7.0";
|
||||||
private final String buildNumber = "151";
|
private final String buildNumber = "151";
|
||||||
private final String versionName = "toothless dragon";
|
private final String versionName = "toothless dragon";
|
||||||
private String dialogBtnStyle;
|
private String btnStyle;
|
||||||
private String color;
|
private String color;
|
||||||
private String local;
|
private String local;
|
||||||
private String omdbAPIKey;
|
private String omdbAPIKey;
|
||||||
|
|
||||||
// text strings
|
|
||||||
private String errorLoad;
|
|
||||||
private String errorSave;
|
|
||||||
private String infoText;
|
|
||||||
private String vlcNotInstalled;
|
|
||||||
|
|
||||||
private double fontSize;
|
private double fontSize;
|
||||||
|
private final int hashA = -647380320;
|
||||||
private int last;
|
private int last;
|
||||||
private int indexTable;
|
private int indexTable;
|
||||||
private int indexList;
|
private int indexList;
|
||||||
|
@ -247,12 +247,6 @@ public class MainWindowController {
|
||||||
private ContextMenu menu = new ContextMenu(like, dislike);
|
private ContextMenu menu = new ContextMenu(like, dislike);
|
||||||
private Properties props = new Properties();
|
private Properties props = new Properties();
|
||||||
|
|
||||||
private Main main;
|
|
||||||
private MainWindowController mainWindowController;
|
|
||||||
private UpdateController updateController;
|
|
||||||
private OMDbAPIController omdbAPIController;
|
|
||||||
private DBController dbController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "Main" Method called in Main.java main() when starting
|
* "Main" Method called in Main.java main() when starting
|
||||||
* Initialize other objects: Updater, dbController and ApiQuery
|
* Initialize other objects: Updater, dbController and ApiQuery
|
||||||
|
@ -274,6 +268,28 @@ public class MainWindowController {
|
||||||
initActions();
|
initActions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize UI elements
|
||||||
|
private void initUI() {
|
||||||
|
versionLbl.setText("Version: " + version + " (Build: " + buildNumber + ")");
|
||||||
|
fontsizeSlider.setValue(getFontSize());
|
||||||
|
colorPicker.setValue(Color.valueOf(getColor()));
|
||||||
|
|
||||||
|
updateBtn.setFont(Font.font("System", 12));
|
||||||
|
autoUpdateToggleBtn.setSelected(isAutoUpdate());
|
||||||
|
autoplayToggleBtn.setSelected(isAutoplay());
|
||||||
|
languageChoisBox.setItems(languages);
|
||||||
|
branchChoisBox.setItems(branches);
|
||||||
|
|
||||||
|
if (isUseBeta()) {
|
||||||
|
branchChoisBox.getSelectionModel().select(1);
|
||||||
|
} else {
|
||||||
|
branchChoisBox.getSelectionModel().select(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
setLocalUI();
|
||||||
|
applyColor();
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize the tables (treeTableViewfilm and sourcesTable)
|
// Initialize the tables (treeTableViewfilm and sourcesTable)
|
||||||
private void initTabel() {
|
private void initTabel() {
|
||||||
|
|
||||||
|
@ -402,7 +418,7 @@ public class MainWindowController {
|
||||||
public void handle(ActionEvent event) {
|
public void handle(ActionEvent event) {
|
||||||
dbController.like(getCurrentStreamUrl());
|
dbController.like(getCurrentStreamUrl());
|
||||||
dbController.refresh(getCurrentStreamUrl(), indexList);
|
dbController.refresh(getCurrentStreamUrl(), indexList);
|
||||||
refreshTable();
|
refreshTableElement();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -411,7 +427,7 @@ public class MainWindowController {
|
||||||
public void handle(ActionEvent event) {
|
public void handle(ActionEvent event) {
|
||||||
dbController.dislike(getCurrentStreamUrl());
|
dbController.dislike(getCurrentStreamUrl());
|
||||||
dbController.refresh(getCurrentStreamUrl(), indexList);
|
dbController.refresh(getCurrentStreamUrl(), indexList);
|
||||||
refreshTable();
|
refreshTableElement();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -479,28 +495,6 @@ public class MainWindowController {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize UI elements
|
|
||||||
private void initUI() {
|
|
||||||
versionLbl.setText("Version: " + version + " (Build: " + buildNumber + ")");
|
|
||||||
fontsizeSlider.setValue(getFontSize());
|
|
||||||
colorPicker.setValue(Color.valueOf(getColor()));
|
|
||||||
|
|
||||||
updateBtn.setFont(Font.font("System", 12));
|
|
||||||
autoUpdateToggleBtn.setSelected(isAutoUpdate());
|
|
||||||
autoplayToggleBtn.setSelected(isAutoplay());
|
|
||||||
languageChoisBox.setItems(languages);
|
|
||||||
branchChoisBox.setItems(branches);
|
|
||||||
|
|
||||||
if (isUseBeta()) {
|
|
||||||
branchChoisBox.getSelectionModel().select(1);
|
|
||||||
} else {
|
|
||||||
branchChoisBox.getSelectionModel().select(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
setLocalUI();
|
|
||||||
applyColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void playbtnclicked() {
|
private void playbtnclicked() {
|
||||||
if (currentTableFilm.getStreamUrl().contains("_rootNode")) {
|
if (currentTableFilm.getStreamUrl().contains("_rootNode")) {
|
||||||
|
@ -528,7 +522,7 @@ public class MainWindowController {
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
}
|
}
|
||||||
if (output.contains("which: no vlc") || output == "") {
|
if (output.contains("which: no vlc") || output == "") {
|
||||||
JFXInfoAlert vlcInfoAlert = new JFXInfoAlert("Info", vlcNotInstalled, dialogBtnStyle, main.getPrimaryStage());
|
JFXInfoAlert vlcInfoAlert = new JFXInfoAlert("Info", getBundle().getString("vlcNotInstalled"), btnStyle, main.getPrimaryStage());
|
||||||
vlcInfoAlert.showAndWait();
|
vlcInfoAlert.showAndWait();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
@ -575,8 +569,8 @@ public class MainWindowController {
|
||||||
@FXML
|
@FXML
|
||||||
private void aboutBtnAction() {
|
private void aboutBtnAction() {
|
||||||
String bodyText = "cemu_UI by @Seil0 \nVersion: " + version + " (Build: " + buildNumber + ") \""
|
String bodyText = "cemu_UI by @Seil0 \nVersion: " + version + " (Build: " + buildNumber + ") \""
|
||||||
+ versionName + "\" \n" + infoText;
|
+ versionName + "\" \n" + getBundle().getString("infoText");
|
||||||
JFXInfoAlert infoAlert = new JFXInfoAlert("Project HomeFlix", bodyText, dialogBtnStyle, main.getPrimaryStage());
|
JFXInfoAlert infoAlert = new JFXInfoAlert("Project HomeFlix", bodyText, btnStyle, main.getPrimaryStage());
|
||||||
infoAlert.showAndWait();
|
infoAlert.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -634,26 +628,18 @@ public class MainWindowController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void autoUpdateToggleBtnAction(){
|
private void autoUpdateToggleBtnAction(){
|
||||||
if (isAutoUpdate()) {
|
autoUpdate = isAutoUpdate() ? false : true;
|
||||||
setAutoUpdate(false);
|
|
||||||
} else {
|
|
||||||
setAutoUpdate(true);
|
|
||||||
}
|
|
||||||
saveSettings();
|
saveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void autoplayToggleBtnAction(){
|
private void autoplayToggleBtnAction(){
|
||||||
if (isAutoplay()) {
|
autoplay = isAutoplay() ? false : true;
|
||||||
setAutoplay(false);
|
|
||||||
} else {
|
|
||||||
setAutoplay(true);
|
|
||||||
}
|
|
||||||
saveSettings();
|
saveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
// refresh the selected child of the root node
|
// refresh the selected child of the root node
|
||||||
private void refreshTable() {
|
private void refreshTableElement() {
|
||||||
filmRoot.getChildren().get(indexTable).setValue(filmsList.get(indexList));
|
filmRoot.getChildren().get(indexTable).setValue(filmsList.get(indexList));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -726,27 +712,15 @@ public class MainWindowController {
|
||||||
* if usedColor is less than checkColor set text fill white, else black
|
* if usedColor is less than checkColor set text fill white, else black
|
||||||
*/
|
*/
|
||||||
private void applyColor() {
|
private void applyColor() {
|
||||||
String style = "-fx-background-color: #" + getColor() + ";";
|
String menuBtnStyle;
|
||||||
String btnStyleBlack = "-fx-button-type: RAISED; -fx-background-color: #" + getColor() + "; -fx-text-fill: BLACK;";
|
String btnStyleBlack = "-fx-button-type: RAISED; -fx-background-color: #" + getColor() + "; -fx-text-fill: BLACK;";
|
||||||
String btnStyleWhite = "-fx-button-type: RAISED; -fx-background-color: #" + getColor() + "; -fx-text-fill: WHITE;";
|
String btnStyleWhite = "-fx-button-type: RAISED; -fx-background-color: #" + getColor() + "; -fx-text-fill: WHITE;";
|
||||||
BigInteger usedColor = new BigInteger(getColor(), 16);
|
BigInteger usedColor = new BigInteger(getColor(), 16);
|
||||||
BigInteger checkColor = new BigInteger("78909cff", 16);
|
BigInteger checkColor = new BigInteger("78909cff", 16);
|
||||||
|
|
||||||
sideMenuVBox.setStyle(style);
|
|
||||||
topHBox.setStyle(style);
|
|
||||||
searchTextField.setFocusColor(Color.valueOf(getColor()));
|
|
||||||
|
|
||||||
if (usedColor.compareTo(checkColor) == -1) {
|
if (usedColor.compareTo(checkColor) == -1) {
|
||||||
dialogBtnStyle = btnStyleWhite;
|
btnStyle = btnStyleWhite;
|
||||||
settingsBtn.setStyle("-fx-text-fill: WHITE;");
|
menuBtnStyle = "-fx-text-fill: WHITE;";
|
||||||
aboutBtn.setStyle("-fx-text-fill: WHITE;");
|
|
||||||
addDirectoryBtn.setStyle(btnStyleWhite);
|
|
||||||
addStreamSourceBtn.setStyle(btnStyleWhite);
|
|
||||||
updateBtn.setStyle(btnStyleWhite);
|
|
||||||
playbtn.setStyle(btnStyleWhite);
|
|
||||||
openfolderbtn.setStyle(btnStyleWhite);
|
|
||||||
returnBtn.setStyle(btnStyleWhite);
|
|
||||||
forwardBtn.setStyle(btnStyleWhite);
|
|
||||||
|
|
||||||
playbtn.setGraphic(play_arrow_white);
|
playbtn.setGraphic(play_arrow_white);
|
||||||
returnBtn.setGraphic(skip_previous_white);
|
returnBtn.setGraphic(skip_previous_white);
|
||||||
|
@ -755,16 +729,8 @@ public class MainWindowController {
|
||||||
menuHam.getStyleClass().clear();
|
menuHam.getStyleClass().clear();
|
||||||
menuHam.getStyleClass().add("jfx-hamburgerW");
|
menuHam.getStyleClass().add("jfx-hamburgerW");
|
||||||
} else {
|
} else {
|
||||||
dialogBtnStyle = btnStyleBlack;
|
btnStyle = btnStyleBlack;
|
||||||
settingsBtn.setStyle("-fx-text-fill: BLACK;");
|
menuBtnStyle = "-fx-text-fill: BLACK;";
|
||||||
aboutBtn.setStyle("-fx-text-fill: BLACK;");
|
|
||||||
addDirectoryBtn.setStyle(btnStyleBlack);
|
|
||||||
addStreamSourceBtn.setStyle(btnStyleBlack);
|
|
||||||
updateBtn.setStyle(btnStyleBlack);
|
|
||||||
playbtn.setStyle(btnStyleBlack);
|
|
||||||
openfolderbtn.setStyle(btnStyleBlack);
|
|
||||||
returnBtn.setStyle(btnStyleBlack);
|
|
||||||
forwardBtn.setStyle(btnStyleBlack);
|
|
||||||
|
|
||||||
playbtn.setGraphic(play_arrow_black);
|
playbtn.setGraphic(play_arrow_black);
|
||||||
returnBtn.setGraphic(skip_previous_black);
|
returnBtn.setGraphic(skip_previous_black);
|
||||||
|
@ -773,6 +739,24 @@ public class MainWindowController {
|
||||||
menuHam.getStyleClass().clear();
|
menuHam.getStyleClass().clear();
|
||||||
menuHam.getStyleClass().add("jfx-hamburgerB");
|
menuHam.getStyleClass().add("jfx-hamburgerB");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// boxes and TextFields
|
||||||
|
sideMenuVBox.setStyle("-fx-background-color: #" + getColor() + ";");
|
||||||
|
topHBox.setStyle("-fx-background-color: #" + getColor() + ";");
|
||||||
|
searchTextField.setFocusColor(Color.valueOf(getColor()));
|
||||||
|
|
||||||
|
// normal buttons
|
||||||
|
addDirectoryBtn.setStyle(btnStyle);
|
||||||
|
addStreamSourceBtn.setStyle(btnStyle);
|
||||||
|
updateBtn.setStyle(btnStyle);
|
||||||
|
playbtn.setStyle(btnStyle);
|
||||||
|
openfolderbtn.setStyle(btnStyle);
|
||||||
|
returnBtn.setStyle(btnStyle);
|
||||||
|
forwardBtn.setStyle(btnStyle);
|
||||||
|
|
||||||
|
// menu buttons
|
||||||
|
settingsBtn.setStyle(menuBtnStyle);
|
||||||
|
aboutBtn.setStyle(menuBtnStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
// slide in in 400ms
|
// slide in in 400ms
|
||||||
|
@ -829,10 +813,6 @@ public class MainWindowController {
|
||||||
columnSeason.setText(getBundle().getString("columnSeason"));
|
columnSeason.setText(getBundle().getString("columnSeason"));
|
||||||
columnEpisode.setText(getBundle().getString("columnEpisode"));
|
columnEpisode.setText(getBundle().getString("columnEpisode"));
|
||||||
columnFavorite.setText(getBundle().getString("columnFavorite"));
|
columnFavorite.setText(getBundle().getString("columnFavorite"));
|
||||||
errorLoad = getBundle().getString("errorLoad");
|
|
||||||
errorSave = getBundle().getString("errorSave");
|
|
||||||
infoText = getBundle().getString("infoText");
|
|
||||||
vlcNotInstalled = getBundle().getString("vlcNotInstalled");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -853,7 +833,7 @@ public class MainWindowController {
|
||||||
props.storeToXML(outputStream, "Project HomeFlix settings"); // write new .xml
|
props.storeToXML(outputStream, "Project HomeFlix settings"); // write new .xml
|
||||||
outputStream.close();
|
outputStream.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error(errorLoad, e);
|
LOGGER.error("An error occurred while saving the settings!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -872,7 +852,7 @@ public class MainWindowController {
|
||||||
setColor(props.getProperty("color"));
|
setColor(props.getProperty("color"));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOGGER.error("cloud not load color", e);
|
LOGGER.error("cloud not load color", e);
|
||||||
setColor("");
|
setColor("00a8cc");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -912,7 +892,7 @@ public class MainWindowController {
|
||||||
|
|
||||||
inputStream.close();
|
inputStream.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error(errorSave, e);
|
LOGGER.error("An error occurred while loading the settings!", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// try loading the omdbAPI key
|
// try loading the omdbAPI key
|
||||||
|
@ -966,14 +946,14 @@ public class MainWindowController {
|
||||||
return dbController;
|
return dbController;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setColor(String input) {
|
|
||||||
this.color = input;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getColor() {
|
public String getColor() {
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setColor(String input) {
|
||||||
|
this.color = input;
|
||||||
|
}
|
||||||
|
|
||||||
public FilmTabelDataType getCurrentTableFilm() {
|
public FilmTabelDataType getCurrentTableFilm() {
|
||||||
return currentTableFilm;
|
return currentTableFilm;
|
||||||
}
|
}
|
||||||
|
@ -986,14 +966,14 @@ public class MainWindowController {
|
||||||
return currentTableFilm.getStreamUrl();
|
return currentTableFilm.getStreamUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFontSize(Double input) {
|
|
||||||
this.fontSize = input;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Double getFontSize() {
|
public Double getFontSize() {
|
||||||
return fontSize;
|
return fontSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setFontSize(Double input) {
|
||||||
|
this.fontSize = input;
|
||||||
|
}
|
||||||
|
|
||||||
public int getIndexTable() {
|
public int getIndexTable() {
|
||||||
return indexTable;
|
return indexTable;
|
||||||
}
|
}
|
||||||
|
@ -1002,14 +982,14 @@ public class MainWindowController {
|
||||||
return indexList;
|
return indexList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAutoUpdate(boolean input) {
|
|
||||||
this.autoUpdate = input;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAutoUpdate() {
|
public boolean isAutoUpdate() {
|
||||||
return autoUpdate;
|
return autoUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAutoUpdate(boolean input) {
|
||||||
|
this.autoUpdate = input;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isUseBeta() {
|
public boolean isUseBeta() {
|
||||||
return useBeta;
|
return useBeta;
|
||||||
}
|
}
|
||||||
|
@ -1026,14 +1006,14 @@ public class MainWindowController {
|
||||||
this.autoplay = autoplay;
|
this.autoplay = autoplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLocal(String input) {
|
|
||||||
this.local = input;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLocal() {
|
public String getLocal() {
|
||||||
return local;
|
return local;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLocal(String input) {
|
||||||
|
this.local = input;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOmdbAPIKey() {
|
public String getOmdbAPIKey() {
|
||||||
return omdbAPIKey;
|
return omdbAPIKey;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,13 +31,6 @@ columnEpisode = Episode
|
||||||
columnFavorite = Favorit
|
columnFavorite = Favorit
|
||||||
|
|
||||||
#error translations
|
#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
|
|
||||||
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!
|
vlcNotInstalled = Um einen Film abspielen wird der VLC Media Player ben\u00F6tigt!
|
||||||
infoText = \nAutoren: \n \u2022 seil0@kellerkinder.xyz \n \u2022 hendrik.schutter@coptersicht.de \n(c) 2016-2018 Kellerkinder www.kellerkinder.xyz
|
infoText = \nAutoren: \n \u2022 seil0@kellerkinder.xyz \n \u2022 hendrik.schutter@coptersicht.de \n(c) 2016-2018 Kellerkinder www.kellerkinder.xyz
|
||||||
|
|
||||||
|
|
|
@ -31,13 +31,6 @@ columnEpisode = Episode
|
||||||
columnFavorite = Favorite
|
columnFavorite = Favorite
|
||||||
|
|
||||||
#error translations
|
#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
|
|
||||||
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!
|
vlcNotInstalled = VLC Media Player is required to play a movie!
|
||||||
infoText = \nMaintainers: \n \u2022 seil0@kellerkinder.xyz \n \u2022 hendrik.schutter@coptersicht.de \n(c) 2016-2018 Kellerkinder www.kellerkinder.xyz
|
infoText = \nMaintainers: \n \u2022 seil0@kellerkinder.xyz \n \u2022 hendrik.schutter@coptersicht.de \n(c) 2016-2018 Kellerkinder www.kellerkinder.xyz
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue