Skip to content
Snippets Groups Projects
Commit 022deb1b authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Init Medialibrary if it's been crashed

parent 279d64d9
No related branches found
No related tags found
No related merge requests found
......@@ -60,9 +60,13 @@ import org.videolan.vlc.gui.audio.AudioPlayer;
import org.videolan.vlc.gui.browser.StorageBrowserFragment;
import org.videolan.vlc.interfaces.IRefreshable;
import org.videolan.vlc.media.MediaUtils;
import org.videolan.vlc.util.Permissions;
import org.videolan.vlc.util.Strings;
import org.videolan.vlc.util.WeakHandler;
import static org.videolan.vlc.StartActivity.EXTRA_FIRST_RUN;
import static org.videolan.vlc.StartActivity.EXTRA_UPGRADE;
public class AudioPlayerContainerActivity extends BaseActivity implements PlaybackService.Client.Callback {
public static final String TAG = "VLC/AudioPlayerContainerActivity";
......@@ -93,6 +97,9 @@ public class AudioPlayerContainerActivity extends BaseActivity implements Playba
@Override
protected void onCreate(Bundle savedInstanceState) {
//Init Medialibrary if KO
if (savedInstanceState != null && !VLCApplication.getMLInstance().isInitiated() && Permissions.canReadStorage())
startService(new Intent(MediaParsingService.ACTION_INIT, null, this, MediaParsingService.class));
MediaUtils.updateSubsDownloaderActivity(this);
super.onCreate(savedInstanceState);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment