@ -167,7 +167,7 @@ public class MainWindowController {
private boolean settingsTrue = false ;
private final String version = "0.7.0" ;
private final String buildNumber = "167 " ;
private final String buildNumber = "169 " ;
private final String versionName = "toothless dragon" ;
private String btnStyle ;
@ -176,7 +176,6 @@ public class MainWindowController {
private int indexTable ;
private int indexList ;
private int next ;
private ResourceBundle bundle ;
private FilmTabelDataType currentTableFilm = new FilmTabelDataType ( "" , "" , "" , "" , false , false , null ) ;
private ObservableList < String > languages = FXCollections . observableArrayList ( "English (en_US)" , "Deutsch (de_DE)" ) ;
@ -487,7 +486,9 @@ public class MainWindowController {
e1 . printStackTrace ( ) ;
}
if ( output . contains ( "which: no vlc" ) | | output = = "" ) {
JFXInfoAlert vlcInfoAlert = new JFXInfoAlert ( "Info" , getBundle ( ) . getString ( "vlcNotInstalled" ) , btnStyle , primaryStage ) ;
JFXInfoAlert vlcInfoAlert = new JFXInfoAlert ( "Info" ,
XMLController . getLocalBundle ( ) . getString ( "vlcNotInstalled" ) ,
btnStyle , primaryStage ) ;
vlcInfoAlert . showAndWait ( ) ;
} else {
try {
@ -535,7 +536,7 @@ public class MainWindowController {
@FXML
private void aboutBtnAction ( ) {
String bodyText = "Project HomeFlix \nVersion: " + version + " (Build: " + buildNumber + ") \""
+ versionName + "\" \n" + getBundle ( ) . getString ( "infoText" ) ;
+ versionName + "\" \n" + XMLController . getLocal Bundle ( ) . getString ( "infoText" ) ;
JFXInfoAlert infoAlert = new JFXInfoAlert ( "Project HomeFlix" , bodyText , btnStyle , primaryStage ) ;
infoAlert . showAndWait ( ) ;
}
@ -554,7 +555,7 @@ public class MainWindowController {
@FXML
private void addDirectoryBtnAction ( ) {
DirectoryChooser directoryChooser = new DirectoryChooser ( ) ;
directoryChooser . setTitle ( bundle . getString ( "addDirectory" ) ) ;
directoryChooser . setTitle ( XMLController . getLocalBundle ( ) . getString ( "addDirectory" ) ) ;
File selectedFolder = directoryChooser . showDialog ( primaryStage ) ;
if ( selectedFolder ! = null & & selectedFolder . exists ( ) ) {
addSource ( selectedFolder . getPath ( ) , "local" ) ;
@ -566,7 +567,7 @@ public class MainWindowController {
@FXML
private void addStreamSourceBtnAction ( ) {
FileChooser fileChooser = new FileChooser ( ) ;
fileChooser . setTitle ( bundle . getString ( "addStreamSource" ) ) ;
fileChooser . setTitle ( XMLController . getLocalBundle ( ) . getString ( "addStreamSource" ) ) ;
File selectedFile = fileChooser . showOpenDialog ( primaryStage ) ;
if ( selectedFile ! = null & & selectedFile . exists ( ) ) {
addSource ( selectedFile . getPath ( ) , "stream" ) ;
@ -677,8 +678,10 @@ public class MainWindowController {
// clear old sources list/table
getSourcesList ( ) . clear ( ) ;
getSourceRoot ( ) . getChildren ( ) . clear ( ) ;
// update the database and all films from the database
dbController . refreshDataBase ( ) ;
checkAllPosters ( ) ; // check if there is anything to cache
}
/ * *
@ -754,37 +757,37 @@ public class MainWindowController {
void setLocalUI ( ) {
switch ( XMLController . getUsrLocal ( ) ) {
case "en_US" :
setBundle ( ResourceBundle . getBundle ( "locals.HomeFlix-Local" , Locale . US ) ) ; // us_English
XMLController . setLocal Bundle ( ResourceBundle . getBundle ( "locals.HomeFlix-Local" , Locale . US ) ) ; // us_English
languageChoisBox . getSelectionModel ( ) . select ( 0 ) ;
break ;
case "de_DE" :
setBundle ( ResourceBundle . getBundle ( "locals.HomeFlix-Local" , Locale . GERMAN ) ) ; // German
XMLController . setLocal Bundle ( ResourceBundle . getBundle ( "locals.HomeFlix-Local" , Locale . GERMAN ) ) ; // German
languageChoisBox . getSelectionModel ( ) . select ( 1 ) ;
break ;
default :
setBundle ( ResourceBundle . getBundle ( "locals.HomeFlix-Local" , Locale . US ) ) ; // default local
XMLController . setLocal Bundle ( ResourceBundle . getBundle ( "locals.HomeFlix-Local" , Locale . US ) ) ; // default local
languageChoisBox . getSelectionModel ( ) . select ( 0 ) ;
break ;
}
aboutBtn . setText ( getBundle ( ) . getString ( "info" ) ) ;
settingsBtn . setText ( getBundle ( ) . getString ( "settings" ) ) ;
searchTextField . setPromptText ( getBundle ( ) . getString ( "tfSearch" ) ) ;
openfolderbtn . setText ( getBundle ( ) . getString ( "openFolder" ) ) ;
updateBtn . setText ( getBundle ( ) . getString ( "checkUpdates" ) ) ;
addDirectoryBtn . setText ( getBundle ( ) . getString ( "addDirectory" ) ) ;
addStreamSourceBtn . setText ( getBundle ( ) . getString ( "addStreamSource" ) ) ;
homeflixSettingsLbl . setText ( getBundle ( ) . getString ( "homeflixSettingsLbl" ) ) ;
mainColorLbl . setText ( getBundle ( ) . getString ( "mainColorLbl" ) ) ;
fontsizeLbl . setText ( getBundle ( ) . getString ( "fontsizeLbl" ) ) ;
languageLbl . setText ( getBundle ( ) . getString ( "languageLbl" ) ) ;
autoUpdateToggleBtn . setText ( getBundle ( ) . getString ( "autoUpdate" ) ) ;
autoplayToggleBtn . setText ( getBundle ( ) . getString ( "autoplay" ) ) ;
branchLbl . setText ( getBundle ( ) . getString ( "branchLbl" ) ) ;
columnStreamUrl . setText ( getBundle ( ) . getString ( "columnStreamUrl" ) ) ;
columnTitle . setText ( getBundle ( ) . getString ( "columnName" ) ) ;
columnSeason . setText ( getBundle ( ) . getString ( "columnSeason" ) ) ;
columnEpisode . setText ( getBundle ( ) . getString ( "columnEpisode" ) ) ;
columnFavorite . setText ( getBundle ( ) . getString ( "columnFavorite" ) ) ;
aboutBtn . setText ( XMLController . getLocal Bundle ( ) . getString ( "info" ) ) ;
settingsBtn . setText ( XMLController . getLocal Bundle ( ) . getString ( "settings" ) ) ;
searchTextField . setPromptText ( XMLController . getLocal Bundle ( ) . getString ( "tfSearch" ) ) ;
openfolderbtn . setText ( XMLController . getLocal Bundle ( ) . getString ( "openFolder" ) ) ;
updateBtn . setText ( XMLController . getLocal Bundle ( ) . getString ( "checkUpdates" ) ) ;
addDirectoryBtn . setText ( XMLController . getLocal Bundle ( ) . getString ( "addDirectory" ) ) ;
addStreamSourceBtn . setText ( XMLController . getLocal Bundle ( ) . getString ( "addStreamSource" ) ) ;
homeflixSettingsLbl . setText ( XMLController . getLocal Bundle ( ) . getString ( "homeflixSettingsLbl" ) ) ;
mainColorLbl . setText ( XMLController . getLocal Bundle ( ) . getString ( "mainColorLbl" ) ) ;
fontsizeLbl . setText ( XMLController . getLocal Bundle ( ) . getString ( "fontsizeLbl" ) ) ;
languageLbl . setText ( XMLController . getLocal Bundle ( ) . getString ( "languageLbl" ) ) ;
autoUpdateToggleBtn . setText ( XMLController . getLocal Bundle ( ) . getString ( "autoUpdate" ) ) ;
autoplayToggleBtn . setText ( XMLController . getLocal Bundle ( ) . getString ( "autoplay" ) ) ;
branchLbl . setText ( XMLController . getLocal Bundle ( ) . getString ( "branchLbl" ) ) ;
columnStreamUrl . setText ( XMLController . getLocal Bundle ( ) . getString ( "columnStreamUrl" ) ) ;
columnTitle . setText ( XMLController . getLocal Bundle ( ) . getString ( "columnName" ) ) ;
columnSeason . setText ( XMLController . getLocal Bundle ( ) . getString ( "columnSeason" ) ) ;
columnEpisode . setText ( XMLController . getLocal Bundle ( ) . getString ( "columnEpisode" ) ) ;
columnFavorite . setText ( XMLController . getLocal Bundle ( ) . getString ( "columnFavorite" ) ) ;
}
// if AutoUpdate, then check for updates
@ -870,14 +873,6 @@ public class MainWindowController {
return sourcesList ;
}
public ResourceBundle getBundle ( ) {
return bundle ;
}
public void setBundle ( ResourceBundle bundle ) {
this . bundle = bundle ;
}
public TreeTableView < FilmTabelDataType > getFilmsTreeTable ( ) {
return filmsTreeTable ;
}