Commit c4bfc5c5 authored by Ludovic Fauvet's avatar Ludovic Fauvet

VideoPlayerActivity: readMedia should not be used for resuming playback

Unlike playIndex, readMedia adds the media to the VLC playlist (and thus
to the history) which is wrong in this case.
parent 4d6b5449
......@@ -1222,9 +1222,15 @@ public class VideoPlayerActivity extends Activity {
}
mSurface.setKeepScreenOn(true);
if (mLocation != null && mLocation.length() > 0 && !dontParse) {
/* Start / resume playback */
if (savedIndexPosition > -1) {
mLibVLC.playIndex(savedIndexPosition);
} else if (mLocation != null && mLocation.length() > 0 && !dontParse) {
savedIndexPosition = mLibVLC.readMedia(mLocation, false);
}
if (mLocation != null && mLocation.length() > 0 && !dontParse) {
// restore last position
Media media = DatabaseManager.getInstance(this).getMedia(this, mLocation);
if (media != null && media.getTime() > 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment