mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 12:53:08 +00:00
fix loading of playback-progress
This commit is contained in:
parent
fb07a1962c
commit
477aa35218
1 changed files with 2 additions and 2 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue