fix loading of playback-progress

This commit is contained in:
Felix 2017-09-26 22:29:23 +02:00
parent fb07a1962c
commit 477aa35218

View file

@ -106,13 +106,13 @@ public class ChaosflixViewModel extends ViewModel {
public Observable<Long> getPlaybackProgress(int apiID) {
return Observable.fromCallable(() -> {
List<PlaybackProgress> progresses
= PlaybackProgress.find(PlaybackProgress.class, "api_id = ?", Integer.toString(apiID));
= PlaybackProgress.find(PlaybackProgress.class, "event_id = ?", Integer.toString(apiID));
if(progresses.size() > 0){
return progresses.get(0).getProgress();
} else {
return 0l;
}
});
}).subscribeOn(Schedulers.io());
}
public static class Factory extends ViewModelProvider.NewInstanceFactory{