use of org.videolan.vlc.media.MediaDatabase in project vlc-android by GeoffreyMetais.
the class NetworkBrowserFragment method toggleFavorite.
public void toggleFavorite() {
final MediaDatabase db = MediaDatabase.getInstance();
if (db.networkFavExists(mCurrentMedia.getUri()))
db.deleteNetworkFav(mCurrentMedia.getUri());
else
db.addNetworkFavItem(mCurrentMedia.getUri(), mCurrentMedia.getTitle(), mCurrentMedia.getArtworkURL());
final Activity activity = getActivity();
if (activity != null)
activity.invalidateOptionsMenu();
}
Aggregations