[Android] Advertise protocole for network favs & servers

Geoffrey Métais git at videolan.org
Fri Feb 5 18:51:57 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb  5 18:51:16 2016 +0100| [1e345af21b11ff11606d3dc2cf3a4735d6f82779] | committer: Geoffrey Métais

Advertise protocole for network favs & servers

> https://code.videolan.org/videolan/vlc-android/commit/1e345af21b11ff11606d3dc2cf3a4735d6f82779
---

 vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java             | 1 +
 .../src/org/videolan/vlc/gui/tv/browser/NetworkBrowserFragment.java     | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
index 650a675..2b4fc60 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
@@ -413,6 +413,7 @@ public class MainTvActivity extends BaseTvActivity implements IVideoBrowser, OnI
 
                 if (!favs.isEmpty()) {
                     for (MediaWrapper fav : favs) {
+                        fav.setDescription(fav.getUri().getScheme());
                         mBrowserAdapter.add(fav);
                     }
                 }
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/browser/NetworkBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/tv/browser/NetworkBrowserFragment.java
index c5c33c9..2ec247a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/browser/NetworkBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/browser/NetworkBrowserFragment.java
@@ -37,6 +37,8 @@ public class NetworkBrowserFragment extends SortedBrowserFragment {
 
     protected void addMedia(Media media){
         MediaWrapper mw = new MediaWrapper(media);
+        if (mUri == null)
+            mw.setDescription(mw.getUri().getScheme());
         int type = mw.getType();
         if (type != MediaWrapper.TYPE_AUDIO && type != MediaWrapper.TYPE_VIDEO && type != MediaWrapper.TYPE_DIR)
             return;



More information about the Android mailing list