minor player fixes and no more other files than videos in the db

* fixed episode = ""resulting in many exceptons
* only add video files to the database (and GUI)
* check the videos mimetype to decide which player is used
This commit is contained in:
Jannik
2018-04-05 12:09:39 +02:00
parent 2c3e9fd5e7
commit d6554b9acd
3 changed files with 31 additions and 19 deletions

View File

@ -137,7 +137,8 @@ public class PlayerController {
@Override
public void changed(ObservableValue<? extends Duration> observable, Duration oldValue, Duration newValue) {
currentTime = newValue.toMillis();
int episode = Integer.parseInt(film.getEpisode());
int episode = 0;
if (film.getEpisode().length() != 0) episode = Integer.parseInt(film.getEpisode());
if ((duration - currentTime) < 10000 && episode != 0 && autoplay) {
autoplay = false;