Commit 7dd2d2e7 authored by Geoffrey Métais's avatar Geoffrey Métais

TV: Initial update even if ML is not initiated

parent 11d1e1c1
......@@ -168,23 +168,25 @@ public class MainTvActivity extends BaseTvActivity implements OnItemViewSelected
/*
* skip browser and show directly Audio Player if a song is playing
*/
if (mMediaLibrary.isInitiated() && (mRowsAdapter == null || mRowsAdapter.size() == 0) && Permissions.canReadStorage())
if ((mRowsAdapter == null || mRowsAdapter.size() == 0) && Permissions.canReadStorage())
update();
else {
updateBrowsers();
updateNowPlayingCard();
VLCApplication.runBackground(new Runnable() {
@Override
public void run() {
final MediaWrapper[] history = VLCApplication.getMLInstance().lastMediaPlayed();
mHandler.post(new Runnable() {
@Override
public void run() {
updateHistory(history);
}
});
}
});
if (mMediaLibrary.isInitiated()) {
VLCApplication.runBackground(new Runnable() {
@Override
public void run() {
final MediaWrapper[] history = mMediaLibrary.lastMediaPlayed();
mHandler.post(new Runnable() {
@Override
public void run() {
updateHistory(history);
}
});
}
});
}
}
}
......
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