Some fixes
This commit is contained in:
parent
7ceb04d548
commit
14efbdd08f
|
@ -560,8 +560,8 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
||||||
userHistory.setCurrentTime(totalSeconds * 1000);
|
userHistory.setCurrentTime(totalSeconds * 1000);
|
||||||
peertube.setUserHistory(userHistory);
|
peertube.setUserHistory(userHistory);
|
||||||
}
|
}
|
||||||
SearchVM viewModelSearch = new ViewModelProvider(PeertubeActivity.this).get(SearchVM.class);
|
TimelineVM viewModelTimeline = new ViewModelProvider(PeertubeActivity.this).get(TimelineVM.class);
|
||||||
viewModelSearch.getVideos("0", peertube.getEmbedUrl()).observe(PeertubeActivity.this, this::manageVIewVideos);
|
viewModelTimeline.getVideo(peertubeInstance, peertube.getUuid(), false).observe(PeertubeActivity.this, this::manageVIewVideo);
|
||||||
} else {
|
} else {
|
||||||
Helper.forwardToAnotherApp(PeertubeActivity.this, intent);
|
Helper.forwardToAnotherApp(PeertubeActivity.this, intent);
|
||||||
finish();
|
finish();
|
||||||
|
@ -719,7 +719,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
nextVideo = apiResponse.getPeertubes().get(i);
|
nextVideo = apiResponse.getPeertubes().get(i);
|
||||||
if (!playedVideos.contains(nextVideo.getId()) && player != null) {
|
if (!playedVideos.contains(nextVideo.getId()) && player != null && nextVideo.getFileUrl(null, PeertubeActivity.this) != null) {
|
||||||
MediaItem mediaItem = new MediaItem.Builder().setUri(Uri.parse(nextVideo.getFileUrl(null, PeertubeActivity.this))).build();
|
MediaItem mediaItem = new MediaItem.Builder().setUri(Uri.parse(nextVideo.getFileUrl(null, PeertubeActivity.this))).build();
|
||||||
player.addMediaItem(mediaItem);
|
player.addMediaItem(mediaItem);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue