[Android] Info: load media from library if available

Geoffrey Métais git at videolan.org
Tue Mar 7 17:45:51 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar  7 17:44:14 2017 +0100| [266d21d233007ef8df54ea8e70c714056b5a50b3] | committer: Geoffrey Métais

Info: load media from library if available

> https://code.videolan.org/videolan/vlc-android/commit/266d21d233007ef8df54ea8e70c714056b5a50b3
---

 vlc-android/src/org/videolan/vlc/gui/InfoActivity.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/InfoActivity.java b/vlc-android/src/org/videolan/vlc/gui/InfoActivity.java
index 160d7fe..bbe2729 100644
--- a/vlc-android/src/org/videolan/vlc/gui/InfoActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/InfoActivity.java
@@ -60,6 +60,11 @@ public class InfoActivity extends AudioPlayerContainerActivity implements View.O
         mItem = (MediaWrapper) (savedInstanceState != null ?
                 savedInstanceState.getParcelable(TAG_ITEM) :
                 getIntent().getParcelableExtra(TAG_ITEM));
+        if (mItem.getId() == 0L) {
+            MediaWrapper mediaWrapper = VLCApplication.getMLInstance().getMedia(mItem.getUri());
+            if (mediaWrapper != null)
+                mItem = mediaWrapper;
+        }
         mBinding.setItem(mItem);
         final int fabVisibility =  savedInstanceState != null
             ? savedInstanceState.getInt(TAG_FAB_VISIBILITY) : -1;



More information about the Android mailing list