minor player improvements
This commit is contained in:
parent
7631169d26
commit
75ad137346
|
@ -218,9 +218,9 @@ public class MainWindowController {
|
||||||
private static final Logger LOGGER = LogManager.getLogger(MainWindowController.class.getName());
|
private static final Logger LOGGER = LogManager.getLogger(MainWindowController.class.getName());
|
||||||
private int hashA = -647380320;
|
private int hashA = -647380320;
|
||||||
|
|
||||||
private String version = "0.6.100";
|
private final String version = "0.6.100";
|
||||||
private String buildNumber = "149";
|
private final String buildNumber = "151";
|
||||||
private String versionName = "toothless dragon RC";
|
private final String versionName = "toothless dragon RC";
|
||||||
private String dialogBtnStyle;
|
private String dialogBtnStyle;
|
||||||
private String color;
|
private String color;
|
||||||
private String local;
|
private String local;
|
||||||
|
@ -274,8 +274,9 @@ public class MainWindowController {
|
||||||
omdbAPIController = new OMDbAPIController(this, dbController, this.main);
|
omdbAPIController = new OMDbAPIController(this, dbController, this.main);
|
||||||
}
|
}
|
||||||
|
|
||||||
// call all init methods
|
// call all initialize methods
|
||||||
void init() {
|
void init() {
|
||||||
|
LOGGER.info("Initializing Project-HomeFlix build " + buildNumber);
|
||||||
loadSettings();
|
loadSettings();
|
||||||
checkAutoUpdate();
|
checkAutoUpdate();
|
||||||
initTabel();
|
initTabel();
|
||||||
|
|
|
@ -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(
|
||||||
* 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)
|
||||||
|
@ -144,7 +144,7 @@ public class PlayerController {
|
||||||
currentTime = newValue.toMillis(); // set the current time
|
currentTime = newValue.toMillis(); // set the current time
|
||||||
int episode = !film.getEpisode().isEmpty() ? Integer.parseInt(film.getEpisode()) : 0;
|
int episode = !film.getEpisode().isEmpty() ? Integer.parseInt(film.getEpisode()) : 0;
|
||||||
int season = !film.getSeason().isEmpty() ? Integer.parseInt(film.getSeason()) : 0;
|
int season = !film.getSeason().isEmpty() ? Integer.parseInt(film.getSeason()) : 0;
|
||||||
|
|
||||||
// if we are end time -10 seconds, do autoplay, if activated
|
// if we are end time -10 seconds, do autoplay, if activated
|
||||||
if ((duration - currentTime) < 10000 && episode != 0 && autoplay) {
|
if ((duration - currentTime) < 10000 && episode != 0 && autoplay) {
|
||||||
autoplay = false;
|
autoplay = false;
|
||||||
|
@ -155,8 +155,10 @@ public class PlayerController {
|
||||||
init(mainWCon, player, nextFilm);
|
init(mainWCon, player, nextFilm);
|
||||||
autoplay = true;
|
autoplay = true;
|
||||||
}
|
}
|
||||||
} else if ((duration - currentTime) < 100) {
|
} else if ((duration - currentTime) < 120) {
|
||||||
|
// if we are -20ms stop the media
|
||||||
mediaPlayer.stop();
|
mediaPlayer.stop();
|
||||||
|
mainWCon.getDbController().setCurrentTime(film.getStreamUrl(), 0); // reset old video start time
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mousePressed) {
|
if (!mousePressed) {
|
||||||
|
@ -181,7 +183,7 @@ public class PlayerController {
|
||||||
// hide controls timer initialization
|
// hide controls timer initialization
|
||||||
final Timer timer = new Timer();
|
final Timer timer = new Timer();
|
||||||
TimerTask controlAnimationTask = null; // task to execute save operation
|
TimerTask controlAnimationTask = null; // task to execute save operation
|
||||||
final long delayTime = 1000;
|
final long delayTime = 2000; // hide the controls after 2 seconds
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(MouseEvent mouseEvent) {
|
public void handle(MouseEvent mouseEvent) {
|
||||||
|
|
Loading…
Reference in New Issue