minor player improvements

This commit is contained in:
Jannik 2018-04-18 21:04:14 +02:00
parent 7631169d26
commit 75ad137346
2 changed files with 11 additions and 8 deletions

View File

@ -218,9 +218,9 @@ public class MainWindowController {
private static final Logger LOGGER = LogManager.getLogger(MainWindowController.class.getName());
private int hashA = -647380320;
private String version = "0.6.100";
private String buildNumber = "149";
private String versionName = "toothless dragon RC";
private final String version = "0.6.100";
private final String buildNumber = "151";
private final String versionName = "toothless dragon RC";
private String dialogBtnStyle;
private String color;
private String local;
@ -274,8 +274,9 @@ public class MainWindowController {
omdbAPIController = new OMDbAPIController(this, dbController, this.main);
}
// call all init methods
// call all initialize methods
void init() {
LOGGER.info("Initializing Project-HomeFlix build " + buildNumber);
loadSettings();
checkAutoUpdate();
initTabel();

View File

@ -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_exit_black = new ImageView(new Image("icons/ic_fullscreen_exit_black_24dp_1x.png"));
/**
/** FIXME double set currentTime(
* initialize the new PlayerWindow
* @param entry the film object
* @param player the player object (needed for closing action)
@ -144,7 +144,7 @@ public class PlayerController {
currentTime = newValue.toMillis(); // set the current time
int episode = !film.getEpisode().isEmpty() ? Integer.parseInt(film.getEpisode()) : 0;
int season = !film.getSeason().isEmpty() ? Integer.parseInt(film.getSeason()) : 0;
// if we are end time -10 seconds, do autoplay, if activated
if ((duration - currentTime) < 10000 && episode != 0 && autoplay) {
autoplay = false;
@ -155,8 +155,10 @@ public class PlayerController {
init(mainWCon, player, nextFilm);
autoplay = true;
}
} else if ((duration - currentTime) < 100) {
} else if ((duration - currentTime) < 120) {
// if we are -20ms stop the media
mediaPlayer.stop();
mainWCon.getDbController().setCurrentTime(film.getStreamUrl(), 0); // reset old video start time
}
if (!mousePressed) {
@ -181,7 +183,7 @@ public class PlayerController {
// hide controls timer initialization
final Timer timer = new Timer();
TimerTask controlAnimationTask = null; // task to execute save operation
final long delayTime = 1000;
final long delayTime = 2000; // hide the controls after 2 seconds
@Override
public void handle(MouseEvent mouseEvent) {