fixed Hamburger icon has wrong color after color change
This commit is contained in:
parent
46c1c43cab
commit
85a403a834
|
@ -550,17 +550,6 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* check if a film is supported by the HomeFlixPlayer or not
|
|
||||||
* this is the case if the mime type is mp4
|
|
||||||
* @param entry the film you want to check
|
|
||||||
* @return true if so, false if not
|
|
||||||
*/
|
|
||||||
private boolean isSupportedFormat(FilmTabelDataType film) {
|
|
||||||
String mimeType = URLConnection.guessContentTypeFromName(film.getStreamUrl());
|
|
||||||
return mimeType != null && (mimeType.contains("mp4") || mimeType.contains("vp6"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void openfolderbtnclicked() {
|
private void openfolderbtnclicked() {
|
||||||
String dest = new File(getCurrentStreamUrl()).getParentFile().getAbsolutePath();
|
String dest = new File(getCurrentStreamUrl()).getParentFile().getAbsolutePath();
|
||||||
|
@ -630,7 +619,8 @@ public class MainWindowController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void colorPickerAction() {
|
private void colorPickerAction() {
|
||||||
editColor(colorPicker.getValue().toString());
|
setColor(colorPicker.getValue().toString().substring(2, 10));
|
||||||
|
saveSettings();
|
||||||
applyColor();
|
applyColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -757,9 +747,12 @@ public class MainWindowController {
|
||||||
openfolderbtn.setStyle(btnStyleWhite);
|
openfolderbtn.setStyle(btnStyleWhite);
|
||||||
returnBtn.setStyle(btnStyleWhite);
|
returnBtn.setStyle(btnStyleWhite);
|
||||||
forwardBtn.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);
|
||||||
forwardBtn.setGraphic(skip_next_white);
|
forwardBtn.setGraphic(skip_next_white);
|
||||||
|
|
||||||
|
menuHam.getStyleClass().clear();
|
||||||
menuHam.getStyleClass().add("jfx-hamburgerW");
|
menuHam.getStyleClass().add("jfx-hamburgerW");
|
||||||
} else {
|
} else {
|
||||||
dialogBtnStyle = btnStyleBlack;
|
dialogBtnStyle = btnStyleBlack;
|
||||||
|
@ -772,9 +765,12 @@ public class MainWindowController {
|
||||||
openfolderbtn.setStyle(btnStyleBlack);
|
openfolderbtn.setStyle(btnStyleBlack);
|
||||||
returnBtn.setStyle(btnStyleBlack);
|
returnBtn.setStyle(btnStyleBlack);
|
||||||
forwardBtn.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);
|
||||||
forwardBtn.setGraphic(skip_next_black);
|
forwardBtn.setGraphic(skip_next_black);
|
||||||
|
|
||||||
|
menuHam.getStyleClass().clear();
|
||||||
menuHam.getStyleClass().add("jfx-hamburgerB");
|
menuHam.getStyleClass().add("jfx-hamburgerB");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -953,14 +949,18 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// cuts 0x of the Color-pickers return value
|
/**
|
||||||
private void editColor(String input) {
|
* check if a film is supported by the HomeFlixPlayer or not
|
||||||
StringBuilder sb = new StringBuilder(input);
|
* this is the case if the mime type is mp4
|
||||||
sb.delete(0, 2);
|
* @param entry the film you want to check
|
||||||
this.color = sb.toString();
|
* @return true if so, false if not
|
||||||
saveSettings();
|
*/
|
||||||
|
private boolean isSupportedFormat(FilmTabelDataType film) {
|
||||||
|
String mimeType = URLConnection.guessContentTypeFromName(film.getStreamUrl());
|
||||||
|
return mimeType != null && (mimeType.contains("mp4") || mimeType.contains("vp6"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// getter and setter
|
// getter and setter
|
||||||
public DBController getDbController() {
|
public DBController getDbController() {
|
||||||
return dbController;
|
return dbController;
|
||||||
|
|
|
@ -731,7 +731,7 @@ public class DBController {
|
||||||
return nextFilm;
|
return nextFilm;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** TODO check if we relay need to separate between favorites and none favorites
|
/**
|
||||||
* get the last watched episode
|
* get the last watched episode
|
||||||
* @param title the title of the series
|
* @param title the title of the series
|
||||||
* @return the last watched episode as {@link FilmTabelDataType} object
|
* @return the last watched episode as {@link FilmTabelDataType} object
|
||||||
|
@ -745,26 +745,16 @@ public class DBController {
|
||||||
Statement stmt = connection.createStatement();
|
Statement stmt = connection.createStatement();
|
||||||
ResultSet rs = stmt.executeQuery("SELECT * FROM films WHERE title = \"" + title + "\";");
|
ResultSet rs = stmt.executeQuery("SELECT * FROM films WHERE title = \"" + title + "\";");
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
if (rs.getBoolean("favorite") == true) {
|
// favorite image is black
|
||||||
nextFilm = new FilmTabelDataType(rs.getString("streamUrl"),
|
nextFilm = new FilmTabelDataType(rs.getString("streamUrl"), rs.getString("title"),
|
||||||
rs.getString("title"), rs.getString("season"), rs.getString("episode") ,rs.getBoolean("favorite"),
|
rs.getString("season"), rs.getString("episode"), rs.getBoolean("favorite"),
|
||||||
rs.getBoolean("cached"), new ImageView(favorite_black));
|
rs.getBoolean("cached"), new ImageView(favorite_black));
|
||||||
} else {
|
|
||||||
nextFilm = new FilmTabelDataType(rs.getString("streamUrl"),
|
|
||||||
rs.getString("title"), rs.getString("season"), rs.getString("episode"), rs.getBoolean("favorite"),
|
|
||||||
rs.getBoolean("cached"), new ImageView(favorite_border_black));
|
|
||||||
}
|
|
||||||
if (rs.getDouble("currentTime") > lastCurrentTime) {
|
if (rs.getDouble("currentTime") > lastCurrentTime) {
|
||||||
lastCurrentTime = rs.getDouble("currentTime");
|
lastCurrentTime = rs.getDouble("currentTime");
|
||||||
if (rs.getBoolean("favorite") == true) {
|
// favorite image is black
|
||||||
nextFilm = new FilmTabelDataType(rs.getString("streamUrl"),
|
nextFilm = new FilmTabelDataType(rs.getString("streamUrl"), rs.getString("title"),
|
||||||
rs.getString("title"), rs.getString("season"), rs.getString("episode") ,rs.getBoolean("favorite"),
|
rs.getString("season"), rs.getString("episode"), rs.getBoolean("favorite"),
|
||||||
rs.getBoolean("cached"), new ImageView(favorite_black));
|
rs.getBoolean("cached"), new ImageView(favorite_black));
|
||||||
} else {
|
|
||||||
nextFilm = new FilmTabelDataType(rs.getString("streamUrl"),
|
|
||||||
rs.getString("title"), rs.getString("season"), rs.getString("episode"), rs.getBoolean("favorite"),
|
|
||||||
rs.getBoolean("cached"), new ImageView(favorite_border_black));
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class PlayerController {
|
||||||
private ImageView fullscreen_black = new ImageView(new Image("icons/ic_fullscreen_black_24dp_1x.png"));
|
private ImageView fullscreen_black = new ImageView(new Image("icons/ic_fullscreen_black_24dp_1x.png"));
|
||||||
private ImageView fullscreen_exit_black = new ImageView(new Image("icons/ic_fullscreen_exit_black_24dp_1x.png"));
|
private ImageView fullscreen_exit_black = new ImageView(new Image("icons/ic_fullscreen_exit_black_24dp_1x.png"));
|
||||||
|
|
||||||
/** FIXME double set currentTime(
|
/** FIXME double set currentTime()
|
||||||
* initialize the new PlayerWindow
|
* initialize the new PlayerWindow
|
||||||
* @param entry the film object
|
* @param entry the film object
|
||||||
* @param player the player object (needed for closing action)
|
* @param player the player object (needed for closing action)
|
||||||
|
|
Loading…
Reference in New Issue